This two proportion z test calculator compares the share of successes in two independent groups. Enter the successes and sample size for Group 1 and Group 2, or two percents with their sample sizes. Then choose the alpha and the direction. The result gives the pooled z value, the p-value and the decision, plus the continuity-corrected version, Cohen's h and a normal curve. A third mode gives the confidence interval for p₁ − p₂. Each group proportion is a part-to-whole ratio, the idea behind our proportion calculator.
What Is a Two Proportion Z Test?
A two proportion z test checks whether two groups differ in their share of successes, using one sample from each. In other words, it asks whether two population proportions are the same. It is the standard way to compare conversion rates in an A/B test, cure rates in two treatment arms, or approval in two regions.
The test works under the null assumption that both groups share one true proportion. If the observed difference is too large to be explained by sampling error, the test rejects that assumption.
Two Proportion Z Test Calculator Uses
One page covers every two-group proportion comparison. It is a two sample proportion test for A/B tests, clinical trials with patients in two arms, and surveys of two regions. Use it to compare two proportions whenever the groups are independent. As a sample proportion test calculator, it starts from raw counts or from percents.
Course books call it a 2-prop z-test calculator. Others say two-sample proportion z-test calculator. Some list it as a z-test for two proportions calculator. Others call it a proportion difference z-test calculator. It is a two-proportion z-test tool. In the plainest terms it is a Two sample proportion test calculator. It runs as an online two proportion z test calculator. As a web-based two proportion z test calculator, it needs no install.
It also works as a proportion test calculator for any two independent groups. A two proportion calculator of this kind reports z, p and the decision together. The input fields take counts or percents, the output display shows the decision in one line, the result section lists every step, the reset button restores the A/B example, and the user interface keeps the three modes on one card. The algorithm uses the standard normal distribution for the p-value.
How to Use the Two Proportion Z Test Calculator
- From counts: enter x₁ and n₁ for Group 1 and x₂ and n₂ for Group 2.
- From percents: enter p₁ and p₂ as percents with n₁ and n₂; the calculator rounds to whole successes.
- Choose the significance level α and the alternative: p₁ ≠ p₂, p₁ > p₂ or p₁ < p₂.
- Interval for p₁ − p₂: get the Newcombe and Wald intervals for the difference.
Step-by-Step Solution
Solution Steps lists every stage of the test in order. It starts with the hypotheses and both group shares. Next come the pooled share and the spread of the difference. Then it shows z, the p-value and the cutoff, followed by the decision. Last come the continuity-corrected z, Cohen's h and the successes and failures check.
Two Proportion Z Test Formula
Formula
z = (p̂₁ − p̂₂) ÷ √(p̄(1 − p̄)(1/n₁ + 1/n₂)) p̂₁ = x₁/n₁ and p̂₂ = x₂/n₂ are the two group shares. p̄ is the pooled share.
Pooled Estimate
Formula
p̄ = (x₁ + x₂) ÷ (n₁ + n₂) Under H₀ both groups share one proportion, so the best estimate combines them.
Continuity Correction
The continuity correction shrinks the difference by ½(1/n₁ + 1/n₂) before dividing, because a continuous distribution (the normal) is used to approximate a discrete distribution (the binomial). It makes the test slightly more conservative and is most useful when samples are small. The calculator always shows both versions so you can report the one your field expects.
Confidence Interval Statistics Formula
Formula
(p̂₁ − p̂₂) ± z* √(p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂) The unpooled Wald interval. The Newcombe hybrid score interval, shown first in the calculator, has better coverage.
Hypotheses and Tail Direction
Are the Two Population Proportions Different?
Use the two-tailed test, Hₐ: p₁ ≠ p₂, when a difference in either direction matters.
Is the Group 1 Proportion Greater?
Use Hₐ: p₁ > p₂ when only an increase in Group 1 matters, decided before seeing the data.
Is the Group 1 Proportion Less?
Use Hₐ: p₁ < p₂ when only a decrease in Group 1 matters.
When to Use a Two Proportion Z Test
Assumptions
- Independent samples: the two groups contain different people or items.
- Random sampling or random assignment.
- Large sample size: at least 10 successes and failures in each group.
- Each sample is under 10% of its population.
Required Sample Data
You need four numbers: the number of successes and the sample size in each group. Percents work too, as long as you know each sample size.
Example
An A/B test shows version A to 200 visitors and records 80 sign-ups; version B gets 60 sign-ups from 200.
Step 1: State the hypotheses
H₀: p₁ = p₂ (the proportions are equal). Hₐ: p₁ ≠ p₂.
Step 2: State the Significance Level
α = 0.05.
Step 3: Calculate the z statistic
p̂₁ = 0.40, p̂₂ = 0.30, p̄ = 140/400 = 0.35. SE = √(0.35 × 0.65 × (1/200 + 1/200)) = 0.0477. z = 0.10 ÷ 0.0477 = 2.097.
Step 4: Find the p-value and Critical Value
The two-tailed p-value is 0.0360; the critical values are ±1.960.
Step 5: Make the decision
0.0360 < 0.05, so reject H₀. With the continuity correction, z = 1.992 and p = 0.0464, the same decision.
Step 6: Write the conclusion
Version A's sign-up rate (40%) is significantly higher than version B's (30%) at α = 0.05. The 95% Newcombe interval for the difference is 0.65% to 19.11%.
Verifying Using the Calculator
The default numbers are this example; the result line shows z = 2.097, p = 0.0360.
Interpreting Results
What does a positive or negative z score mean?
A positive z means Group 1's proportion is higher; a negative z means it is lower. The size of z is the gap measured in standard errors.
Is the pooled proportion the estimated effect?
No. The pooled proportion only feeds the spread of the difference. The effect itself is the difference p̂₁ − p̂₂.
Does a nonsignificant result prove the proportions are equal?
No. It means the data cannot rule out equality; a small sample may simply lack power.
How is this different from a two-proportion confidence interval?
The test gives a yes/no decision about H₀; the interval estimates how large the difference is. Use both. A two proportions confidence interval that excludes 0 agrees with a significant result in both tails.
Can this calculator analyze paired or repeated data?
No. Before/after answers from the same people need McNemar's test.
Effect Size
Cohen's h effect size, h = 2·asin(√p₁) − 2·asin(√p₂), puts differences on one scale: about 0.2 is small, 0.5 medium, 0.8 large. In the example, h = 0.21, a small effect. To plan the sample before a study, use the Sample Size Calculator Proportion.
Reporting Results in APA Style
Report the proportions, the test and the effect size: "Sign-ups were higher for A (40%) than B (30%), z = 2.10, p = .036, h = 0.21."
Two Proportion Z Test Practice
Each problem below has its answer after it, worked with this calculator.
- 45 of 150 vs 30 of 150, two-tailed. Answer: z = 2, p = 0.0455, reject.
- 120 of 400 vs 90 of 400, two-tailed. Answer: z = 2.411, p = 0.0159, reject.
- 18 of 60 vs 30 of 60, p₁ < p₂. Answer: z = −2.236, p = 0.0127, reject.
The difference between two proportions is the effect you report. A two sample proportion study needs both counts. The null hypothesis says the shares are equal. The alternative hypothesis names the direction. Pick the alpha level before you look. A one-tailed test puts all of α in one tail. Hypothesis testing always ends with a decision and a conclusion in plain words. This kind of inferential statistics generalizes from samples to populations.
Each z test for proportions follows the same recipe. A two sample proportion z test pools the groups under H₀. Its sampling distribution is approximately normal. That Normal distribution approximates the Binomial distribution of the counts. This kind of proportion hypothesis test compares two shares. Some books call it a proportion difference test. The confidence interval for proportions in the third mode shows the size of the gap.
Other tools cover pieces of the same job. A statistical significance calculator reports p. A p-value calculator converts z into a tail area. A p value calculator for proportions does the same thing. A z score calculator gives the z value. A test statistic calculator is another name for it. A hypothesis test calculator adds the decision. A pooled proportion calculator gives p̄ alone. A two sample z test for means is a different procedure. A sample proportion test against a benchmark uses one group, as in a One sample proportion calculator. This page combines z test statistics with the decision. It handles two sample proportions in one screen. Think of it as an online z test for shares. It also works as a proportion test online with no install.
Under H₀ the standard deviation of the difference uses the pooled share. A Z-test here always compares z with ±1.960 at α = 0.05, and H₁ is another symbol for Hₐ.
Two Proportion Z Test FAQ
Why does the test pool the proportions?
Because H₀ says both groups share one proportion, so combining them gives the best estimate of its standard error.
Should I report the continuity-corrected result?
Use it for small samples or when your field expects it; otherwise the uncorrected z test is standard.
What if a group has fewer than 10 successes?
Use Fisher's exact test instead, because the normal approximation is unreliable.
Is the two proportion z test the same as a chi-square test?
Yes, for a 2 × 2 table the two-tailed z test gives the same p-value as the chi-square test without correction, since χ² = z².
Can the groups have different sizes?
Yes, n₁ and n₂ can differ; the formula weights each group by its own size.
How do I compare one group with a fixed value?
Use the One Proportion Z Test Calculator for one sample against a benchmark.
References
Related Calculators
- One Proportion Z Test Calculator: test one proportion against a claimed value
- Two Proportion Confidence Interval Calculator: interval for the difference of two proportions
- Pooled Proportion Calculator: pooled proportion for a two-sample test