FreeStatisticalTools.com

One-Sample T-Test: Compare a Mean With a Known Value (With Example)

Does your sample mean differ from a target, a norm or a scale midpoint? How the one-sample t-test works, with a worked example and an APA template.

Bibin Xavier3 min readT-tests and ANOVA

A one-sample t-test checks whether the mean of a single sample differs from a specific value. That value comes from outside the data: a national norm, a manufacturer's specification, a recommended target or the midpoint of a rating scale.

Typical questions: Do our students sleep less than the recommended 8 hours? Is the average fill weight of a bottle different from the 500 ml on the label? Is mean satisfaction on a 1–5 scale above the neutral point of 3?

Free tool · runs in your browserOne-Sample T-Test CalculatorFree one-sample t-test calculator: compare a sample mean with a test value and get t, df, p, the 95% CI and Cohen’s d in an APA table.Run a one-sample t-test →
In this guide
  1. When to use it
  2. The formula
  3. Assumptions
  4. Worked example
  5. Effect size
  6. How to report a one-sample t-test in APA 7
  7. One-tailed or two-tailed?
  8. Common mistakes
  9. Frequently asked questions

When to use it

  • You have one continuous variable from one group.
  • You want to compare its mean with a fixed test value (μ₀) that you chose before looking at the data.
  • The population standard deviation is unknown, which is almost always the case. If it were known, a z-test would apply.

The formula

Formula

t = (M − μ₀) / (SD / √n), with df = n − 1

The numerator is how far the sample mean is from the test value. The denominator, the standard error, is how much sample means typically vary by chance. A large ratio means the gap is unlikely to be sampling noise.

Assumptions

  1. Independent observations, for example one value per person.
  2. Continuous outcome (interval or ratio). Scale totals built from several Likert items are usually acceptable.
  3. Approximate normality of the variable, or a sample of about 30 or more, in which case the central limit theorem makes the test robust.
  4. No extreme outliers, which can pull the mean far from most of the data.

For a small, clearly skewed sample, the one-sample Wilcoxon signed-rank test compares the median with the test value instead.

Worked example

A health researcher asks whether university students sleep less than the recommended 8 hours. She records average nightly sleep for 36 students: M = 7.4 hours, SD = 1.2.

  • Standard error = 1.2 / √36 = 0.20
  • t(35) = (7.4 − 8) / 0.20 = −3.00
  • Two-tailed p = .005
  • 95% CI for the mean = [6.99, 7.81] hours; for the difference from 8 hours = [−1.01, −0.19]

Students slept significantly less than 8 hours, by about 36 minutes on average. The confidence interval for the shortfall runs from about 11 minutes to an hour.

Effect size

Cohen's d for a one-sample test is (M − μ₀) / SD = (7.4 − 8) / 1.2 = −0.50, a medium effect. The sign shows the direction: negative means the sample mean is below the test value.

How to report a one-sample t-test in APA 7

How to report it (APA 7)

A one-sample t-test showed that students slept significantly less (M = 7.4 hours, SD = 1.2) than the recommended 8 hours, t(35) = −3.00, p = .005, mean difference = −0.60, 95% CI [−1.01, −0.19], d = −0.50.

One-tailed or two-tailed?

A one-tailed test is justified only if you stated the direction before collecting data and a result in the other direction would be treated the same as no effect. In most research, use the two-tailed test. The exact critical values for both are in the t table.

Common mistakes

  • Choosing the test value after seeing the data, for example testing against whatever value makes the result significant.
  • Using the scale midpoint as a test value without asking whether it is meaningful. A mean above 3 on a 1–5 scale says little if most comparable samples score around 3.8.
  • Reporting only “p < .05″ instead of the exact p-value, the confidence interval and the effect size.

Frequently asked questions

What is the test value in a one-sample t-test?

It is the population value you compare your sample mean with, such as a norm, a specification, a target or a scale midpoint. It must be fixed in advance, not estimated from the same data.

What is the difference between a one-sample t-test and a z-test?

The z-test assumes the population standard deviation is known. The t-test estimates it from the sample, which is the realistic situation, and uses the t distribution with n − 1 degrees of freedom.

Can I use a one-sample t-test with a small sample?

Yes, if the data are roughly normal without outliers. With fewer than about 15 observations and visible skew, use the one-sample Wilcoxon test.

How do I compare a mean with the scale midpoint?

Enter the midpoint (for example 3 on a 1–5 scale, or 4 on a 1–7 scale) as the test value in a one-sample t-test.

Cite the tool (APA 7)
Xavier, B. (2026). One-Sample T-Test Calculator [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/one-sample-t-test-calculator/

Free tools used in this guide

Cite this article

If this guide helped your thesis, paper or class, please cite it. If you ran the analysis with one of our tools, cite the tool as well (each tool page has its own citation).

Xavier, B. (2026, October 15). One-Sample T-Test: Compare a Mean With a Known Value (With Example). FreeStatisticalTools.com Blog. https://freestatisticaltools.com/blog/one-sample-t-test/
Free eBooks · Newsletter

Get 3 free step-by-step eBooks

PLS-SEM, CB-SEM and bibliometric analysis, plus APA results templates, a thesis methods checklist and questionnaire templates. Then about two emails a month with tutorials, new tools, workshops and conferences.

  • Sent to your inbox instantly
  • Free, no spam
  • Unsubscribe anytime
See everything you get →
CB-SEM and CFA Step by Step (free eBook)PLS-SEM Step by Step (free eBook)Bibliometric Analysis Step by Step (free eBook)

Free statistics tutorials, tools, workshops and conferences

Free. About two emails a month. Unsubscribe anytime.

About Bibin Xavier

Bibin Xavier is a researcher, assistant professor, developer, digital marketer, trainer, entrepreneurship and incubation coordinator

Connect on LinkedIn →

Ask a question or leave a comment

Your email address will not be published. Required fields are marked *