T-Test Calculator
Run a one-sample, two-sample independent or paired t-test — from raw data or summary stats — and get the t-statistic, degrees of freedom, p-value, critical value and a plain-language conclusion, with a shaded t-distribution diagram.
T-test explained, step by step
A t-test asks whether an observed difference in means is bigger than random sampling would produce. Each card below covers one variant this calculator runs and shows the formula that drives it.
1. One-sample t-test — mean vs a reference
Use this when you have one sample and want to test whether its mean differs from a specific reference value μ₀. The calculator estimates the standard error from the sample SD and divides the observed gap by it.
2. Two-sample — Welch's (default) vs Student's pooled
Two independent groups: is one mean bigger than the other? Welch's does not assume equal variances and is the safer default. Student's pools the two SDs into one and needs the equal-variance assumption to hold.
3. Paired t-test — matched pairs
For before/after on the same subjects, twin studies or any matched design, compute the per-pair difference d = x₁ − x₂ and run a one-sample test on those differences against 0. Removing between-subject noise gives extra power.
4. From t to p-value and decision
The p-value comes from the Student t-distribution with the reported df. Compare p to α (usually 0.05): p ≤ α rejects the null. A large p only means the current sample lacks evidence — it never proves the null.
Features of this calculator
- Three tests on one page — one-sample, two-sample independent, and paired — with the same clean output structure.
- Accept either raw data (paste from a spreadsheet — supports commas, spaces, tabs, semicolons and mixed line endings) or already-computed summary statistics (mean, SD, n).
- Welch's t-test is the default for two-sample tests, with an explicit toggle for Student's pooled (equal-variance) t-test when you need it.
- Exact p-values from the Student t-distribution CDF via the regularised incomplete beta function — no crude table lookups.
- Shaded t-distribution diagram showing the rejection region and where your observed t falls.
- Full step-by-step working — pooled or Welch–Satterthwaite degrees of freedom, standard error, t and p — visible with one click.
- Copy the result panel as text or download it as a PNG.
Frequently asked questions
+One-tailed or two-tailed — which should I choose?
+What sample size do I need?
+Can I use the t-test if my data are not exactly normal?
+What does 'degrees of freedom' really mean?
+Should I report effect size along with the t-test?
Related calculators
Not sure which test you need? Browse all math calculators to find a related tool.