1 sample t test calculator

What this 1 sample t test calculator does

This tool performs a one-sample t test, which compares your sample mean to a known or claimed population mean. It is useful when the population standard deviation is unknown and you want to test whether your sample provides evidence of a meaningful difference.

In plain English: if someone claims the average is 50, and your sample average is 52.4, this calculator helps you decide whether that difference is likely just random noise or statistically significant.

When to use a one-sample t test

  • You have one sample from a population.
  • You want to compare the sample mean to a target or historical value (μ₀).
  • You do not know the population standard deviation.
  • Your data are approximately normal, or your sample size is reasonably large.

Formula used

The test statistic is:

t = (x̄ − μ₀) / (s / √n)

  • = sample mean
  • μ₀ = hypothesized population mean
  • s = sample standard deviation
  • n = sample size

Degrees of freedom are df = n − 1. The p-value is then computed from the Student's t distribution.

How to interpret the results

1) Test statistic (t)

The farther t is from zero, the more evidence against the null hypothesis (H₀: μ = μ₀).

2) P-value

The p-value tells you how unusual your sample result would be if H₀ were true. A small p-value means your sample is unlikely under H₀.

3) Decision at α

If p < α, reject H₀ (statistically significant). If p ≥ α, fail to reject H₀.

4) Confidence interval

The calculator also reports a two-sided confidence interval for the mean: if the hypothesized mean falls outside this interval, that aligns with a significant two-tailed test at the same α.

Example scenario

Suppose a factory claims average fill volume is 500 ml. You sample 25 bottles and get: x̄ = 496.8, s = 6.2. Enter μ₀ = 500 and α = 0.05.

If the resulting p-value is below 0.05, you have evidence that the true average differs from 500 ml. If it is above 0.05, the sample does not provide strong enough evidence to reject the claim.

Assumptions to keep in mind

  • Observations are independent.
  • The underlying population is approximately normal (especially important with small n).
  • There are no extreme outliers distorting the mean.

Quick notes

  • Use two-tailed when checking for any difference.
  • Use right-tailed when testing whether the mean is larger than μ₀.
  • Use left-tailed when testing whether the mean is smaller than μ₀.

🔗 Related Calculators