Statistics & graphs · SL/HL

Two-Sample t-Test Calculator

Choose independent samples or paired measurements, then paste the two datasets.

Your values

Start with the example or enter your own values. Use a dot for decimals and e for scientific notation.

Two-Sample t-Test Calculator inputs

Calculated locally. No account or input upload.

Result & working

Example

The calculator is loading. The worked example is also shown below.

The formula

Welch: t = (x̄₁−x̄₂)/√(s₁²/n₁+s₂²/n₂)

paired: t = d̄/(s_d/√n)

What the variables mean
SymbolMeaning
pTwo-tailed probability under the null model.
dfDegrees of freedom.

When to use this calculator

Choose the test design before looking at the outcome. A statistical test does not repair poor sampling, lack of independence or confounding.

Worked example

The page opens with these example values. The result below is pre-generated for reference.

  1. x̄₁ = 12.04, s₁ = 0.2302173, n₁ = 5
  2. x̄₂ = 13.06, s₂ = 0.2408319, n₂ = 5
  3. t = (x̄₁−x̄₂)/√(s₁²/n₁+s₂²/n₂) = -6.845792
  4. Welch degrees of freedom ≈ 7.9838
  5. Two-tailed p ≈ 0.0001328.

t = -6.845792, p = 0.0001328

Common mistakes

  • Use paired analysis only when observations are meaningfully matched.
  • Statistical significance is not the same as biological importance.