Interactive module guide
One Sample T Test Calculator — Free & Interactive
This one sample t test calculator evaluates a population mean when the population standard deviation is unknown and estimated from the sample.
Free · No sign-up · Calculations stay in your browser
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.
Use the one sample t test calculator when one numerical sample is compared with a target mean and population variability must be estimated from that sample.
When to use this one sample t test calculator
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.
Example preview
Battery life against a target
- Inputs
- Eight observations, x̄=10.125, s≈0.316, μ₀=10; two-sided t test.
- Representative result
- t≈1.12 with df=7; the p-value is above 0.05.
Illustrative only. Load the interactive tool to enter your own values and review assumptions.
Watch the explanation
3:45 minThe player loads only after you press play. You can also watch on YouTube.
Read the complete transcript
The One-Sample t-Test. Does an eight-battery sample show the mean differs from ten hours?
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.
The statistic t equals x bar minus mu naught divided by s divided by square root of n uses the estimated standard error of the sample mean. Under an independent normal sample and H naught, it follows a Student t distribution with n minus 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 naught. It measures compatibility between data and the complete null model; it does not give the probability of H naught, the probability results arose “by chance,” or the size of the effect. Use the test for one sample of quantitative observations and a pre-specified comparison mean mu naught. The observations should represent independent experimental units or a sampling design whose dependence has already been handled. Report t with n minus 1 degrees of freedom and the p-value. The sign shows whether x bar is above or below mu naught under the subtraction order. The magnitude expresses the difference in estimated standard-error units. Rejecting H naught means the result crosses the selected alpha 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.
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 naught, mu equals 10 hours against a two-sided alternative at alpha equals 0.05. The population standard deviation is not known. Enter the eight observations, set population mean to 10, and choose Two-tailed. The calculator obtains x bar equals 10.125 hours, s approximately 0.311 hours, and standard error s divided by square root of 8 approximately 0.110. The difference, 10.125 minus 10, divided by 0.110 gives t approximately 1.14 with 7 degrees of freedom. The two-sided p-value is approximately 0.292, so this sample does not cross the planned rejection threshold. Check 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.
At the 5 percent 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.
Try it free at Distri Scope dot com.
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.
How to use the one sample t test calculator
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.” Report the displayed t confidence interval to show that uncertainty explicitly.
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 provides a t confidence interval and standardized effect, but it does not provide a diagnostic plot or a robust one-sample estimator. Prospective power is available through the separate planning utility.
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
Explore Other Hypothesis Tests
- One Sample Z-Test Calculator
- One Sample T-Test Calculator
- Two Sample Z-Test Calculator
- Two Sample T-Test Calculator
- Paired T-Test Calculator
- One-Way ANOVA Calculator
- Two-Way ANOVA with Replication
- Chi-Square Test Calculator
- Chi-Square Goodness-of-Fit Test
- F-Test Calculator
- One-Proportion Z-Test
- Two-Proportion Z-Test
- Exact Binomial Test
- Fisher’s Exact Test
- McNemar Test
- Mann-Whitney U Test
- Wilcoxon Signed-Rank Test
- Sign Test
- Kruskal-Wallis Test
- Friedman Test
- Pearson Correlation Test
- Spearman Correlation Test
- Kendall Tau Test
- Levene Test
- Brown-Forsythe Test
- Welch ANOVA
- Repeated Measures ANOVA
- TOST Equivalence Test
- Power & Sample Size
- Confidence Interval Calculator
- Critical Value Lookup
See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.