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.
Calculated locally. No account or input upload.
Result & working
ExampleThe calculator is loading. The worked example is also shown below.
Step-by-step working
The formula
Welch: t = (x̄₁−x̄₂)/√(s₁²/n₁+s₂²/n₂)
paired: t = d̄/(s_d/√n)
| Symbol | Meaning |
|---|---|
| p | Two-tailed probability under the null model. |
| df | Degrees 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.
- x̄₁ = 12.04, s₁ = 0.2302173, n₁ = 5
- x̄₂ = 13.06, s₂ = 0.2408319, n₂ = 5
- t = (x̄₁−x̄₂)/√(s₁²/n₁+s₂²/n₂) = -6.845792
- Welch degrees of freedom ≈ 7.9838
- 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.