On this page
What this two-proportion calculator compares
Use this calculator for two independent groups and one binary outcome, such as the share of participants in each group who completed a task. Enter successes and total observations for both groups. It reports each sample proportion and the signed difference, defined as Group 1 minus Group 2. A difference of 0.08 is an 8-percentage-point higher observed proportion in Group 1; it is not an 8% relative increase.
The confidence interval uses Newcombe’s hybrid Wilson-score method, which combines separate Wilson intervals for the two independent proportions. The hypothesis test is a different calculation: a pooled two-proportion z-test under the null hypothesis that the population proportions are equal. Because these methods answer related but distinct questions, the interval and p-value need not be exact inverses of one another.
Worked example: compare two independent groups
Suppose 56 of 127 people in Group 1 and 62 of 99 people in Group 2 have the outcome. The observed proportions are about 44.1% and 62.6%; Group 1 minus Group 2 is about −18.5 percentage points. Penn State publishes these counts as a teaching example and reports a two-sided normal-approximation z statistic of about −2.82. This calculator’s Newcombe-Wilson interval is an explicitly named score-based interval, so its limits may differ from the normal-approximation interval shown in that lesson.
For the same counts, this calculator’s pooled test using the NIST formula gives z ≈ −2.77 and p ≈ 0.006, while Penn State displays z = −2.82 and p = 0.005 for its lesson output. Those published values do not exactly match this pooled calculation, so this page labels its method instead of implying a reproduction of the lesson’s software output.
The counts illustrate the calculation, not a treatment effect or a finding about a broader population. The direction of subtraction matters: swapping the groups reverses the sign of the difference while leaving a two-sided test unchanged.
How the pooled z-test works
Let x₁ and x₂ be the success counts and n₁ and n₂ the group totals. The sample proportions are p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂. For the null hypothesis of equal population proportions, the pooled estimate is p̂ = (x₁ + x₂)/(n₁ + n₂). The test statistic is z = (p̂₁ − p̂₂) / √[p̂(1 − p̂)(1/n₁ + 1/n₂)]. The calculator reports the two-sided standard-normal p-value.
The normal approximation is a model-based method. Penn State’s introductory guidance uses at least 10 observed successes and 10 observed failures in each sample as a rule of thumb for the two-proportion normal approximation. The tool displays those four counts so you can inspect that condition; it cannot verify random sampling, independence or whether the study design supports the analysis. Select the directional alternative before inspecting the result if your analysis plan specified one; choosing a tail after seeing the data changes the question being tested.
How to read the difference confidence interval
The Newcombe-Wilson interval estimates the difference between two independent population proportions on the percentage-point scale. It is formed from the separate Wilson score limits for each group rather than the simple Wald interval. Newcombe’s comparison of eleven methods recommends a method combining the Wilson score intervals as a readily implemented approach with favorable properties.
If the interval includes zero, the data are compatible with no difference at that confidence level under the method’s assumptions. That alone does not establish equality or practical equivalence. Report the observed group proportions, signed difference, interval, design and outcome definition together.
When this calculator does not fit
Do not use this independent-groups calculator for paired before-and-after responses or matched participants; paired categorical outcomes need a method such as McNemar’s test. With sparse counts, the normal approximation may be unreliable; consider a method appropriate to the design, such as Fisher’s exact test or a randomization procedure, and follow your course or analysis plan. Fisher’s exact test is a separate hypothesis test and does not provide this Newcombe-Wilson interval.
Weighted or clustered survey samples need variance calculations that account for the sampling design. More than two groups, ordinal outcomes, adjusted regression, non-inferiority questions and repeated measurements also require other methods. A calculator cannot choose a valid model from counts alone.
Free two-proportion calculator
Compare two independent proportions
Enter successes and totals for two separate groups. The result reports Group 1 minus Group 2, a two-sided Newcombe-Wilson interval, and a pooled z-test for your selected alternative.
Group 1: 56 of 127 · Group 2: 62 of 99. The observed difference is about −18.5 percentage points.
Choose a direction only when it was specified before reviewing the data. The confidence interval remains two-sided.
The calculation runs in this browser. The counts are not sent to AI Essay. Enter counts only; do not include names or identifiable records.
The published example is ready. Edit the counts, then calculate.
Comparison results
Group 1 proportion
Group 2 proportion
Difference (Group 1 − Group 2)
Two-sided Newcombe-Wilson interval
Pooled z-test · Two-sided: proportions differ
Show the counts and expected-cell check
- Group 1 successes / failures
- Group 2 successes / failures
- Smallest expected count under equal proportions
- z statistic
- Selected-alternative p-value
The interval and test use different named procedures. Neither checks sampling, independence, outcome definitions, confounding or practical importance.
Questions about this topic
What is a two-proportion z-test?
It is a large-sample test for whether two independent population proportions are equal. Under the equal-proportions null hypothesis, the standard error uses the pooled success proportion from both groups.
How do I compare two percentages?
For each independent group, divide its success count by its total. Subtract Group 2’s proportion from Group 1’s, then report the signed difference in percentage points and an interval suited to independent proportions.
Can I choose a one-sided alternative?
Yes. Choose a two-sided difference, Group 1 greater than Group 2, or Group 1 lower than Group 2 before interpreting the result. The p-value follows that alternative; the displayed Newcombe-Wilson confidence interval remains two-sided at the selected confidence level.
Does this calculator use the same method for its p-value and confidence interval?
No. The p-value comes from a pooled two-proportion z-test under the equal-proportions null, with the selected alternative. The interval is Newcombe’s hybrid Wilson-score interval for the difference and remains two-sided. The methods are named separately on the result.
Can I use it for paired before-and-after categories?
No. Its inputs describe independent groups. Paired binary outcomes require a method that accounts for the within-person or matched-pair relationship, such as McNemar’s test.
What if a group has very few successes or failures?
The normal approximation may be unreliable. Inspect the displayed counts and consult a method appropriate to the design; Fisher’s exact test is one separate option for a sparse 2 × 2 table, but it is not the confidence interval reported here.
Are the counts uploaded?
No. The calculation runs in this browser tab. The values entered are not sent to AI Essay.
Sources and editorial notes
The supporting reading below informs our editorial guidance. Exercises and scenarios illustrate a method; they do not report a completed product test or measured learning outcome. Read our editorial policy or send a correction with a supporting source to info@ai-essay.com.
- NIST/SEMATECH e-Handbook: pooled two-proportion z-test and Fisher exact test for independent groups
- Penn State STAT 200: inference for two independent proportions, conditions and worked example
- Newcombe: interval estimation for the difference between independent proportions, comparison of eleven methods
- NIST/SEMATECH e-Handbook: Wilson score confidence interval for one proportion