Interactive module guide
Two Proportion Z Test Calculator — Free & Fast
This two proportion z test calculator compares success rates from two independent groups with a pooled z statistic and an unpooled confidence interval.
Free · No sign-up · Calculations stay in your browser
The two-proportion z-test compares the success rates of two independent groups.
It pools the two samples to estimate the common proportion demanded by the null hypothesis, standardizes the observed difference with that pooled standard error, and reports a tail-specific p-value.
This calculator also reports an unpooled confidence interval for p₁ − p₂, Cohen’s h, and the raw risk difference, and warns when any success or failure count is small.
Use the two proportion z test calculator for independent groups with adequately large success and failure counts, and read the unpooled interval alongside the p-value.
When to use this two proportion z test calculator
Use it when
- Use this test when two separate, unrelated groups each produce independent binary outcomes and the question is whether their underlying success probabilities differ, as in a treatment versus control comparison or an A/B experiment with distinct users in each arm.
- It is appropriate when all four counts, successes and failures in both groups, are large enough for the normal approximation, roughly ten or more each. In that regime the pooled z statistic is accurate and easy to audit.
- Choose it when the practical quantity of interest is the absolute difference in rates. The reported interval for p₁ − p₂ translates directly into percentage points, which is usually what a decision about the two options needs.
Choose another method when
- Do not use it for paired or matched designs, such as the same participants measured under both conditions; the pairing creates dependence that this test ignores. The McNemar test is built for that structure.
- Avoid it when any success or failure count is small. Sparse tables push the true sampling distribution away from the normal reference, and Fisher’s exact test remains valid there.
- It is not a test of association strength across many categories; larger contingency structures belong to the chi-square independence test, and questions about one group against a fixed benchmark belong to the one-proportion test.
Interactive tool
The calculator loads as you approach this section so the guide remains fast on mobile connections.
Example preview
Two independent conversion rates
- Inputs
- x₁=45 of n₁=100 versus x₂=30 of n₂=90; two-sided pooled z test.
- Representative result
- p̂₁=0.45, p̂₂≈0.333, z≈1.643, p≈0.100; the 95% CI for the difference spans ≈ [−0.021, 0.254].
Illustrative only. Load the interactive tool to enter your own values and review assumptions.
Watch the explanation
4:35 minThe player loads only after you press play. You can also watch on YouTube.
Read the complete transcript
The Two-Proportion z-Test. Page A converts forty-five percent while Page B converts thirty-three point three percent. The two-proportion z-test asks whether that gap exceeds sampling variation. Start with two independent groups. Record successes and trials for each, then compute p-hat one and p-hat two without rounding the rates. Keep the subtraction order visible. Every signed result here describes Group One minus Group Two, so labels determine the directional meaning. The null hypothesis says the population rates are equal. That shared-rate claim lets the test pool all successes over all trials. Build the null standard error from the pooled rate and both sample sizes, then divide the observed rate difference by that error. A two-sided alternative counts both normal tails. Right-tailed means Group One exceeds Group Two; left-tailed means the reverse. Compare the tail-specific p-value with alpha. Reject when p is at most alpha; otherwise fail to reject without declaring the groups equal.
The design needs separate groups, independent observations within each group, binary outcomes, and a stable success probability for every trial. Check four observed cells: successes and failures in Group One, then successes and failures in Group Two. Distri Scope expects about ten in each. If any cell is sparse, use Fisher's exact test. A smooth normal curve can misrepresent a small two-by-two table. If the same people appear in both conditions, the outcomes are paired rather than independent. Route that design to a paired test for binary outcomes. Choose the tail before seeing the difference. Reversing group order or selecting a favorable direction afterward breaks the promised error rate. Testing and estimation use different uncertainty. The test pools under equality, while the confidence interval uses separate, unpooled sample variances. Read the interval as an absolute percentage-point difference. Cohen's h adds a standardized magnitude, but neither number establishes causality.
Suppose Page A records forty-five conversions from one hundred visitors, and Page B records thirty from ninety, with a two-sided alpha of point zero five. The sample rates are zero point four five and zero point three three three. Group One leads by zero point one one seven, or eleven point seven percentage points. The four cells are forty-five, fifty-five, thirty, and sixty. Each reaches ten, so the page's normal-approximation gate passes. Pooling seventy-five successes across one hundred ninety trials gives zero point three nine five. The pooled standard error is about zero point zero seven one. Dividing the observed difference by that error gives z about one point six four three. The two-sided p-value is about zero point one zero zero. Because the p-value exceeds point zero five, fail to reject equality. The unpooled ninety-five percent interval runs from minus zero point zero two one to zero point two five four. The interval spans zero, while Cohen's h is about zero point two four zero. Page A's estimate is higher, but the experiment remains inconclusive.
Precision depends on both sample sizes. The same eleven-point gap can be weak evidence in a pilot and strong evidence in a much larger experiment. Absolute and relative changes are different scales. Moving from ten to fifteen percent is five percentage points but a fifty percent relative increase. Validate whole counts with zero at most x-one at most n-one and zero at most x-two at most n-two, with both trial counts positive. If every observation is a failure or every observation is a success, the pooled standard error is zero and the z statistic is undefined. Do not create groups after inspecting outcomes, ignore clusters, or treat significance as practical importance. Design quality still governs the conclusion. Report group labels, four counts, two rates, alternative, alpha, pooled rate, z, p-value, unpooled interval, risk difference, effect size, and approximation check. Compare two independent rates, audit every assumption, and report the uncertainty free at Distri Scope dot com.
How to read the result
Read the p-value as the probability, under equal population proportions, of a standardized difference at least as large as observed in the planned direction. Read the interval as the range of plausible absolute differences in percentage points.
An interval that spans zero alongside a non-significant p-value does not demonstrate equality; it usually shows that both no difference and a material difference remain plausible. State the interval endpoints rather than declaring the groups the same.
How to use the two proportion z test calculator
Enter the successes and trials of each group as whole counts. The calculator computes p̂₁, p̂₂, and the pooled proportion itself; do not pre-round the rates.
Group labels matter for the sign of the difference: the statistic and interval describe p₁ − p₂, so record which real-world arm you entered first and keep that order in the write-up.
The tail direction must reflect the pre-specified question. A right-tailed test asks whether group 1 exceeds group 2; switching direction after seeing the data invalidates the stated error rate.
Formula, hypotheses, and assumptions
Conditions to review
- The two groups are independent of each other
- Within each group, outcomes are independent with a constant success probability
- Success and failure counts in both groups are large enough for the normal approximation (about 10 each)
Calculator parameters
- Group 1 Successes (x₁): default 45.
- Group 1 Trials (n₁): default 100.
- Group 2 Successes (x₂): default 30.
- Group 2 Trials (n₂): default 90.
- Significance Level (α): default 0.05.
- Test Type: default Two-tailed.
What the method is doing
Under the null hypothesis the two groups share one proportion, so the standard error pools all successes over all trials: √(p̂(1−p̂)(1/n₁+1/n₂)). Pooling is a null-only device; it would be wrong for estimation, which is exactly why the interval uses the unpooled error.
The unpooled interval, (p̂₁−p̂₂) ± z·√(p̂₁(1−p̂₁)/n₁ + p̂₂(1−p̂₂)/n₂), estimates the difference without assuming it is zero. As a result the test and the interval can disagree marginally near the boundary; when they do, report both and say why.
Worked example: two independent conversion rates
Two landing pages are shown to independent visitor groups. Page A converts x₁ = 45 of n₁ = 100 visitors and page B converts x₂ = 30 of n₂ = 90, so p̂₁ = 0.45 and p̂₂ ≈ 0.333. The plan is a two-sided test at α = 0.05.
- 1Enter the four counts. The pooled proportion is 75/190 ≈ 0.395, giving a pooled standard error of about 0.0710 and z ≈ (0.45 − 0.333)/0.0710 ≈ 1.643.
- 2Read the two-sided p-value of about 0.100. A difference of 11.7 percentage points or more in either direction would occur about 10% of the time if the pages truly converted equally, so the result does not reach the 5% level.
- 3Read the 95% interval for the difference, roughly −0.021 to 0.254, and Cohen’s h ≈ 0.240. The data are compatible with anything from a trivial deficit to a 25-point advantage for page A.
Interpretation
The experiment is inconclusive rather than negative: the point estimate favors page A, but the interval shows the sample is too small to pin the difference down. Doubling the sample size would shrink the interval by roughly a factor of √2. Reporting the interval prevents the common error of reading p ≈ 0.10 as evidence that the pages perform identically.
Common mistakes
- Applying this test to paired outcomes, such as the same users trying both pages, ignores the pairing and usually wastes power; the McNemar test handles that design.
- Comparing relative changes with absolute machinery confuses readers: a difference of 5 points from 10% to 15% is a 50% relative increase. Say which scale you are reporting.
- Splitting one sample into two groups after inspecting outcomes invalidates the independence framing; groups must be defined by the design, not by the results.
Limits and independent validation
The calculator accepts summary counts only and reports the absolute difference; it does not compute odds ratios, relative risk intervals, continuity corrections, or power, and it refuses to run when the pooled proportion is 0 or 1.
The normal approximation degrades with sparse counts, and the built-in warning uses a rough threshold of ten; borderline cases deserve an exact analysis before a consequential decision.
Before using the result
- Confirm the two groups are genuinely independent, that every trial produced exactly one binary outcome, and that all four counts are large enough for the approximation the test relies on.
- Recompute the pooled proportion and z by hand, and cross-check the p-value with an independent normal table. Record the group order, counts, tail, and α for reproducibility.
Related modules and resources
Explore Other Hypothesis Tests
- One Sample Z-Test Calculator
- One Sample T-Test Calculator
- Two Sample Z-Test Calculator
- Two Sample T-Test Calculator
- Paired T-Test Calculator
- One-Way ANOVA Calculator
- Two-Way ANOVA with Replication
- Chi-Square Test Calculator
- Chi-Square Goodness-of-Fit Test
- F-Test Calculator
- One-Proportion Z-Test
- Two-Proportion Z-Test
- Exact Binomial Test
- Fisher’s Exact Test
- McNemar Test
- Mann-Whitney U Test
- Wilcoxon Signed-Rank Test
- Sign Test
- Kruskal-Wallis Test
- Friedman Test
- Pearson Correlation Test
- Spearman Correlation Test
- Kendall Tau Test
- Levene Test
- Brown-Forsythe Test
- Welch ANOVA
- Repeated Measures ANOVA
- TOST Equivalence Test
- Power & Sample Size
- Confidence Interval Calculator
- Critical Value Lookup
See every option in the Statistical Hypothesis Test Calculator or review the DistriScope methodology. Educational information; last reviewed 2026-08-09. Verify consequential calculations independently.