How to use the one-sample t-test calculator
Compute the t statistic comparing a sample mean to a value. Enter sample mean, hypothesised mean, sample standard deviation, sample size in the fields above; the t statistic, degrees of freedom, approx. two-tailed p-value are computed instantly and plotted on the chart so you can see how the answer changes.
Formula
Variables
- m β Sample mean
- mu β Hypothesised mean
- s β Sample standard deviation
- n β Sample size
Worked example
With sample mean = 52, hypothesised mean = 50, sample standard deviation = 6, sample size = 36, the calculator gives t statistic β 2; degrees of freedom β 35; approx. two-tailed p-value β 0.04550013.
Frequently asked questions
What is the formula for the one-sample t-test calculation?
t statistic = (m-mu) / (s / β(n)). Degrees of freedom = n-1. Approx. two-tailed p-value = 2 Γ (1-ncdf(abs([t statistic]))). Here m is sample mean, mu is hypothesised mean, s is sample standard deviation, n is sample size.
What inputs do I need for the one-sample t-test calculator?
You need sample mean, hypothesised mean, sample standard deviation, sample size. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.
How do I use this calculator?
Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.
Is the result exact?
Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.