Interactive module guide
One Sample T-Test Calculator & Guide
A one sample t-test evaluates whether the mean of one numerical population differs from a specified value when the population standard deviation is unknown and estimated from the sample.
It answers a question about a mean, not about the probability that the null hypothesis is true.
The procedure is most defensible with independent observations and an approximately normal population, especially when the sample is small or contains influential values.
Free · No sign-up · Calculations stay in your browser
Is this the right module for my question?
Use it when
- Use the test for one sample of quantitative observations and a pre-specified comparison mean μ₀. The observations should represent independent experimental units or a sampling design whose dependence has already been handled.
- Choose a two-sided alternative for any meaningful departure, a right-sided alternative for a planned claim that μ exceeds μ₀, or a left-sided alternative for a planned claim that μ is lower. The scientific question, not the observed sample mean, determines the tail.
- The t procedure is appropriate when σ is not known and the sample standard deviation s estimates it. With moderate or large samples it can tolerate modest non-normality, but outliers and strong skew can still distort the mean and standard error.
Choose another method when
- Do not use this test for before-and-after pairs entered as one unstructured sample, for two unrelated groups, for categorical outcomes, or for a median question. Those designs require different statistics and null models.
- Avoid a simple t-test when observations are clustered, serially correlated, selectively sampled, or dominated by extreme values. Larger n does not correct systematic bias or dependence.
Interactive tool
The calculator loads as you approach this section so the guide remains fast on mobile connections.
How to read the result
Report t with n−1 degrees of freedom and the p-value. The sign shows whether x̄ is above or below μ₀ under the subtraction order. The magnitude expresses the difference in estimated standard-error units.
Rejecting H₀ means the result crosses the selected α threshold under the assumptions. Failing to reject means evidence is insufficient for the alternative, not that equivalence has been established. Equivalence requires margins and a different testing framework.
Inputs and parameter meaning
Enter the raw sample values in one consistent unit. The calculator derives n, x̄, and the sample standard deviation using the n−1 variance denominator. At least two distinct values are needed for a positive estimated standard error.
Enter μ₀ in the same unit and select α and tail direction according to the pre-analysis question. The default μ₀=0 is not automatically meaningful; replace it with the actual benchmark being tested.
Inspect the observations before relying on the result. One extreme value can change both x̄ and s, sometimes in opposing directions. The current tool performs the arithmetic but does not display a normal quantile plot or an outlier diagnostic.
Formula, hypotheses, and assumptions
Conditions to review
- Population standard deviation is unknown
- Sample is randomly selected
- Population is normally distributed
Calculator parameters
- Significance Level (α): default 0.05.
- Population Mean (μ₀): default 0.
- Test Type: default Two-tailed.
What the method is doing
The statistic t=(x̄−μ₀)/(s/sqrt(n)) uses the estimated standard error of the sample mean. Under an independent normal sample and H₀, it follows a Student t distribution with n−1 degrees of freedom.
The t distribution has heavier tails than the standard normal because s is uncertain. At small degrees of freedom, a given standardized difference produces a larger p-value than a z reference. As n grows, the t distribution approaches normal.
The p-value is calculated in the pre-specified tail area under H₀. It measures compatibility between data and the complete null model; it does not give the probability of H₀, the probability results arose “by chance,” or the size of the effect.
Worked example: average battery life against a target
A lab records independent battery lives of 9.8, 10.4, 10.1, 9.9, 10.6, 10.2, 9.7, and 10.3 hours. Before testing, it defines H₀:μ=10 hours against a two-sided alternative at α=0.05. The population standard deviation is not known.
- 1Enter the eight observations, set population mean to 10, and choose Two-tailed. The calculator obtains x̄=10.125 hours, s≈0.316 hours, and standard error s/sqrt(8)≈0.112.
- 2Compute t=(10.125−10)/0.112≈1.12 with df=7. The two-sided t tail is well above 0.05, so this sample does not cross the planned rejection threshold.
- 3Check the raw values for collection order, unusual measurements, and independence. The narrow numerical range supports the arithmetic, but it does not by itself prove random sampling or population normality.
Interpretation
At the 5% level, the sample does not provide sufficient evidence that mean battery life differs from 10 hours. The result is compatible with a range of true means and should not be rewritten as “the mean is 10.” The tool does not output a confidence interval, so interval claims require a separate verified calculation.
Common mistakes
- Do not call the t-test “nonparametric” or assume it is immune to outliers. It is a mean-based parametric procedure whose exact small-sample result relies on normality.
- A non-significant p-value is not evidence of no meaningful difference. Low precision or small n can leave important effects unresolved.
- Testing a benchmark chosen after looking at the data makes the p-value difficult to interpret. μ₀ should come from the research question, specification, or prior plan.
Limits and independent validation
The calculator does not provide a confidence interval, standardized effect, power analysis, robust alternative, or diagnostic plot. Its conclusion is conditional on the selected α and tail.
When measurements are repeated on the same unit or drawn from clusters, the ordinary standard error is usually wrong. Use a paired, repeated-measures, or multilevel method appropriate to the design.
Before using the result
- Confirm the observational unit and independence, then visualize the sample for skew and influential values. Document exclusions before computing the test rather than removing observations to obtain a preferred result.
- Recalculate x̄, s, t, df, and the chosen t tail independently. Report enough information for replication and describe practical magnitude separately from statistical evidence.
Related modules and resources
See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-06. Verify consequential calculations independently.