T-Test Calculator (One-Sample, Two-Sample, Paired)

Run a t-test from raw data or summary statistics, with the working and an APA sentence.

Which t-test do I need?

Choosing a t-test
Situation Test Example
One group compared with a known or claimed value One-sample t-test Is the average battery life different from the advertised 5 hours?
Two separate groups compared with each other Two-sample (independent) t-test Do students taught with method A score differently from those taught with method B?
The same people measured twice, or matched pairs Paired t-test Did blood pressure change between before and after treatment?

Choose the tab for your test, enter your data (one value per number, separated by spaces, commas or new lines), or use the summary tabs if you already know the mean, standard deviation and sample size. Set the alternative hypothesis: two-tailed if any difference matters, and one-tailed only if you chose a direction before looking at the data.

Worked examples with the default numbers

  • One-sample: ten battery-life readings with mean 5.50 are tested against μ₀ = 5. The result is t(9) = 4.33, p = .002, d = 1.37, so the mean differs significantly from 5.
  • Two-sample (Welch): two groups of 8 with means 14.50 and 11.38 give t(12.41) = 2.97, p = .011, d = 1.49. The pooled version gives t(14) = 2.97, p = .010.
  • Paired: eight before and after scores give t(7) = 9.03, p < .001, d = 3.19.

Formulas

  • One-sample: t = (x̄ − μ₀) ÷ (s ÷ √n), with n − 1 degrees of freedom.
  • Two-sample, Welch: t = (x̄₁ − x̄₂) ÷ √(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite degrees of freedom.
  • Two-sample, pooled: t = (x̄₁ − x̄₂) ÷ (sp × √(1/n₁ + 1/n₂)), with n₁ + n₂ − 2 degrees of freedom.
  • Paired: a one-sample test on the differences, with n − 1 degrees of freedom.
  • Cohen’s d is the mean difference divided by the standard deviation (pooled for two samples). Around 0.2 is small, 0.5 medium and 0.8 large.

Assumptions

The observations should be independent (apart from the pairs in a paired test) and the data roughly normal, which matters most for small samples. Welch’s test is the safer default for two groups, because it does not assume equal variances. If your data are strongly skewed or ordinal, a rank-based test such as Mann-Whitney U may suit better.

How to report the result (APA)

Give the t statistic with its degrees of freedom, the p-value and the effect size, for example: t(9) = 4.33, p = .002, d = 1.37. The calculator writes this for you. To look up critical values, see the t-table, or use the critical value calculator.

How to cite this page

CalcPulse. (2026). T-Test Calculator. https://calcpulse.com/t-test-calculator/

Frequently asked questions

What is a t-test?

A test that compares means. It tells you whether the difference between a sample mean and a value, or between two means, is larger than chance would explain.

When should I use a paired t-test?

When each value in one group is linked to a value in the other, such as the same people before and after, or matched pairs.

What is the difference between Welch's t-test and the pooled t-test?

The pooled test assumes both groups have the same variance. Welch's test does not, and it is the safer choice unless you have a reason to assume equal variances.

What does the p-value mean?

The probability of seeing a difference at least this large if the null hypothesis were true. A value below your alpha, usually 0.05, is called statistically significant.

How do I know the sample size is big enough?

Use the sample size calculator. As a rule, very small samples have little power to detect a real difference.

Last updated