T-Test Calculator

Test whether a mean differs from a value, or whether two group means differ, from means, standard deviations and sample sizes.

What Do You Want to Find?
Fractions and decimals both work.
t-statistic
Degrees of freedom
P-value
Standard error
95% confidence interval for the difference
At α = 0.05
Work

Saved Calculations

Items you add are saved in this browser.

NameCalculationResultRemove

How the t-Test Works

One sample: t = (x̄ − μ₀) ÷ (s ÷ √n), df = n − 1
Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), df = (s₁²/n₁ + s₂²/n₂)² ÷ [(s₁²/n₁)²/(n₁−1) + (s₂²/n₂)²/(n₂−1)]

Welch’s test doesn’t assume equal variances and is the default in R’s t.test.

Worked Example

Tips

t-tests assume roughly normal data (or large samples) and independent observations. For paired data (before/after on the same people), run a one-sample test on the differences with μ₀ = 0.