INTERACTIVE TOOL · PRACTICAL STATISTICS

One-sample t-test calculator

Compare the mean of one set of independent observations with a specified target, then examine the uncertainty around that mean.

By Stephen MacDonald PhD FRCPath · Guide updated 17 October 2026

Two-sided test · Raw numerical observations · 90%, 95% or 99% confidence intervals

Calculate and inspect the result

Use consistent units for the observations and target. Choose the significance level before interpreting a result. The calculator treats the target as exact; uncertainty in an assigned target value is not included.

Try the fictional example, or enter your own non-sensitive practice values. Calculations run in this page in your browser. Use a decimal point; commas separate observations.

Worked example: a mean above its target

Fictional data in arbitrary units. This example illustrates interpretation; it does not prescribe a verification study or a sample size.

Enter 98, 99, 100, 100, 101, 101, 102, 102, 103, 104. Set the target to 100 and α to 0.05, or select Use worked example.

Check the arithmetic

n = 10; mean = 101; sample SD ≈ 1.825742; SE ≈ 0.577350. The difference from the target is 1 unit, so t ≈ 1.732051 with 9 degrees of freedom.

The two-sided p-value is approximately 0.117307. The 95% confidence interval for the population mean is approximately 99.69 to 102.31 units.

Explain the finding

The sample mean is above 100, but the interval includes 100. At α = 0.05, these data do not provide statistical evidence of a difference from that target under the test model.

This does not establish equality or equivalence, and it does not establish acceptable laboratory performance. Examine the estimated difference, its uncertainty and the requirement relevant to the intended use.

Before using a one-sample t-test

Check the question and observations

The question concerns one population mean and a specified target. Observations should be independent and relevant to that population. Repeated measurements may share run, calibration or other effects.

For the standard small-sample t model, the observations are assumed to come from a normal population. Inspect the data and investigate unusual values. A normality-test result alone does not establish that the model is suitable.

Keep the interpretation proportionate

A p-value is calculated under the null model; it is not the probability that the null hypothesis is true. Statistical evidence of a difference does not determine whether its size matters in practice.

A confidence level describes the long-run coverage of the interval procedure. This interval concerns the population mean, not the range containing a stated proportion of individual results.

Method and calculation checks

Method and calculation checks

The calculator uses t = (sample mean − target) / (sample SD / √n), with n − 1 degrees of freedom. Confidence limits use the corresponding Student t critical value. All supplied observations are used; no automatic removal or transformation is applied.

The numerical functions were compared with SciPy across 76 reference cases, including small and large samples, different significance levels and positive and negative t statistics. Invalid numerical input and zero sample SD are rejected. Numerical agreement does not establish that the model is suitable for a particular study.

Continue with the related question

Understand SD, SE and confidence intervals · Understand agreement between methods · Frame a verification question · Search all resources

Sources

NIST/SEMATECH: confidence limits and the one-sample t-test · SciPy: one-sample t-test and confidence interval documentation

Educational use. Suggest a correction and include the inputs and the result concerned. Use non-sensitive practice values.