InfyCalculator
📊

Difference in Proportions Confidence Interval Calculator

Build a confidence interval for the difference between two independent survey proportions and see whether it excludes zero.

Group 1 successes
Group 1 sample size
Group 2 successes
Group 2 sample size
Confidence level
Loading calculator…

How it works

CI = (p₁ − p₂) ± z · √( p₁(1−p₁)/n₁ + p₂(1−p₂)/n₂ )

When you compare a proportion between two independent groups — say approval among men versus women — the uncertainty of each estimate combines. This Wald interval adds the two sampling variances and applies the normal critical value, giving a range for the true difference. If the interval lies entirely above or below zero, the difference is statistically significant at that confidence level; if it straddles zero, you cannot rule out no difference.

Worked example

Group 1: 120 of 400 (30%); group 2: 90 of 400 (22.5%). Difference = 7.5 points. SE = √(0.30·0.70/400 + 0.225·0.775/400) = 0.0308. At 95%: 0.075 ± 1.96·0.0308 = 1.5 to 13.5 points — the interval excludes zero.

Sources: Confidence interval — Wikipedia

Frequently asked questions

How is this different from a two-proportion z-test?

They answer the same question from two angles. The z-test returns a p-value using a pooled standard error; this interval uses the unpooled standard error and shows the plausible range of the difference. When the interval excludes zero, the test is significant.

Does this work for two subgroups of the same survey?

It assumes the two groups are independent. Non-overlapping subgroups of one survey are close enough for most purposes, but comparing overlapping groups or the same people at two times needs a paired method.

What if a proportion is 0% or 100%?

The Wald interval performs poorly at the extremes and can even fall outside 0–100%. With very small counts, prefer an exact or Wilson-based method for the individual proportions.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.