Confidence Interval for Difference of Two Proportions
Build a Wald or Newcombe confidence interval for p̂₁ − p̂₂ — the difference between two proportions — from counts or percentages, with a chart and a plain-English reading.
Both intervals contain 0 — the data are consistent with no difference.
Calculation
Difference interval — does it cross 0?
The horizontal bars are the Wald and Newcombe 95% intervals for p̂₁ − p̂₂. The dot is the observed difference (0.1300). The vertical line is 0 — no difference.
Proportions with Wilson intervals
Group 1: p̂₁ = 0.4500, 95% Wilson CI [0.3561, 0.5476]. Group 2: p̂₂ = 0.3200, 95% Wilson CI [0.2367, 0.4166].
A confidence interval for the difference of two proportions shows how far apart two percentages plausibly are — the conversion gap in an A/B test, or the difference between two survey groups. Wald and Newcombe intervals are shown side by side, with a chart and a plain-English reading.
This page builds an interval for p̂₁ − p̂₂. If you want the test instead — a p-value for whether the two proportions differ — use the two-proportion z-test. For one proportion, use the confidence interval for a proportion.
How to use the confidence interval for difference of two proportions calculator
Use Counts when you know how many successes each group had. Use Proportions when you know the percentages and the sample sizes — the calculator works out the counts for you.
- Choose a mode: Counts or Proportions.
- Enter the successes and sample size for group 1 (x₁, n₁) and group 2 (x₂, n₂) — or the two proportions and sample sizes in Proportions mode.
- Choose the confidence level: 90%, 95% or 99%.
- Read the headline difference, then check the results grid for the Wald and Newcombe intervals, the two proportions and their Wilson intervals, and the critical z. The calculation ledger shows every step, and the chart plots both intervals against zero.
Try it now: with 45 of 100 saying yes in group 1 and 32 of 100 in group 2, the difference is 0.13 and the 95% Wald interval is [−0.0037, 0.2637] — it contains 0, so the data are consistent with no difference.
When should you use a confidence interval for the difference of two proportions?
Use it when you have two independent groups and want to know how far apart their percentages plausibly are — for example, the conversion gap between two versions of a page in an A/B test, or the difference in support between two survey groups. It is the right tool when:
- You have two independent samples, each with a count of successes and a sample size.
- You want a range of plausible values for the difference, not just a yes/no test.
- You want to see whether the difference could be zero — the interval either contains 0 or excludes it.
- You are comparing percentages, not means — for means, use the confidence interval for the difference of two means.
The two groups must be independent. If the same people were measured twice — before and after, or in two conditions — the proportions are paired, and this interval does not apply.
Wald vs Newcombe — which interval should I report?
The calculator shows two intervals for the same difference. They are built differently, and they do not always agree.
| Wald interval | Newcombe interval | |
|---|---|---|
| Built from | The normal approximation: difference ± z* × unpooled standard error | The Wilson intervals for each proportion, combined by the Newcombe method |
| Shape | Always symmetric around the difference | Asymmetric — it follows the skew of each proportion’s Wilson interval |
| Small counts | Too narrow — it can wrongly exclude 0 (see Example 2 below) | Stays honest — wider where the data are thin |
| At 0% or 100% | Collapses to a point (standard error 0) and is clipped to [−1, 1] | Still gives a sensible interval, because the Wilson interval handles 0 successes |
| Report when | Both groups are large and neither proportion is near 0 or 1 | Always the safer choice — and the one to report when the two disagree |
How do I read the interval — and what does “contains 0” mean?
Three numbers, one story. Read them as a group rather than in isolation:
- The difference: p̂₁ − p̂₂, the observed gap between the two percentages. Positive means group 1 is higher; negative means group 2 is higher.
- The interval: the range of plausible values for the true difference. A 95% interval means that, over many repeats of the study, about 95% of such intervals would contain the true difference.
- Contains 0? If the interval contains 0, the data are consistent with no difference between the groups — the gap could be zero. If it excludes 0, the proportions plausibly differ, and the sign of the interval tells you which group is higher. Learn more about what a confidence interval is and what it cannot tell you.
The width of the interval is set by the margin of error — larger samples give narrower intervals — and you can work out how many observations you need with a sample size calculator. The critical z for the level you choose comes from the normal distribution: 1.645 for 90%, 1.960 for 95% and 2.576 for 99%.
Example: in the first worked example below, the difference is 0.13 and the 95% Wald interval [−0.0037, 0.2637] contains 0 — the data are consistent with no difference. In the second, the Wald interval [0.0048, 0.2352] excludes 0 but the Newcombe interval [−0.0017, 0.2484] contains it — the honest reading is that the difference could be zero.
Worked examples
Example 1 — two surveys, 45 of 100 vs 32 of 100
Two surveys ask the same question. Group 1: 45 of 100 say yes (p̂₁ = 0.45). Group 2: 32 of 100 say yes (p̂₂ = 0.32). The difference is 0.13. The 95% Wald interval is [−0.0037, 0.2637] and the 95% Newcombe interval is [−0.0047, 0.2583]. Both contain 0 — the data are consistent with no difference. The two-proportion z-test on the same numbers gives p = 0.0589, also not significant at 0.05.
Example 2 — the Wald interval misleads (8 of 50 vs 2 of 50)
A treatment group has 8 of 50 respond (16%); a control group has 2 of 50 (4%). The difference (treatment − control) is 0.12. The 95% Wald interval is [0.0048, 0.2352] — it excludes 0, suggesting a real difference. But the 95% Newcombe interval is [−0.0017, 0.2484] — it includes 0. With small counts the Wald interval is too narrow and misleads; the Newcombe interval is the honest one here. This is why the calculator shows both: a single interval would have hidden the disagreement.
How to build a confidence interval for the difference of two proportions in Excel
There is no built-in Excel function for this interval, so build it by hand from the two formulas. Use NORM.S.INV for the critical value: for a 95% interval, z* = NORM.S.INV(0.975) = 1.96; for 99%, z* = NORM.S.INV(0.995) = 2.576.
For the Wald interval: put p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂ in two cells, then SE = SQRT(p1*(1-p1)/n1 + p2*(1-p2)/n2) and the interval is (p1-p2) ± z* × SE.
For the Newcombe interval, first build a Wilson interval for each proportion (the Wilson formula needs the same z*), then combine the two Wilson bounds by the Newcombe method. Do not use CONFIDENCE.NORM for this — it builds an interval for a single mean, not for the difference of two proportions.
Frequently asked questions
Wald or Newcombe — which should I report?
Report the Newcombe interval. It is built from the Wilson intervals for each proportion, so it stays honest when a proportion is near 0 or 1 or the counts are small. The Wald interval is a normal approximation: it is fine when both groups are large, but with small counts it is too narrow and can wrongly exclude 0. When the two disagree, trust Newcombe.
What does “contains 0” mean?
The interval is a range of plausible values for the true difference p̂₁ − p̂₂. If it contains 0, a true difference of zero is plausible — the data are consistent with the two proportions being equal. If it excludes 0, the proportions plausibly differ, and the sign of the interval tells you which group is higher. Containing 0 does not prove the proportions are equal; it only says the data cannot rule that out.
Why is the Newcombe interval asymmetric?
Because it is built from the Wilson interval for each proportion, and a Wilson interval is itself asymmetric — it is pulled towards 0.5 when a proportion is near 0 or 1. The Newcombe method combines those two asymmetric Wilson bounds, so the resulting interval for the difference is asymmetric too. The asymmetry is a feature: it reflects the real skew of the sampling distribution when a proportion is near an edge.
What if a group has 0 successes?
The Wilson interval handles 0 successes — for 0 of 100 it gives [0.0000, 0.0370] at 95%, a sensible one-sided range — so the Newcombe interval is still valid. The Wald interval, by contrast, collapses: its standard error is 0 for that group, so the Wald interval shrinks to a point and is clipped to [−1, 1]. With a 0% or 100% group, use the Newcombe interval.
How is this different from the two-proportion z-test?
This page builds an interval for the difference; the two-proportion z-test tests a hypothesis and returns a p-value. The two agree: if the 95% interval excludes 0, the two-tailed test at 5% rejects, and if it contains 0, the test does not reject. Use the interval when you want the size of the gap and its uncertainty; use the test when you want a yes/no decision with a p-value.
What confidence level should I use?
95% is the standard choice and the default here. Use 90% when you want a narrower interval and accept more risk of missing the true value, and 99% when you want to be more certain — the interval gets wider. The level is a trade-off between precision and confidence, not a property of the data.
Source: NIST has no page for the two-proportion confidence interval; the method below follows the one-proportion CI construction (7.2.4.1. Confidence intervals) and the two-proportion test (7.3.3. How can we determine whether two processes produce the same proportion of defectives?) in the NIST/SEMATECH e-Handbook of Statistical Methods.
See all 62 free statistics tools on Empirical Rule Calculators.
Next steps
๐
โ Live
What Is a Confidence Interval?
What a confidence interval means โ and what it does not.
Calculator
Try Calculator โ
๐งฎ
โ Live
CI for a Proportion Calculator
Build a confidence interval for one proportion โ Wald and Wilson.
Calculator
Try Calculator โ
๐งฎ
โ Live
Two-Proportion z-Test Calculator
Test whether two proportions differ โ the test version of this interval.
Calculator
Try Calculator โ
More Tools to Explore
Keep going with the calculators that pair with the confidence interval for the difference of two proportions—the one-proportion interval, the two-proportion test, and intervals for means.
CI for a Proportion Calculator
Build a confidence interval for one proportion — Wald and Wilson.
CI for Difference of Two Means Calculator
Build a confidence interval for μ₁−μ₂ — the same idea for means.
Two-Proportion z-Test Calculator
Test whether two proportions differ — the test version of this interval.
Margin of Error Calculator
Find the margin of error for a mean or a proportion.
Sample Size Calculator
Find how large a sample you need for a target margin of error.
Normal Distribution Calculator
Find any normal probability or quantile, with a shaded bell curve.
Explore All Tools→
Browse all 62 free statistics tools—every calculator on this site in one place.