Two-Sample t-Test Calculator NZ
This calculator performs a two-sample t-test, comparing the means of two independent groups of data to assess whether they are meaningfully different. It is one of the most widely used statistical tests, applied whenever you want to know if two groups differ: a treatment group versus a control, two products, two regions, before and after a change measured on different subjects. The t-test produces a t statistic that measures the difference between the two group means relative to the variability within the groups. A large t, well away from zero, suggests the means genuinely differ; a small t suggests any difference could be chance. This tool uses Welch's t-test, the more robust version that does not assume the two groups have equal variances, which is the recommended default in modern statistics. You paste the values for each group into the two boxes, and the calculator returns the t statistic, the mean of each group, and the Welch degrees of freedom. The results update as you type. Use it to compare two sets of measurements, for research and experiments, or for statistics study. To complete the test, compare the t statistic against the critical value from the t distribution at your significance level and the calculated degrees of freedom, or find the p-value; if the magnitude of t exceeds the critical value, the difference between the means is statistically significant. This calculator provides the t statistic and degrees of freedom, the parts that come from your data. Welch's degrees of freedom are usually not a whole number, which is normal. The test assumes the data within each group is roughly normally distributed and the two samples are independent of each other.
Welch's t-test does not assume equal variances. t = (mean1 - mean2) / sqrt(s1²/n1 + s2²/n2). Compare against a t table at the given df. Assumes independent, roughly normal samples.
How it works
The calculator finds the mean and sample variance of each group. Welch's t statistic is the difference between the two means divided by the square root of the sum of each variance divided by its sample size. The Welch degrees of freedom come from a formula combining the two variances and sample sizes, and are usually not a whole number.
Worked example
For group 1 (5, 7, 6, 8, 7) with mean 6.6 and group 2 (9, 11, 10, 12, 8) with mean 10, the variances are about 1.3 and 2.5. Welch's t is (6.6 minus 10) divided by the square root of 1.3 over 5 plus 2.5 over 5, which is about minus 3.9, with roughly 7.27 degrees of freedom.
Related calculators
- Standard Deviation: spread of data.
- Confidence Interval: interval for a mean.
- Standard Error: precision of the mean.
- Mean Median Mode: averages.