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.
Common searches this calculator answers include “is the mean different”, “hypothesis test”, “t value”, “calculate one-sample t-test”, “find t statistic”.
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 one-sample t-test calculator used for?
Compute the t statistic comparing a sample mean to a value. It helps with questions such as “is the mean different”, “hypothesis test”, “t value”.
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 the one-sample t-test 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 one-sample t-test 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.