Two-Proportion Confidence Interval Calculator
When two percentages are compared, saying '45% versus 30%' states the size of the gap but says nothing about how reliable that gap is. A confidence interval for the difference in proportions shows the bounds within which the true difference in the population may lie, and whether or not it contains zero tells you whether the difference is statistically significant.
This calculator produces two intervals from the same data: the classic Wald (normal approximation) interval and Newcombe's square-and-add hybrid score interval. Because the Newcombe interval is derived from the Wilson intervals of both proportions, it never crosses the −1 and +1 bounds and gives markedly better coverage than Wald with small samples and extreme proportions. In health research this difference is called the absolute risk reduction; when the interval excludes zero, the number needed to treat (NNT) is reported as well.
Confidence Interval for the Difference Between Two Proportions
Proportions: p₁ = x₁ / n₁, p₂ = x₂ / n₂ Difference: d = p₁ − p₂ Wald SE: SE = √( p₁(1−p₁)/n₁ + p₂(1−p₂)/n₂ ) Wald interval: CI = d ± z(1−α/2) · SE Wilson bounds: (l₁, u₁) and (l₂, u₂) — the score interval of each proportion Newcombe lower: d − √[ (p₁ − l₁)² + (u₂ − p₂)² ] Newcombe upper: d + √[ (u₁ − p₁)² + (p₂ − l₂)² ] z test: p̄ = (x₁+x₂)/(n₁+n₂), z = d / √( p̄(1−p̄)(1/n₁ + 1/n₂) ) NNT: NNT = 1 / |d| (when the interval excludes zero)
The Newcombe interval is not symmetric: because each side is derived from the Wilson bounds of its own proportion, the uncertainty about the difference can be of different size in the two directions. For extreme proportions this reflects reality better than the symmetric Wald interval.
How to Calculate
- Enter the event count (x) and the group size (n) for both groups; the proportions are computed as x/n.
- Choose the confidence level — 95% is the standard in academic and clinical reporting.
- Decide which interval to highlight; Newcombe is recommended for small samples and extreme proportions.
- Check whether the resulting interval contains zero: if it does, the difference is not significant.
- Compare the Wald and Newcombe intervals; when the two methods disagree, go with Newcombe.
- If the difference is significant, report the NNT as well: it expresses the practical meaning of the difference independently of the unit of measurement.
Worked Examples
Comparing success rates in two groups
The proportion is 45.00% in group 1 and 30.00% in group 2, a difference of 15.00 points. The Newcombe interval runs from 1.59 to 27.68 points and the Wald interval from 1.74 to 28.26 points. Because the interval excludes zero, the difference is significant (z = 2.1909; p = 0.028), and 6.7 units are needed for one extra event.
95% confidence interval for the difference (Newcombe hybrid score): 1.59 to 27.68 points · Difference in proportions (p₁ − p₂): 15.00 points · Does the interval contain zero?: No — the difference is significant
Where the two methods diverge in a small sample
In two groups of 15 units each, 1 and 0 events were observed, a difference of 6.67 points. The Wald interval runs from -5.96 to 19.29 points (a width of 25.25 points) and the Newcombe interval from -14.45 to 29.82 points (44.26 points). Because Wald treats the uncertainty of the event-free group as zero, it makes the interval markedly narrower than Newcombe; both intervals contain zero, so the difference is not significant (z = 1.0171; p = 0.309).
95% confidence interval for the difference (Newcombe hybrid score): -14.45 to 29.82 points · Difference in proportions (p₁ − p₂): 6.67 points · Does the interval contain zero?: Yes — the difference is not significant
A large sample whose interval still contains zero
In two groups of 200 people the proportions are 26.00% and 22.50%, a difference of 3.50 points. The Newcombe interval runs from -4.90 to 11.84 points and contains zero, so the difference is not statistically significant (z = 0.8166; p = 0.414). The interval is 16.74 points wide: a sample of this size cannot reliably detect even an 8-point difference.
95% confidence interval for the difference (Newcombe hybrid score): -4.90 to 11.84 points · Difference in proportions (p₁ − p₂): 3.50 points · Does the interval contain zero?: Yes — the difference is not significant