Confidence Intervals

Two Proportion Confidence Interval Calculator

Use this calculator to compute a confidence interval for the difference between two independent population proportions. Enter count or summary data and click Calculate to get the confidence interval, margin of error, and a clear step-by-step solution.

Common confidence levels are 90%, 95%, and 99%.
Enter as a decimal. For example, enter 0.58 for 58%.
Enter as a decimal. For example, enter 0.45 for 45%.
Common confidence levels are 90%, 95%, and 99%.

Need a confidence interval for a single proportion? Use our Proportion Confidence Interval Calculator .

How to Use the Two Proportion Confidence Interval Calculator

This calculator lets you find a confidence interval for the difference between two independent population proportions using either count data or summary data.

If you have count data, follow these steps:

  1. Select Count Data.
  2. Enter the number of successes for Sample 1, x₁.
  3. Enter the sample size for Sample 1, n₁.
  4. Enter the number of successes for Sample 2, x₂.
  5. Enter the sample size for Sample 2, n₂.
  6. Enter the confidence level, such as 90, 95, or 99.
  7. Select the number of decimal places for your answer.
  8. Click Calculate.

The calculator will first find the two sample proportions, p̂₁ and p̂₂, and then calculate the confidence interval for p₁ − p₂.

If the sample proportions are already known, select Summary Data and enter p̂₁, n₁, p̂₂, n₂, and the confidence level directly.

The result includes the difference between the sample proportions, margin of error, lower and upper confidence limits, and a complete step-by-step solution.

Note. The order of the samples matters. This calculator always estimates Sample 1 − Sample 2.


What Is a Two Proportion Confidence Interval?

A two proportion confidence interval estimates the difference between the proportions of two independent populations.

Suppose:

  • p₁ is the proportion in Population 1
  • p₂ is the proportion in Population 2

The quantity we want to estimate is:

p₁ − p₂

Since the true population proportions are usually unknown, we use the two sample proportions, p̂₁ and p̂₂, to estimate their difference.

For example, suppose:

  • p̂₁ = 0.58
  • p̂₂ = 0.45

The observed difference is:

p̂₁ − p̂₂ = 0.58 − 0.45 = 0.13

This tells us that the proportion in Sample 1 is 0.13, or 13 percentage points, higher than the proportion in Sample 2.

However, this is only a sample estimate. A confidence interval gives us a range of plausible values for the true population difference.

For example, if the 95% confidence interval is:

95% CI = [0.0302, 0.2298]

we can be 95% confident that the true difference between the two population proportions is between 0.0302 and 0.2298.


Two Proportion Confidence Interval Formula

The confidence interval formula for the difference between two independent population proportions is:

CI = (p̂₁ − p̂₂) ± z* × √[p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂]

Where:

  • CI is the confidence interval for p₁ − p₂
  • p̂₁ is the sample proportion for Sample 1
  • p̂₂ is the sample proportion for Sample 2
  • n₁ is the Sample 1 size
  • n₂ is the Sample 2 size
  • z* is the z-critical value for the selected confidence level
  • √[p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂] is the standard error of the difference

If count data are given, calculate the two sample proportions using:

p̂₁ = x₁/n₁

and

p̂₂ = x₂/n₂

The confidence interval uses the two sample proportions separately when calculating the standard error. This is different from the usual two-proportion z test, which uses a pooled proportion under the null hypothesis.


How to Calculate a Confidence Interval for the Difference Between Two Proportions

To calculate a two proportion confidence interval manually, follow these steps:

  1. Identify the given parameters. If count data are given, calculate p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂.
  2. Find the z-critical value for the required confidence level.
  3. Apply the two proportion confidence interval formula and calculate the lower and upper confidence limits.

The examples below show how to solve both count-data and summary-data questions.


Example 1: Two Proportion Confidence Interval Using Count Data

A university researcher wants to compare the proportion of first-year students who use campus tutoring services at two university campuses. In a random sample of 200 students from Campus A, 116 reported using tutoring services. In an independent random sample of 180 students from Campus B, 81 reported using tutoring services.

Construct a 95% confidence interval for the difference between the population proportions, p₁ − p₂, where Campus A is Sample 1 and Campus B is Sample 2.

Solution

To find the 95% confidence interval manually, follow these steps:

Step 1. Identify the given parameters

From the question, we know that:

  • Sample 1 successes, x₁ = 116
  • Sample 1 size, n₁ = 200
  • Sample 2 successes, x₂ = 81
  • Sample 2 size, n₂ = 180
  • Confidence level = 95%

As you can see, the sample proportions are not given directly. Thus, we first need to calculate p̂₁ and p̂₂.

For Sample 1:

p̂₁ = x₁/n₁

= 116/200

= 0.58

For Sample 2:

p̂₂ = x₂/n₂

= 81/180

= 0.45

Therefore, the difference between the two sample proportions is:

p̂₁ − p̂₂ = 0.58 − 0.45

= 0.13

Step 2. Find the z-critical value

For a 95% confidence level, the corresponding z-critical value is z* = 1.959964 using the z-critical value calculator.

If you are using a standard normal table, the value is usually rounded to 1.96.

Step 3. Apply the formula

Recall that the confidence interval formula for the difference between two independent proportions is:

CI = (p̂₁ − p̂₂) ± z* × √[p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂]

Substituting the values into the formula gives:

CI = (0.58 − 0.45) ± 1.959964 × √[0.58(1 − 0.58)/200 + 0.45(1 − 0.45)/180]

= 0.13 ± 1.959964 × √[0.001218 + 0.001375]

= 0.13 ± 1.959964 × √0.002593

= 0.13 ± 1.959964 × 0.050922

Hence,

CI = 0.13 ± 0.099804

Calculating the lower and upper confidence limits, we get:

  • Lower confidence limit: 0.13 − 0.099804 = 0.030196
  • Upper confidence limit: 0.13 + 0.099804 = 0.229804

Rounding the confidence interval to 4 decimal places gives:

95% CI for p₁ − p₂ = [0.0302, 0.2298]

Thus, we are 95% confident that the proportion of first-year students who use tutoring services at Campus A is between 0.0302 and 0.2298 higher than the proportion at Campus B.

In percentage points, Campus A’s population proportion is estimated to be approximately 3.02 to 22.98 percentage points higher than Campus B’s.

Verify Example 1 Using the Calculator

To verify the result using our two proportion confidence interval calculator:

  1. Select Count Data.
  2. Enter 116 for Sample 1 successes.
  3. Enter 200 for Sample 1 size.
  4. Enter 81 for Sample 2 successes.
  5. Enter 180 for Sample 2 size.
  6. Enter 95 for the confidence level.
  7. Select 4 Decimal Places.
  8. Click Calculate.

The calculator will instantly return:

95% CI for p₁ − p₂ = [0.0302, 0.2298]

It will also show you how the confidence interval was calculated step-by-step.


Example 2: Two Proportion Confidence Interval Using Summary Data

A university researcher compares the proportion of students who prefer digital textbooks at two independent colleges. At College A, a random sample of 180 students gives a sample proportion of 0.54. At College B, a random sample of 170 students gives a sample proportion of 0.49.

Find a 90% confidence interval for the difference between the two population proportions.

Solution

In this question, the two sample proportions are already given. Therefore, we do not need to calculate them from success counts.

Step 1. Identify the given values

We have:

  • Sample 1 proportion, p̂₁ = 0.54
  • Sample 1 size, n₁ = 180
  • Sample 2 proportion, p̂₂ = 0.49
  • Sample 2 size, n₂ = 170
  • Confidence level = 90%

The observed difference between the sample proportions is:

p̂₁ − p̂₂ = 0.54 − 0.49

= 0.05

Step 2. Find the z-critical value

For a 90% confidence level, the corresponding z-critical value is:

z* = 1.644854

You can obtain this value using the z-critical value calculator. Using a standard normal table gives approximately 1.645.

Step 3. Calculate the confidence interval

Substituting the values into the two proportion confidence interval formula gives:

CI = (0.54 − 0.49) ± 1.644854 × √[0.54(1 − 0.54)/180 + 0.49(1 − 0.49)/170]

= 0.05 ± 1.644854 × √[0.001380 + 0.001470]

= 0.05 ± 1.644854 × √0.002850

= 0.05 ± 1.644854 × 0.053385

= 0.05 ± 0.087811

Therefore:

  • Lower confidence limit: 0.05 − 0.087811 = −0.037811
  • Upper confidence limit: 0.05 + 0.087811 = 0.137811

Rounding to 4 decimal places gives:

90% CI for p₁ − p₂ = [−0.0378, 0.1378]

Notice that this confidence interval contains 0. Therefore, a true difference of zero between the two population proportions is plausible at the 90% confidence level.

Verify Example 2 Using the Calculator

To check the result:

  1. Select Summary Data.
  2. Enter 0.54 for Sample 1 proportion.
  3. Enter 180 for Sample 1 size.
  4. Enter 0.49 for Sample 2 proportion.
  5. Enter 170 for Sample 2 size.
  6. Enter 90 for the confidence level.
  7. Select 4 Decimal Places.
  8. Click Calculate.

The calculator will return:

90% CI for p₁ − p₂ = [−0.0378, 0.1378]

and show the complete calculation below the answer.


How to Interpret a Two Proportion Confidence Interval

The interpretation depends on whether the confidence interval is entirely positive, entirely negative, or contains zero.

If the Entire Confidence Interval Is Above Zero

Suppose:

95% CI for p₁ − p₂ = [0.04, 0.18]

Since both limits are positive, Population 1 has the higher estimated proportion.

You can interpret this as:

We are 95% confident that Population 1’s proportion is between 0.04 and 0.18 higher than Population 2’s proportion.

In percentage points, this means between 4 and 18 percentage points higher.

If the Entire Confidence Interval Is Below Zero

Suppose:

95% CI for p₁ − p₂ = [−0.20, −0.06]

The negative values indicate that Population 1 has the lower proportion. Equivalently, Population 2 has the higher proportion.

If the Confidence Interval Contains Zero

Suppose:

95% CI = [−0.05, 0.12]

Because zero lies inside the interval, a true population difference of zero is compatible with the data.

This does not prove that the two proportions are equal. It simply means that the confidence interval does not rule out zero at the selected confidence level.


Why Does the Order of the Two Proportions Matter?

The calculator always calculates:

p₁ − p₂

Therefore, reversing Sample 1 and Sample 2 changes the sign of the estimated difference and confidence interval.

For example, suppose:

95% CI for p₁ − p₂ = [0.03, 0.15]

If you reverse the samples, the corresponding interval becomes:

95% CI for p₂ − p₁ = [−0.15, −0.03]

The underlying comparison has not changed. Only the direction has changed.

For this reason, always identify clearly which group is Sample 1 and which is Sample 2 before interpreting the result.


When Can You Use a Two Proportion Z Confidence Interval?

This calculator uses the normal approximation to estimate the difference between two independent population proportions.

Before using the result, make sure the following conditions are reasonably satisfied:

  • The two groups are independent.
  • Each outcome has two categories, such as yes/no, pass/fail, or success/failure.
  • Observations within each sample are independent.
  • Both samples reasonably represent the populations you want to compare.
  • Each sample has at least 10 successes and 10 failures.

For Sample 1, check:

n₁p̂₁ ≥ 10

and

n₁(1 − p̂₁) ≥ 10

For Sample 2, check:

n₂p̂₂ ≥ 10

and

n₂(1 − p̂₂) ≥ 10

The large-count condition of at least 10 successes and 10 failures in each group is commonly used for the normal approximation to the sampling distribution of p̂₁ − p̂₂.

If this condition is not satisfied, the calculator displays a warning because the normal approximation may not be reliable.


Why Is the Standard Error Not Pooled?

The confidence interval for p₁ − p₂ uses the two observed sample proportions separately:

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

This is called an unpooled standard error.

The reason is simple. When constructing a confidence interval, we are estimating the unknown difference between p₁ and p₂. We do not assume that the two population proportions are equal.

By contrast, the usual two-proportion z test starts with the null hypothesis:

H₀: p₁ = p₂

and therefore uses a pooled estimate of the common proportion when calculating its standard error. Penn State explicitly distinguishes the unpooled confidence-interval standard error from the pooled standard error used for the hypothesis test.


Two Proportion Confidence Interval vs. Two Proportion Z Test

Although both procedures compare two population proportions, they answer different questions.

ProcedureMain QuestionMain Result
Two proportion confidence intervalWhat range of values is plausible for p₁ − p₂?Lower and upper confidence limits
Two proportion z testIs there enough evidence that the population proportions differ?z statistic and p-value

A confidence interval estimates the size and direction of the difference.

A hypothesis test evaluates whether the observed evidence is strong enough to reject a particular null hypothesis.

If you want to perform a hypothesis test instead, use our Two Proportion Z Test Calculator.


Frequently Asked Questions

What is a two proportion confidence interval calculator?

A two proportion confidence interval calculator estimates a range of plausible values for the difference between two independent population proportions. This calculator reports the interval for p₁ − p₂ using the normal approximation method.

What data can I enter into the calculator?

You can enter either count data using x₁, n₁, x₂, and n₂, or summary data using p̂₁, n₁, p̂₂, and n₂.

What method does this calculator use?

The calculator uses the normal approximation, also called the two-proportion z confidence interval, with an unpooled standard error.

What does it mean if the confidence interval includes zero?

If the interval includes zero, a true difference of zero between the two population proportions is plausible at the selected confidence level. It does not prove that the proportions are equal.

Is a two proportion confidence interval the same as a two proportion z test?

No. A confidence interval estimates a range for p₁ − p₂ using an unpooled standard error. A two-proportion z test tests a hypothesis about the proportions and typically uses a pooled standard error under H₀: p₁ = p₂.

Can I use this calculator for paired proportions?

No. This calculator assumes the two groups are independent. If the same participants are measured twice or observations are matched in pairs, you need a method designed for paired binary data rather than an independent two-proportion interval.

Cite

Choose APA, MLA, Chicago, or Harvard, then copy the citation.

Mburu, J.. (2026, August 24). Two Proportion Confidence Interval Calculator. StatCalc.net. Retrieved September 11, 2026, from https://statcalc.net/two-proportion-confidence-interval-calculator/

Joseph Mburu

About This Calculator

Prepared by Joseph Mburu · Updated on

Joseph is an applied statistician and data analyst with over 6 years of experience helping students, researchers, and professionals solve statistics and data analysis problems. He holds a degree in Applied Statistics and a Master’s degree in Data…

We aim to keep our calculators accurate, easy to use, and helpful for learning. Always check that your inputs match the assumptions of the method you are using.