Every Single CalculatorOne place for every calculator
÷Everyday math

Two-sample t-test calculator

Test whether two groups have different averages.

Example: You ran a trial with a treatment group and a control group.

Your numbers

  • t statistic0
  • Two-tailed p-value0
  • Verdict at the 5% level0
  • Degrees of freedom0
  • Pooled standard deviation0

How it is worked out

t = difference in means ÷ (pooled deviation × √(1 ÷ n₁ + 1 ÷ n₂))

A worked example

105 against 100, each with a deviation of 10 from 20 readings: t = 1.58, p = 0.12.

Good to know

  • Assumes the two groups have similar spread.

How we know this calculator is right

Before this calculator went on the site, 7 answers were worked out separately from its code, by hand or straight from the formula above. Each time this page loads, your own browser runs the calculator on those same numbers and compares. Turn on JavaScript to see the comparison.

See every check
Numbers usedResultWorked out separatelyThis calculator

What this proves: the calculator does the arithmetic of the formula shown, correctly. What it cannot prove: your measurements, or figures such as coverage per bag, waste and spacing, which are typical starting values you can change. Go by the product label and your local code.

Used by: students.