Statistics & Probability

T-Test Calculator (Two Samples, Welch or Pooled)

Paste the two samples and choose the test and alternative hypothesis.

Your numbers

Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.
Separate numbers with commas, spaces or new lines. You can paste a column from a spreadsheet.

Your results

t statistic
t statistic
—
Degrees of freedom
—
p-value
—
Conclusion
—
Mean A
—
Mean B
—
Difference in means
—

T-Test Calculator (Two Samples, Welch or Pooled) by TheCalcTools

How the T-Test Calculator (Two Samples, Welch or Pooled) works

A two-sample t-test asks whether two group means differ more than chance would explain. t = (mean A − mean B) ÷ standard error. Welch’s version does not assume equal variances and adjusts the degrees of freedom (Welch–Satterthwaite); Student’s version pools the variances.

The p-value is the probability of a t at least this extreme if the true means were equal. The calculator computes it exactly from the t distribution.

The formula

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

Worked example

Using the default values shown in the calculator:

Sample A12.1, 14.3, 13.8, 15.2, 12.9, 14.7, 13.5, 15.9
Sample B11.2, 12.8, 12.1, 13.0, 11.9, 12.4, 13.3, 11.5
TestWelch (unequal variances, recommended)
Alternative hypothesisTwo-sided: means differ
Significance level α0.05
  1. Means 14.0500 and 12.2750: t = 3.4865 with 11.40 degrees of freedom.
  2. p = 0.004831. Reject the null hypothesis at α = 0.05: the difference is statistically significant.

Result:

t statistic3.4865
Degrees of freedom11.40
p-value0.004831
ConclusionReject the null hypothesis at α = 0.05: the difference is statistically significant
Mean A14.0500
Mean B12.2750
Difference in means1.7750

Frequently asked questions

Welch or Student?

Welch’s test is the safer default: it is nearly as powerful when variances are equal and much more reliable when they are not.

Does the data need to be normal?

Roughly, for small samples. With 30 or more per group the test is robust to moderate skew.

Sources and further reading

More in Statistics & Probability · All calculators

This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.