About the T-Test Calculator
What is the T-Test Calculator?
A two-sample t-test checks whether the means of two independent groups differ by more than chance would explain — for example, test scores of two teaching methods, or sales in two regions. The null hypothesis is that the two population means are equal.
This t-test calculator uses Welch's t-test, which does not assume the two groups have equal variances and is recommended as the default. Enter each group's mean, standard deviation and size; you do not need the raw data.
How to use the T-Test Calculator
- Group 1 Mean (sample: 78)
- Group 1 Standard Deviation (sample: 10)
- Group 1 Size (sample: 25)
- Group 2 Mean (sample: 72)
- Group 2 Standard Deviation (sample: 12)
- Group 2 Size (sample: 30)
- Alternative Hypothesis — two-tailed unless you decided in advance to test only one direction. (sample: Two-tailed (≠))
- Significance Level (α) — the significance level; 0.05 is standard. (sample: 0.05 (5%))
- Press Run T-Test (results also refresh as you type). The result card shows the p-value, along with t statistic, Degrees of freedom (Welch), Difference in means and Decision.
Formula used
t = (x̄₁ − x̄₂) ÷ √(s₁² ÷ n₁ + s₂² ÷ n₂)
- x̄₁, x̄₂ = the group means
- s₁, s₂ = the group standard deviations
- n₁, n₂ = the group sizes
- df = (s₁²/n₁ + s₂²/n₂)² ÷ [(s₁²/n₁)²/(n₁ − 1) + (s₂²/n₂)²/(n₂ − 1)] (Welch–Satterthwaite)
The p-value comes from the t-distribution with those degrees of freedom. Reject the null hypothesis when p < α.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Group 1 Mean | 78 |
| Group 1 Standard Deviation | 10 |
| Group 1 Size | 25 |
| Group 2 Mean | 72 |
| Group 2 Standard Deviation | 12 |
| Group 2 Size | 30 |
| Alternative Hypothesis | Two-tailed (≠) |
| Significance Level (α) | 0.05 (5%) |
| Result | Value |
|---|---|
| p-value | 0.048173 |
| t statistic | 2.0226 |
| Degrees of freedom (Welch) | 53 |
| Difference in means | 6 |
| Decision | Reject H₀ (significant at α = 0.05) |
Tips for using the T-Test Calculator
- Use a paired t-test instead when the same subjects are measured twice (before and after).
- The t-test assumes roughly normal data in each group, or reasonably large groups (about 30+).
- Report the difference in means alongside the p-value so readers see the size of the effect.
