Home › Statistics & Probability Calculators › CI for the Difference of Two Means
Confidence Interval for the Difference of Two Means
This calculator estimates the difference between two population means with a confidence interval, which tells you not only whether two groups differ but by how much. Enter each group’s raw data or its mean, standard deviation and size, then pick the method: Welch (unequal variances, default), pooled (equal variances) or z (known population standard deviations).
The steps show the two sample summaries, the difference of means, the standard error for the chosen method, the degrees of freedom (Welch–Satterthwaite for Welch), the critical value, the margin of error and the interval. A sentence underneath explains whether the interval includes zero, which corresponds to the two-tailed two-sample t-test at the same level.
Report the interval alongside any test result: an interval of 1.2 to 6.8 points is far more informative to a reader than “p < 0.05”. For paired data, compute the differences first and use the one-mean interval on them.
Leave blank to use the summary boxes.
Leave blank to use the summary boxes.
Result and step-by-step solution
(x̄₁ − x̄₂) ± ME = 3.6 ± 3.5565
- Sample statisticsGroup 1: n = 30, x̄₁ = 78.2, s = 6.1.
Group 2: n = 28, x̄₂ = 74.6, s = 7.3. - Difference of meansx̄₁ − x̄₂ = 78.2 − 74.6 = 3.6
- Standard errorSE = √(s₁²/n₁ + s₂²/n₂) = √(37.21/30 + 53.29/28) = 1.773; Welch df = 52.786
- Critical valuetdf = 52.79 = 2.0059
- Margin of error and intervalME = 2.0059 × 1.773 = 3.5565; interval = (0.0435, 7.1565)
The interval does not contain 0, so the two means differ at this confidence level.
Frequently asked questions
- What does it mean if the interval contains zero?
- A difference of zero is plausible at that confidence level, so the two-sided test at the matching α would not reject equal means.
- Which method should I choose?
- Welch, unless your course requires the pooled formula or you have strong evidence of equal variances. The z method is only for known population standard deviations.
- How are the degrees of freedom found for Welch's interval?
- From the Welch–Satterthwaite formula, which usually gives a non-integer df between the smaller n − 1 and n₁ + n₂ − 2. The calculator uses it exactly.
- Can the groups have different sizes?
- Yes. All three methods allow unequal sample sizes.
Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.
