Two-Sample T-Test Calculator
Two-Sample T-Test Calculator
Enter the mean, standard deviation, and sample size for each of your two independent groups. This calculates the t-statistic and p-value using Welch's t-test, which does not assume the two groups have equal variances — the safer, more general default for real-world comparisons where variances are rarely identical.
- Formula: t = (mean1 − mean2) ÷ √(SD1²/n1 + SD2²/n2), with degrees of freedom computed via the Welch-Satterthwaite equation (which is why df often comes out as a non-whole number).
- Why Welch's test instead of the classic (pooled) t-test: the classic version assumes both groups have the same population variance, an assumption that's often wrong in practice — Welch's version adjusts automatically and is considered the more robust default by most modern statistical guidance.
- Independent samples only: this test assumes the two groups are unrelated (e.g. different people) — comparing before/after measurements on the same subjects calls for a paired t-test instead, which is a different calculation.
Why is the degrees of freedom not a whole number?
Welch's t-test computes an adjusted degrees of freedom that blends both groups' sample sizes and variances, which generally produces a decimal value rather than the simple n1 + n2 − 2 used by the classic pooled-variance t-test.
What if my two groups have very different sample sizes?
Welch's t-test handles unequal sample sizes (and unequal variances) correctly by design, so unbalanced groups are not a problem — just enter each group's actual size.
Two-Sample T-Test Calculator


Enter the mean, standard deviation, and sample size for each of your two independent groups. This calculates the t-statistic and p-value using Welch's t-test, which does not assume the two groups have equal variances — the safer, more general default for real-world comparisons where variances are rarely identical.

- Formula: t = (mean1 − mean2) ÷ √(SD1²/n1 + SD2²/n2), with degrees of freedom computed via the Welch-Satterthwaite equation (which is why df often comes out as a non-whole number).
- Why Welch's test instead of the classic (pooled) t-test: the classic version assumes both groups have the same population variance, an assumption that's often wrong in practice — Welch's version adjusts automatically and is considered the more robust default by most modern statistical guidance.
- Independent samples only: this test assumes the two groups are unrelated (e.g. different people) — comparing before/after measurements on the same subjects calls for a paired t-test instead, which is a different calculation.
Why is the degrees of freedom not a whole number?
Welch's t-test computes an adjusted degrees of freedom that blends both groups' sample sizes and variances, which generally produces a decimal value rather than the simple n1 + n2 − 2 used by the classic pooled-variance t-test.
What if my two groups have very different sample sizes?
Welch's t-test handles unequal sample sizes (and unequal variances) correctly by design, so unbalanced groups are not a problem — just enter each group's actual size.
