InfyCalculator
📊

Two-Proportion Z-Test Calculator

Compare conversion or success rates between two groups — pooled z statistic, one- and two-sided p-values, the difference with its confidence interval and relative lift.

Group 1 successes
Group 1 trials
Group 2 successes
Group 2 trials
Confidence level
Loading calculator…

How it works

z = (p̂₂ − p̂₁) ÷ √[p̄(1−p̄)(1/n₁ + 1/n₂)], p̄ = (x₁+x₂)/(n₁+n₂); CI = (p̂₂−p̂₁) ± z·√[p̂₁(1−p̂₁)/n₁ + p̂₂(1−p̂₂)/n₂]

The two-proportion z-test is the workhorse of A/B testing. Under the null the two groups share one rate, so the standard error is built from the pooled proportion; the confidence interval for the difference uses the separate rates instead. It is equivalent to the 2×2 chi-square test (z² = χ²). Expected counts should be at least 10 per cell for the normal approximation to be trusted.

Worked example

210/5,000 (4.20%) vs 258/5,100 (5.06%): z = 2.05, two-sided p = 0.040, difference 0.86 points (95% CI 0.04 to 1.68) — a 20% relative lift.

Frequently asked questions

Pooled or unpooled standard error?

Pooled for the test statistic (the null assumes equal rates); unpooled for the confidence interval around the observed difference.

Can I stop the test when p drops below 0.05?

No — repeated peeking inflates false positives. Fix the sample size in advance with the MDE calculator or use a sequential method.

Related calculators

For education — check assumptions (sample size, distribution, independence) before using a test result in a real decision.