Two-Proportion Confidence Interval Calculator

StatisticsLast updated: August 22, 2026

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.

The number of units in group 1 in which the event of interest was observed.
The number of units in group 2 (the comparison or control group) in which the event was observed.
The probability that the interval covers the true parameter.
Both intervals are always computed; this choice only decides which one is highlighted.

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

  1. Enter the event count (x) and the group size (n) for both groups; the proportions are computed as x/n.
  2. Choose the confidence level — 95% is the standard in academic and clinical reporting.
  3. Decide which interval to highlight; Newcombe is recommended for small samples and extreme proportions.
  4. Check whether the resulting interval contains zero: if it does, the difference is not significant.
  5. Compare the Wald and Newcombe intervals; when the two methods disagree, go with Newcombe.
  6. 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

Frequently Asked Questions

What is the difference between the Newcombe and the Wald interval?
The Wald interval combines the Wald standard errors of the two proportions and is symmetric around the difference; as the event counts shrink, its true coverage falls below the nominal level. The Newcombe hybrid interval takes the Wilson score bounds of each proportion and combines them with the square-and-add method; it stays between −1 and +1, is not symmetric, and gives markedly more reliable coverage in small samples.
What should I conclude if the interval contains zero?
Zero being inside the interval means that a true difference of zero cannot be ruled out with this data; it does not prove that the two proportions are equal. If the interval is wide and spans zero, the correct statement is that the sample was not powerful enough to detect a difference. If the interval is narrow and tight around zero, you may conclude that any real difference is small.
Does this interval replace the chi-square test?
The two answer the same question in different ways: for a 2x2 table the chi-square test and the pooled z test are algebraically equivalent (χ² = z²). The confidence interval additionally gives the size and direction of the difference in percentage points. That is why the confidence interval, and not only the p-value, should be reported.
What is the NNT and how is it interpreted?
The NNT (number needed to treat) shows how many units must be treated to prevent one extra event, and it is the reciprocal of the absolute risk difference: NNT = 1/|p₁ − p₂|. A risk reduction of 15 points means an NNT of about 6.7. If the difference runs the other way, the same number is called the NNH and signals harm. When the interval for the difference contains zero, no single finite interval is defined for the NNT.
What should I do if the cell counts are very small?
If any cell falls below 5, both the Wald interval and the pooled z test lose their reliability. Use the Newcombe method for the interval and Fisher's exact test for significance. If one group has no events at all, Wald treats that group's uncertainty as zero and misleadingly narrows the interval; Newcombe still produces a sensible width in that situation.
Should I use the odds ratio (OR) or relative risk (RR) instead of the difference in proportions?
The absolute difference is the most useful measure for decision making, because it states the practical size of the effect directly; relative measures can look large for rare events and overstate the absolute effect. A risk falling from 2% to 1% is a 50% relative reduction but only 1 point in absolute terms. Best practice is to report the absolute difference alongside a relative measure.
Can this calculator be used for paired data?
No. Proportions measured on the same people at two different times or with two different methods are not independent; in that case McNemar's test and paired intervals for the difference in proportions, based on the number of discordant pairs, should be used. When the independence assumption is violated, the interval here comes out wider than it should be and loses power.