What is a Two-Sample t-Test?
A two-sample t-test checks whether the means of two independent groups differ significantly. This calculator uses Welch's t-test, which does not assume the two groups have equal variances, making it the safe default in most real-world situations. From the two sample means, standard deviations, and sizes it returns the t-statistic, the standard error of the difference, and the Welch-Satterthwaite degrees of freedom.
How to Use It
Enter the mean, standard deviation, and number of observations for each of your two samples. Press calculate to get the t-statistic. Compare the magnitude of t against the critical value from a t-distribution table (using the reported degrees of freedom) or convert it to a p-value to decide whether to reject the null hypothesis that the two means are equal.
The Formula Explained
The t-statistic is the difference in means divided by the standard error of that difference: $$t = \dfrac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^{2}}{n_1} + \dfrac{s_2^{2}}{n_2}}}$$. The denominator measures how much sampling variation we expect in the difference. A larger \(|t|\) means the observed gap is large relative to noise, suggesting a real effect.
Worked Example
Suppose group A has mean 10.5, SD 2.5, n = 30, and group B has mean 9.0, SD 3.0, n = 30. The variance terms are \(6.25/30 = 0.2083\) and \(9/30 = 0.3\). Their sum is \(0.5083\), so the standard error is \(\sqrt{0.5083} \approx 0.7130\). The difference is \(1.5\), giving $$t = \dfrac{1.5}{0.7130} \approx 2.104$$ with roughly 56 degrees of freedom.
FAQ
Why Welch's test instead of Student's? Welch's test stays accurate even when the two groups have different variances or unequal sample sizes, while Student's pooled test can mislead in those cases.
Is a t-value of 2.1 significant? At a 0.05 two-tailed level with ~56 df, the critical value is about 2.00, so \(|t| = 2.1\) is just past the threshold — borderline significant.
What if the groups are paired? Use a paired t-test instead; this calculator assumes the two samples are independent.