Two-Sample T-Test Calculator

Group 1

Group 2

t statistic1.419
Mean difference3.50
Standard error2.4666
Degrees of freedom47
Critical value2.021
Cohen's d0.40
VerdictFail to reject H0 at alpha = 0.05 (two-tailed)
How this was calculated
  1. Method: Welch (unequal variances). Standard error of the difference: 2.4666.
  2. t = (72.40 - 68.90) / 2.4666 = 1.419, with df = 47.
  3. Critical value from the t table: 2.021. Cohen's d = 0.40 measures the standardized effect size.
  4. Since |1.419| is not greater than 2.021, the verdict is: Fail to reject H0 at alpha = 0.05 (two-tailed).

Our two sample t test calculator compares the means of two independent groups and tells you whether the difference between them is statistically significant. The two-sample t statistic is the difference in means divided by the standard error of the difference. This calculator compares |t| with the tabulated critical value and states the verdict rather than printing an approximate p-value. You can choose between two versions: Welch's version, which does not assume equal variances and uses the Welch-Satterthwaite degrees of freedom, or the pooled version, which combines both variances and uses n1 + n2 - 2 degrees of freedom. It also reports Cohen's d, which expresses the difference in pooled standard deviations: 0.2 small, 0.5 medium, 0.8 large by the usual conventions.

The two-sample t test is the accepted standard for comparing two independent means because it accounts for sample variability and sample size, and the choice between Welch's and pooled versions lets you match the method to whether the two groups have equal variances. For a Welch's worked check, means 72.4 and 68.9, SDs 8.1 and 9.3, and n = 25 each give t = 1.419 on 47 degrees of freedom against a critical value of 2.021 at alpha 0.05 two-tailed, so the null hypothesis is not rejected; Cohen's d is 0.40. For a pooled worked check, means 55.2 and 49.8, SDs 6.4 and 7.1, and n = 18 and 20 give t = 2.452 on 36 degrees of freedom against 2.042, so the null hypothesis is rejected; Cohen's d is 0.80. This page shows the formula, step-by-step workings, worked examples and sources.

Worked examples

Welch: two classes' test scores

Primary result: 1.419 — short of the 2.021 critical value, so the 3.50-point gap is not significant. (72.4 · 8.1 · 25 · 68.9 · 9.3 · 25 · Welch (unequal variances) · 0.05 · Two-tailed)

t statistic1.419
Mean difference3.50
Standard error2.4666
Degrees of freedom47
Critical value2.021
Cohen's d0.40
VerdictFail to reject H0 at alpha = 0.05 (two-tailed)

Pooled: treatment vs control

Primary result: 2.452 — beyond the 2.042 critical value, so H0 is rejected. (55.2 · 6.4 · 18 · 49.8 · 7.1 · 20 · Pooled (equal variances) · 0.05 · Two-tailed)

t statistic2.452
Mean difference5.40
Standard error2.2023
Degrees of freedom36
Critical value2.042
Cohen's d0.80
VerdictReject H0 at alpha = 0.05 (two-tailed)

Welch, one-tailed

Primary result: -0.894 — group 1 scored lower, but nowhere near significantly. (88.5 · 12 · 30 · 91.2 · 11 · 28 · Welch (unequal variances) · 0.05 · One-tailed)

t statistic-0.894
Mean difference-2.70
Standard error3.0202
Degrees of freedom55
Critical value1.684
Cohen's d-0.23
VerdictFail to reject H0 at alpha = 0.05 (one-tailed)

How this two-sample t-test calculator works

This two sample t test calculator follows the standard statistical workflow: it builds the standard error, computes the t statistic, determines the degrees of freedom, compares the result against a critical value, and reports the verdict. The two-sample t statistic is the difference in means divided by the standard error of the difference. This calculator compares |t| with the tabulated critical value and states the verdict rather than printing an approximate p-value, which keeps the conclusion clear and avoids misleading precision.

To see the Welch version step by step, consider the worked check with means 72.4 and 68.9, SDs 8.1 and 9.3, and n = 25 each. The calculator first builds the standard error of the difference from the two sample variances. Because Welch's version does not assume equal variances, it uses the Welch-Satterthwaite degrees of freedom rather than a simple count. Dividing the mean difference by that standard error gives t = 1.419 on 47 degrees of freedom. Against a critical value of 2.021 at alpha 0.05 two-tailed, the absolute value of t falls below the threshold, so the null hypothesis is not rejected. Cohen's d is 0.40, which sits between the small (0.2) and medium (0.5) conventions.

The pooled version takes a different path. It combines both variances into one estimate and uses n1 + n2 - 2 degrees of freedom. In the pooled worked check, means 55.2 and 49.8, SDs 6.4 and 7.1, and n = 18 and 20 produce t = 2.452 on 36 degrees of freedom. The critical value is 2.042, so |t| exceeds it and the null hypothesis is rejected. Here Cohen's d is 0.80, matching the large-effect convention of 0.8.

Cohen's d expresses the difference in pooled standard deviations: 0.2 small, 0.5 medium, 0.8 large by the usual conventions. Reporting it alongside the t verdict helps you judge whether a statistically significant result also carries a meaningful effect size, or whether a non-significant result might still reflect a real difference that the study was underpowered to detect.

Welch vs pooled: which should you use?

When you use a two sample t test calculator, you typically choose between Welch's version and the pooled version. Both compute the two-sample t statistic, which is the difference in means divided by the standard error of the difference. The key distinction is how each handles variance. Welch's version does not assume equal variances and uses the Welch-Satterthwaite degrees of freedom. The pooled version combines both variances and uses n1 + n2 - 2 degrees of freedom.

Welch's version is the safer default when variances or group sizes differ. Because it does not require the equal-variance assumption, it protects against incorrect results when one group is more spread out than the other or when the sample sizes are unbalanced. The tradeoff is that the pooled version has slightly more power when variances truly are equal. If you have strong reason to believe the population variances match and your group sizes are similar, the pooled version can detect a true difference more reliably. In most real-world datasets, however, that assumption is uncertain, so Welch's version is the better starting point.

This calculator compares |t| with the tabulated critical value and states the verdict rather than printing an approximate p-value. It also reports Cohen's d, which expresses the difference in pooled standard deviations. By the usual conventions, 0.2 is small, 0.5 is medium, and 0.8 is large. The worked checks below illustrate how each version behaves in practice.

VersionMeansSDsSample sizestdfCritical value (alpha 0.05, two-tailed)VerdictCohen's d
Welch72.4 and 68.98.1 and 9.325 each1.419472.021Not rejected0.40
Pooled55.2 and 49.86.4 and 7.118 and 202.452362.042Rejected0.80

Reading the verdict and Cohen's d

When you run a two sample t test calculator, the core output is a verdict: reject or do not reject the null hypothesis. This calculator compares the absolute value of your t statistic against a tabulated critical value and states the verdict directly, rather than printing an approximate p-value. If the absolute t exceeds the critical value at your chosen alpha level, the difference is statistically significant. If it does not, the verdict is that you fail to reject the null. That phrasing matters, because a non-significant result is not proof of no difference between the groups — it only means your data did not provide enough evidence to rule out chance as the explanation.

The two-sample t statistic is the difference in means divided by the standard error of the difference. The calculator handles two variants. Welch's version does not assume equal variances and uses the Welch-Satterthwaite degrees of freedom. The pooled version combines both variances and uses n1 + n2 - 2 degrees of freedom. In the Welch worked check, means of 72.4 and 68.9, standard deviations of 8.1 and 9.3, and sample sizes of 25 each produce t = 1.419 on 47 degrees of freedom. Against a critical value of 2.021 at alpha 0.05 two-tailed, the null hypothesis is not rejected. In the pooled worked check, means of 55.2 and 49.8, standard deviations of 6.4 and 7.1, and sample sizes of 18 and 20 produce t = 2.452 on 36 degrees of freedom. Against a critical value of 2.042, the null hypothesis is rejected.

Statistical significance, however, is not the same as practical importance. A study with a very large sample can detect tiny, trivial differences as significant, while a small study may miss a difference that actually matters in the real world. This is why the calculator also reports Cohen's d alongside the verdict. Cohen's d expresses the difference in pooled standard deviations, giving you a standardized measure of how far apart the two group means are, regardless of sample size.

By the usual conventions, a Cohen's d of 0.2 is considered small, 0.5 is medium, and 0.8 is large. In the Welch worked check above, the non-significant result pairs with a Cohen's d of 0.40, a small-to-medium effect. In the pooled worked check, the significant result pairs with a Cohen's d of 0.80, a large effect. Reading the two together gives a fuller picture: the verdict tells you whether the evidence clears the bar for statistical significance, while Cohen's d tells you whether the difference is large enough to care about in practice.

Assumptions and common mistakes

A two sample t test calculator gives trustworthy results only when the data meet the test's core assumptions. Independence is the most important requirement: each observation in the first sample must be unrelated to each observation in the second sample. The two-sample t statistic is the difference in means divided by the standard error of the difference, and it relies on this independence to produce a valid result. When observations are linked, matched, or repeated on the same subjects, a paired test is required instead. Running a two-sample test on paired data ignores the correlation between the groups and typically produces misleading conclusions.

Approximate normality is the second key assumption. The values within each group should be roughly normally distributed, though the test is fairly robust to moderate departures from normality, especially with larger sample sizes. A related decision is whether the two groups have equal variances. Welch's version does not assume equal variances and uses the Welch-Satterthwaite degrees of freedom, while the pooled version combines both variances and uses n1 + n2 - 2 degrees of freedom. Choosing the wrong version can affect the outcome, and many statisticians recommend defaulting to Welch's version unless there is a strong reason to believe the variances are equal.

A common mistake is entering the wrong type of data. Some calculators accept only summary statistics such as means, standard deviations, and sample sizes, while others accept raw data. Mixing these up leads to errors or prevents the calculation from running entirely. When using summary statistics, double-check that each value is entered in the correct field and belongs to the right group. Another frequent error involves interpreting the output. This calculator compares |t| with the tabulated critical value and states the verdict rather than printing an approximate p-value, so users should read the stated decision rather than expecting a specific p-value.

Effect size is another area where mistakes arise. Cohen's d expresses the difference in pooled standard deviations, and the usual conventions classify 0.2 as small, 0.5 as medium, and 0.8 as large. A statistically significant result does not automatically mean a practically large effect. For example, in the worked Welch check with means 72.4 and 68.9, SDs 8.1 and 9.3, and n = 25 each, the result is t = 1.419 on 47 degrees of freedom against a critical value of 2.021 at alpha 0.05 two-tailed, so the null hypothesis is not rejected. Cohen's d is 0.40, which falls between small and medium. In the pooled worked check with means 55.2 and 49.8, SDs 6.4 and 7.1, and n = 18 and 20, the result is t = 2.452 on 36 degrees of freedom against 2.042, so the null hypothesis is rejected. Cohen's d is 0.80, a large effect. Both the statistical verdict and the effect size should be reported together for a complete picture.

Always confirm that your two groups are independent before using a two-sample test. If the same subjects appear in both groups, use a paired t-test instead.

FAQs

What is the difference between Welch and pooled t-tests?

Welch allows unequal variances and adjusts the degrees of freedom. Pooled assumes equal variances and uses n1 + n2 - 2 degrees of freedom. Choose Welch when the two groups have different spreads; choose pooled only when you can assume their variances are equal.

What does it mean if t is smaller than the critical value?

The difference is not statistically significant at the chosen alpha: the null hypothesis is not rejected. There is not enough evidence to conclude the two group means differ. You fail to reject the null, meaning the observed difference could reasonably be due to chance alone.

Why does this calculator not show a p-value?

It compares |t| with the exact tabulated critical value and states the verdict, which is equivalent at the chosen alpha. The result tells you whether the difference is significant at your selected level. This approach gives the same conclusion a p-value would, without requiring interpolation or distribution software.

What is Cohen's d in a t-test?

Cohen's d is the mean difference in pooled standard deviation units: about 0.2 is small, 0.5 medium and 0.8 large. It quantifies effect size, telling you how far apart the two group means are relative to their combined spread. Larger values indicate a more substantial difference between groups.

Can I run a two-sample t-test from means and SDs alone?

Yes: the test needs only each group's mean, standard deviation and sample size. You do not need the raw data or individual observations. Summary statistics are sufficient to compute the t statistic, compare it to the critical value, and determine whether the group means differ significantly.

When should I use a one-tailed test?

Only when a difference in one specific direction was predicted in advance; two-tailed is the standard default. Use a one-tailed test if your hypothesis stated that one group would be greater than the other, not merely different. Otherwise, default to two-tailed to detect differences in either direction.

Sources

Related calculators

One-Sample T-Test Calculator
Test a sample mean against a hypothesised population mean: the t statistic, standard error, degrees of freedom, the critical value from the t table, and the verdict at your alpha.
Chi-Square Test Calculator (2x2)
The chi-square test of independence for a 2x2 contingency table: statistic, p-value at 1 degree of freedom, and the phi effect size.
Sample Size Calculator (Surveys & Proportions)
How many responses a survey or A/B readout needs for a target margin of error — with the finite population correction when the audience is small.
Confidence Interval Calculator
The range around a sample mean or a sample proportion at 90%, 95% or 99% confidence, with the standard error and margin of error shown step by step.