t-Test Calculator
Paste one or two samples and run a one-sample, paired or two-sample t-test (Welch or pooled): t, degrees of freedom, p-value, confidence interval and Cohen’s d.
The test statistic, exact degrees of freedom, a one- or two-sided p-value, a confidence interval for the mean or the difference, and an effect size, with the formula used stated.
Example: A: 20 22 19 24 21 and B: 25 27 24 28 26 give a mean difference of −4.8, Welch t = −4.31 with 7.71 degrees of freedom and a two-sided p of 0.0028 — significant at the 5 % level.
Is the difference
more than noise?
The three tests, why Welch is the default, and how to read p, the interval and d.
Three tests
One-sample: is the mean of a sample different from a stated value μ₀? t = (x̄ − μ₀) / (s/√n) with n − 1 degrees of freedom. Paired: two measurements on the same units (before/after) — the differences are taken and the one-sample test is run on them. Two-sample: two independent groups. With Welch's version the standard error is √(s₁²/n₁ + s₂²/n₂) and the degrees of freedom come from the Welch–Satterthwaite formula, usually not a whole number; the pooled version assumes equal variances and uses n₁ + n₂ − 2. Welch is the default because it costs almost nothing when the variances are equal and is right when they are not.
p, the interval, and d
The p-value is the probability, if the true difference were zero, of a t at least as extreme as the one observed; it is computed from the t distribution (regularised incomplete beta), not read from a table. Two-sided is the default; choose one-sided only when the direction was fixed before the data were seen. “Significant” just means p is below the α you set. The confidence interval for the mean (or the difference) says how large the effect could plausibly be, and Cohen's d — the difference in pooled standard-deviation units — says how large it is regardless of sample size.
Assumptions and limits
The t-test assumes independent observations and, for small samples, a population that is roughly normal; the page flags n below 30. It does not test more than two groups, proportions (see A/B Test) or non-parametric alternatives. Values are split on spaces, commas, semicolons and line breaks; tokens that are not numbers are ignored and listed. Nothing leaves the browser; the same four anonymous usage counts as the rest of the site apply.
SOURCES
- Welch, B. L. (1947). The generalization of “Student’s” problem when several different population variances are involved. Biometrika 34, 28–35
- NIST/SEMATECH e-Handbook of Statistical Methods, §7.3.1 — do two processes have the same mean?
Last reviewed 19 September 2026. How results are checked: How we verify.