One-Sample t-Test Calculator
Test whether a population mean equals μ₀ when σ is unknown. Returns t, p-value, df, confidence interval, Cohen's d, and a t density plot.
Nonparametric alternatives: Wilcoxon signed-rank and sign test. Power planning: statistical power calculator.
Related Calculators
t Confidence Interval Calculator
Build t intervals for one mean or two means (pooled or Welch), matching TInterval and 2-SampTInt.
T-Test Calculator
Compare sample means with common t-test workflows and interpretable outputs.
tcdf Calculator
Evaluate tcdf(lower, upper, df) and turn any t statistic into one- and two-tailed p-values.
Learn More
T-Test in R and Python: t.test() and scipy.stats
Run one-sample, two-sample, Welch and paired t-tests in R and Python side by side, see why the default variance option differs and how one outlier can flip the result: checked against SciPy.
Normality Tests Explained: Shapiro-Wilk and Q-Q Plots
How to check whether data are normal with Shapiro-Wilk, Q-Q plots and skewness, the small- and large-sample traps, and what to do when the data are not normal.
Hypotheses
H₀: μ = μ₀ versus Hₐ: μ ≠ μ₀, μ < μ₀, or μ > μ₀. The test assumes a random sample and approximate normality (or n large enough for the CLT).
Excel, R, Python, TI-84
- Excel: no one-sample T.TEST, compute t = (x̄−μ₀)/(Sx/√n) and use T.DIST.2T(ABS(t), n−1).
- R:
t.test(x, mu = μ₀). - Python:
scipy.stats.ttest_1samp(x, popmean=μ₀). - TI-84: STAT → TESTS → 2:T-Test.
Worked example (Load example)
n = 16, x̄ = 52.3, Sx = 4.8, μ₀ = 50 → t = 1.9167, p = 0.074533 (two-sided), 95% CI (49.7423, 54.8577).
Related guides and calculators
To compare two means use the two-sample t-test or, for before-and-after data, the paired t-test. The effect size calculator reports Cohen's d, the statistical power calculator plans the sample, and the Shapiro-Wilk test checks normality. Step-by-step guides: t-test in Excel and t-test in R and Python.
Frequently Asked Questions
When should I use a one-sample t-test?
When σ is unknown and you test one mean against a fixed μ₀ with roughly normal data or moderate n.
What does the p-value mean?
Probability of a t statistic at least as extreme as yours if H₀ were true.
Can I use summary statistics only?
Yes, enter x̄, Sx, and n like the TI-84 Stats option.
What if normality fails?
Consider Wilcoxon signed-rank or sign tests linked above, especially for small skewed samples.
Why is t used instead of z?
Replacing unknown σ by Sx adds uncertainty; t has heavier tails.
How is Cohen's d reported here?
d_z style: (x̄ − μ₀) / Sx on the original scale, not the paired-difference version unless you enter difference scores.
Does the CI match the t-test?
The two-sided CI at level 1−α contains all μ₀ that would not be rejected at α for a two-sided test.
How do I share inputs?
Use Copy link: raw data presets use the data= parameter shown in the functional tests.
Embed This Calculator
Add this free calculator to your course page or LMS.
Adjust the height value to fit your page.