ridge landscape at dusk

Two Proportion Confidence Interval Calculator

The interval for p₁ − p₂ from counts or percents, by Newcombe, Wald or plus four, with 0 marked on the number line.

Result: p₁ − p₂ = 10 points, 95% CI 0.65% to 19.11%
Difference in percentage points 95% interval for p₁ − p₂, 0 marked
-20% 0% 20% 0.7% 19.1%
Interval
Lower0.7%
Estimate10%
Upper19.1%
  1. 1 Sample proportions
    80/200 and 60/200
    40% and 30%
  2. 2 Difference p̂₁ − p̂₂
    0.4 − 0.3
    10 points
  3. 3 Unpooled standard error
    √(p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂)
    0.04743
  4. 4 Critical z value
    95% confidence
    1.96
  5. 5 Newcombe interval
    from the two Wilson intervals
    0.65% to 19.11%
  6. 6 Reading
    where 0 falls
    above 0: group 1 is higher

This two proportion confidence interval calculator works with two independent samples. It estimates the difference between two proportions, p₁ − p₂. Enter the counts or the percents with their sample sizes, choose the confidence level and the method, and it returns the interval in percentage points with every step. To test whether the difference is zero instead, use our two proportion z test calculator.

What the Two Proportion Confidence Interval Calculator Estimates

It estimates how far apart two population proportions are, with a range that reflects sampling uncertainty. A result of 0.65% to 19.11% says the first group’s rate is plausibly between about 1 and 19 percentage points higher than the second’s.

How to Use the Two Proportion Confidence Interval Calculator

  1. From counts: enter the number of successes and the sample size for each group.
  2. From percents: enter each sample proportion p̂ as a percent with its sample size; the calculator turns them back into whole counts.
  3. Pick the confidence level (90%, 95% or 99%) and the method. Newcombe is the default.
  4. Compare methods shows all three intervals side by side.

There is no calculate button: results update as you type. The number line marks 0, so you can see at once whether the interval contains it.

Two Proportion Confidence Interval Formula

Difference in Proportions

Formula

d = p̂₁ − p̂₂ = x₁/n₁ − x₂/n₂

The point estimate of p₁ − p₂.

Unpooled Standard Error

Formula

SE = √( p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂ )

Margin of Error

Formula

MOE = z × SE

z is the critical z value, 1.96 for 95%.

Confidence Limits

Formula

d − MOE to d + MOE

The Wald interval; Newcombe and plus four adjust it.

This is the two proportions confidence interval formula in its simplest (Wald) form. The two proportions margin of error formula is the z × SE line. The plus four interval of Agresti and Caffo adds one success and one failure to each group before using the same formula. Newcombe’s hybrid score interval combines the two single-group Wilson intervals instead.

How the Calculator Works

All three methods rely on the normal approximation to the binomial distribution. This normal distribution approximation works when each group has enough successes and failures. Newcombe’s method is the default because it keeps close to the stated coverage even with small samples or proportions near 0% or 100%, where the Wald interval is too narrow. Every method is checked against Python statsmodels.

Examples

Example 1: Using Count Data

An A/B test converts 80 of 200 visitors on page A and 60 of 200 on page B.

Solution

d = 0.40 − 0.30 = 10 percentage points. SE = √(0.4 × 0.6 / 200 + 0.3 × 0.7 / 200) ≈ 0.0474, so the Wald interval is 10 ± 1.96 × 4.74 points: 0.70% to 19.30%. Newcombe gives 0.65% to 19.11%.

Verify Example 1 Using the Calculator

Enter 80, 200, 60 and 200 on the counts tab with Wald selected, then switch to Newcombe.

Example 2: Using Summary Data

A report gives 40% of 120 patients improving on treatment and 27.27% of 110 on placebo.

Solution

The counts are 48 and 30. d = 40% − 27.27% = 12.73 points, and the 95% Newcombe interval is 0.48% to 24.37%.

Verify Example 2 Using the Calculator

Open From percents and enter 40, 120, 27.27 and 110.

Two Proportion Z Interval Example

With small groups, 9 of 30 against 3 of 30, the methods disagree. Wald gives 0.4% to 39.6% and excludes 0; Newcombe (−0.54% to 39.03%) and Agresti–Caffo (−0.98% to 38.48%) both include 0. This is why the textbook two proportion z interval, the Wald form, is not the default here.

Interpreting the Confidence Interval

If the Entire Interval Is Above Zero

Group 1’s proportion is higher, at the chosen confidence level.

If the Entire Interval Is Below Zero

Group 2’s proportion is higher.

If the Interval Contains Zero

The data are consistent with no difference. That is not proof of equality; a wide interval often just means the samples are small.

Direction and Practical Significance

Look at the whole range, not only the sign. An interval of 0.65 to 19.11 points excludes zero, yet its lower end is tiny; whether that matters depends on the decision.

Why the Order of the Two Proportions Matters

The calculator reports p₁ − p₂. Swapping the groups flips the sign of both limits: 0.65% to 19.11% becomes −19.11% to −0.65%. The conclusion is the same; only the direction of the wording changes.

Why Is the Standard Error Not Pooled?

A z test assumes p₁ = p₂ under the null hypothesis, so it pools the groups into one pooled proportion. An interval makes no such assumption: it estimates how different the proportions are, so each group keeps its own variance. That is why the interval uses the unpooled standard error of difference in proportions.

Two Proportion Confidence Interval vs. Two Proportion Z Test

The test gives a p-value for “no difference”; the interval gives the size of the difference of two rates. A 95% interval that excludes 0 usually agrees with a significant two-tailed test at α = 0.05, though the pooled and unpooled standard errors can make them disagree near the edge. Report both when you can.

Conditions and Limitations

  • The two samples are independent random samples, or groups from a randomized experiment.
  • Each observation is a yes or a no.
  • Counts should not be tiny; with fewer than about 5 successes or failures in a group, use Newcombe or plus four, not Wald.
  • Paired data, such as the same people before and after, need a paired method such as McNemar’s, not this calculator.

A continuity correction widens the interval slightly to account for discrete counts. It is not applied here; Newcombe’s method already has good coverage without it.

Two Proportion Confidence Interval Calculator Uses

Some books call it a two-sample proportion confidence interval calculator. Older texts title it Confidence Interval Calculator For Two Proportions. Others write Two proportions confidence interval calculator. Others say difference in proportions confidence interval calculator. A short name is proportion difference CI calculator. TI-84 users know it as a 2-proportion z-interval calculator.

Choose Wald and it is a Wald interval calculator. Choose plus four and it is an Agresti-Caffo interval calculator. The default makes it a Newcombe hybrid score interval calculator. That method is built from two Wilson intervals. For one group, the same idea is a Wilson score interval calculator. For very small samples an exact conditional interval calculator is the next step; it is not included here.

The input fields take counts or percents. The success counts inputs and the sample size inputs come in pairs. A confidence level selector offers 90%, 95% and 99%. The standard error computation and the critical value lookup appear in the steps. The interval formula for each method is listed above, and the output display shows the result in one line.

It is used for A/B testing statistics and clinical trials. Election polls and survey data analysis use it too. As a two proportion calculator, it estimates a gap rather than testing one. It also works as a proportion difference estimator for any two independent groups.

Confidence Interval Vocabulary

A confidence interval for difference in proportions has a lower bound and an upper bound. The point estimate sits between them. Each bound is an interval estimate edge, not a hard limit. The confidence level (CL) is the long-run share of such intervals that capture the true gap.

A two sample proportion confidence interval needs sample data from both groups. Each sample proportion estimates its own true value. A two-tailed test at α = 0.05 matches a 95% interval. The z-score for proportions uses 1.96 here as well. Statistical significance is only part of statistical inference.

Hypothesis testing and estimation answer different questions. A proportion test asks whether there is a difference. The interval asks how big it is. For planning, a sample size calculation picks n before data are collected; our sample size calculator covers it. A binomial proportion is the basic building block of all of these.

To calculate confidence interval limits by hand, follow the four formulas above. For one group only, use our proportion confidence interval calculator. There you calculate proportion confidence limits for a single sample. A sample proportion confidence interval for each group is its Wilson interval. A population proportion interval for one group is the same thing.

This is a confidence interval online calculator, so nothing is installed. For two groups, it is a statistical confidence interval calculator. Some list it as a confidence interval statistics calculator. Others call it a proportion interval calculator. It is also a two sample confidence interval tool. It gives a confidence interval for proportions in two samples. Search for confidence interval two samples and it should come up. In short, it is a statistics calculator.

Two Proportion Confidence Interval FAQ

What is a two proportion confidence interval calculator?

It estimates the difference between two population proportions with a range, such as 0.65 to 19.11 percentage points.

What data can I enter into the calculator?

Successes and sample sizes for both groups, or percents with sample sizes.

What method does this calculator use?

Newcombe’s hybrid score interval by default, with Wald and Agresti–Caffo (plus four) as options.

Why is the confidence interval standard error unpooled?

Because an interval does not assume the two proportions are equal, so each group keeps its own variance.

What happens if I swap Group 1 and Group 2?

The limits change sign and swap places; the conclusion stays the same.

What does it mean when the interval includes zero?

The data are consistent with no difference at the chosen confidence level.

Is a 10 percentage-point difference a 10% increase?

No: 30% to 40% is 10 percentage points but a 33% relative increase.

Can I use this for before-and-after proportions?

Only if different people are measured each time; the same people measured twice are paired data.

Can I use this calculator for paired proportions?

No, paired yes/no data need McNemar’s method.

Is this the same as a two proportion z test?

No, the test gives a p-value for no difference; the interval gives the size of the difference.

References

Related Calculators