T-Test Calculator
Run a one-sample or two-sample t-test from summary statistics: t, degrees of freedom and p-values, with Student's or Welch's test.
Change the values and press Calculate to work out your own figures.
One-sample t-test
Compare a sample mean with a population mean.
Show the working
- t = difference ÷ standard error = 2.083333333
- df = 24
- p = 2 × P(T > |t|) = 0.04804409326
Two-sample t-test (unpaired)
Compare the means of two independent samples.
Show the working
- t = difference ÷ standard error = -1.20879577
- df = 28
- p = 2 × P(T > |t|) = 0.2368505634
How to use it
Compare a sample mean with a population mean. Compare the means of two independent samples.
Probabilities can be typed as decimals, fractions or percentages. Show the working gives the formula with your numbers in it.
Key facts
t = (x̄₁ − x̄₂) ÷ SE; pooled s_p² = ((n₁−1)s₁² + (n₂−1)s₂²) ÷ (n₁+n₂−2)
Student's or Welch's?
Student's test assumes the two populations have the same variance. Welch's test doesn't and adjusts the degrees of freedom; many statisticians use it by default.
Questions
What does the p-value tell me?
How surprising the difference would be if the population means were equal.
Do I need the raw data?
No; the means, standard deviations and sizes are enough.
Formulas
t = (x̄₁ − x̄₂) ÷ SE; pooled s_p² = ((n₁−1)s₁² + (n₂−1)s₂²) ÷ (n₁+n₂−2)
Sources
Limitations
- Probabilities can be typed as decimals (0.25), fractions (1/4) or percentages (25%).