Two-Sample t-Test Calculator

The two-sample independent t-test compares the means of two separate groups to determine whether they differ more than would be expected by chance. This is one of the most widely used hypothesis tests in science and industry. This calculator uses the Welch t-test, which does not assume equal variances and is the recommended default for most situations. Enter the mean, standard deviation, and sample size for each group. The calculator returns the t-statistic and degrees of freedom, which you can use with a t-table to find the p-value.

0.00
0.00
0.00

Welch t-test formula

t = (x̄1 - x̄2) / √(s1²/n1 + s2²/n2)
df = (s1²/n1 + s2²/n2)² / [(s1²/n1)²/(n1-1) + (s2²/n2)²/(n2-1)]

Where x̄1 and x̄2 are the sample means, s1 and s2 are the sample standard deviations, and n1 and n2 are the sample sizes. The degrees of freedom formula is the Welch-Satterthwaite approximation.

Reading the results

  • A larger absolute t-statistic provides stronger evidence that the group means differ.
  • Look up the critical value from a t-table at your chosen significance level (usually 0.05, two-tailed) and the reported degrees of freedom.
  • If |t| exceeds the critical value, the difference is statistically significant.
  • Common critical values (two-tailed, alpha = 0.05): t* approximately 2.0 for df around 30, and 1.96 for very large df.

Frequently asked questions

What is the two-sample t-test?

The two-sample (independent samples) t-test tests whether the means of two unrelated groups are significantly different. It computes a t-statistic from the difference between sample means and the standard error of that difference, then compares the statistic to the t-distribution.

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

The pooled t-test assumes the two populations have equal variances and combines them into a pooled estimate. The Welch t-test does not assume equal variances and is more robust. This calculator uses the Welch formula by default, which is generally recommended.

What is the Welch t-test formula?

t = (x1-bar minus x2-bar) divided by the square root of (s1-squared/n1 plus s2-squared/n2). Degrees of freedom are estimated using the Welch-Satterthwaite equation.

How do I interpret the t-statistic?

The larger the absolute value of t, the greater the evidence against the null hypothesis (equal means). Compare the t-statistic to the critical value from the t-distribution at your chosen significance level (typically 0.05, two-tailed) and the given degrees of freedom.

What is the p-value?

This calculator reports the t-statistic and degrees of freedom. To find the p-value, use a t-distribution table or statistical software with the computed t and df. A p-value below 0.05 (two-tailed) is conventionally considered statistically significant.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 15 June 2026. See our methodology.