Two Proportion Z-Test Calculator
Compare two independent proportions, such as an A/B test or treatment against control, with the pooled z-test, p-value and effect size.
Open → Two Proportion Z-Test CalculatorEstimate how far apart two population proportions are. Enter successes and sample sizes for two independent groups and choose a confidence level; the calculator gives the difference p̂₁ − p̂₂, its standard error, the margin of error and the confidence interval, and tells you whether the interval includes zero.
Formula (p̂₁ − p̂₂) ± z·SE
Group 1
Group 2
A confidence interval for the difference between two proportions is (p̂₁ − p̂₂) ± z* · √(p̂₁q̂₁/n₁ + p̂₂q̂₂/n₂), using each group's own proportion in an unpooled standard error. If the interval contains zero, no difference is still plausible at that confidence level; if it excludes zero, the groups differ.
Compute both sample proportions
p̂₁ = x₁/n₁, p̂₂ = x₂/n₂, and the point estimate p̂₁ − p̂₂.
Add the two variances
Variances of independent estimates add: SE = √(p̂₁q̂₁/n₁ + p̂₂q̂₂/n₂). Standard errors do not add directly.
Multiply by z* and add ±
Margin of error E = z*·SE; interval (p̂₁ − p̂₂) ± E.
Look for zero
Zero inside the interval means "no difference" is still plausible at this confidence level.
Unpooled interval. Each group's own proportion sets its own variance.
The two proportion z-test answers "is there a difference?"; this interval answers "how big is it, plausibly?". Report both.
These two proportion confidence interval examples show a clear and a borderline result. When 45 of 150 patients improve on treatment and 30 of 150 on placebo, the difference is 0.10 with a 95% interval of 0.0027 to 0.1973, so zero is excluded, though only just.
45 of 150 improve on treatment, 30 of 150 on placebo. 95% interval for the difference?
0.3 to 19.7 points higher — zero excluded, just
A/B test: 120 of 1,000 vs 150 of 1,000. 95% interval?
B is 0.01 to 6 points better — barely clear of zero
A p-value compresses the result into one number about one hypothesis. The interval keeps both pieces of information: where the difference probably is and how precisely it is known. In the A/B example, the p-value of 0.0496 says "significant"; the interval adds that the true improvement could be anywhere from almost nothing to six points — a much more honest summary for anyone deciding whether to ship version B.
A narrow interval needs large samples in both groups. If you are planning a comparison, the sample size calculator gives the size for one proportion; for a difference of two, roughly double the per-group requirement as a first estimate. For a single group, use the one-proportion confidence interval calculator, and see the guide to proportions in statistics for the background.