T-Test Calculator

Run any of the three t-tests from raw data or from summary statistics: independent samples, paired samples or one sample. Every result includes the t statistic, degrees of freedom, exact p-value, a confidence interval, Cohen’s d, the t-distribution with its rejection region, and a ready-to-paste APA sentence.

Which t-test do I need?

TestYour dataExample
Independent samplesTwo separate groups of people or thingsExam scores of students taught online vs in class
Paired samplesThe same people measured twice, or matched pairsBlood pressure before and after a treatment
One sampleOne group compared with a known or claimed valueIs the average fill of a 500 ml bottle really 500 ml?

Not sure? Use the test chooser. If your data are clearly skewed or ranked, the Mann-Whitney U test and the Wilcoxon signed-rank test are the nonparametric alternatives.

Why Welch’s t-test is the default

For two independent groups this calculator uses Welch’s t-test unless you tick “Assume equal variances”. Welch’s test does not assume the two groups have the same spread. When they do, it gives almost the same answer as Student’s t-test; when they don’t, Student’s test can give misleading p-values. That’s why many statisticians recommend Welch’s test as the default. A Brown–Forsythe (Levene) test is shown so you can check the variances yourself.

Formulas

Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂) · Paired: t = d̄ ÷ (s_d/√n) · One sample: t = (x̄ − μ₀) ÷ (s/√n)

How to read the results

  • p-value: the probability of a difference at least this large if there were really no difference. If p ≤ α (usually 0.05), the result is statistically significant.
  • Confidence interval: the range of plausible values for the true mean difference. If it excludes 0, the result is significant at that level.
  • Cohen’s d: the size of the difference in standard-deviation units. Roughly 0.2 is small, 0.5 medium and 0.8 large. Statistical significance tells you an effect is probably real; d tells you whether it is big enough to matter.

Frequently asked questions

Can I run a t-test with only means and standard deviations?

Yes. Switch “Data entry” to Summary statistics and enter each group’s mean, SD and sample size. This is useful for checking published results.

One-tailed or two-tailed?

Use two-tailed unless you decided, before seeing the data, that only a difference in one direction matters. A one-tailed test chosen after looking at the data overstates the evidence.

How many participants do I need?

Use the power analysis calculator. To detect a medium effect (d = 0.5) with 80% power at α = 0.05 you need 64 people per group.