Two-Sample t-Test screenshot

Two-Sample t-Test

Welch or pooled two-sample t test with the difference, its confidence interval and a two-tailed p.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Runs in this tab
No signup

What this page computes

Type each group as a comma-separated list. Welch's statistic is t = (x̄₁ − x̄₂)/√(s₁²/n₁ + s₂²/n₂) with the Welch–Satterthwaite degrees of freedom; the pooled form uses s_p² = ((n₁−1)s₁² + (n₂−1)s₂²)/(n₁+n₂−2) and n₁+n₂−2 degrees of freedom. Both variances use their own n − 1 divisor. The page prints the two means, the difference, t, df, a two-tailed p and the 95% interval for the difference. Figures print to six significant figures.

Neither form proves the groups are comparable: the page assumes independent observations and does not test equality of variances. Empty or single-value groups are refused, since a variance needs two values.

The groups are read in this tab; the same lists always give the same t and p.

The page compares two group means with Welch’s t test by default: t = (x̄₁ − x̄₂)/√(s₁²/n₁ + s₂²/n₂), with the Welch–Satterthwaite degrees of freedom. Two groups of five give t = −4.11844 on 6.20183 degrees of freedom and p = 0.00579974, with the 95% interval on the difference printed beside it. A pooled-variance option is there when equal variances are genuinely assumed, and it reports df = n₁ + n₂ − 2 instead.

Compare two group means with Welch’s t test, or the pooled form. The p-value is two-tailed and the degrees of freedom are printed.

How to use it

Type the first group as a comma-separated list and the second the same way, then choose Welch or pooled. Each group needs at least two values, and both groups having zero variance is refused because the standard error would be zero. The result line prints the statistic, the degrees of freedom and the two-tailed p together, and the line under it names which standard error was used.

Welch or pooled, and the degrees of freedom

Welch does not assume the two groups share a variance, which is why its degrees of freedom is a computed number like 6.20183 rather than a whole count — that is the Welch–Satterthwaite approximation, not a typo. The pooled form uses s_p² = ((n₁ − 1)s₁² + (n₂ − 1)s₂²)/(n₁ + n₂ − 2) with df = n₁ + n₂ − 2, and it is the right choice only when the variances really are equal. The p-value is two-tailed against the means differing, and the printed interval is on the difference of the means.

What to Expect

Best for

  • Comparing two independent groups without assuming equal variance

What this tool keeps

  • Nothing leaves this tab: the arithmetic runs in the page you are reading, and a reload discards both the input and the result.

Sample output

mean 1 = 3.8, mean 2 = 8, difference = -4.2 t = -4.11844, df = 6.20183, p = 0.00579974 (two-tailed, H₁: the means differ) Welch standard error = 1.0198, n = 5 and 5 95% CI of the difference = -6.67582 … -1.72418

Frequently asked questions

Why are the degrees of freedom not a whole number?

Because Welch’s form uses the Welch–Satterthwaite approximation, which computes a fractional df from the two variances and the two sample sizes — 6.20183 for two groups of five. The pooled option reports the whole-number n₁ + n₂ − 2 instead.

Which variance option should I use?

Welch, unless you have a real reason to assume the two groups share a variance. Welch does not make that assumption and costs almost nothing when it happens to be true.

Is my data uploaded?

No. Both groups, the standard error and the test are computed in this page, so nothing leaves the tab and a reload discards the input and the result.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.