Two-Proportion Z-Test Calculator
Compare two conversion rates with a two-proportion z-test. Get the pooled proportion, z-score, one- and two-tailed p-values, and a confidence interval.
Frequently Asked Questions about the Two-Proportion Z-Test Calculator
When should you use a two-proportion z-test?
Use it to check whether two independent groups have different success rates, such as the conversion rates in an A/B test, the click-through rates of two ads, or the pass rates of two classes. Each group is summarized by its number of successes and its total sample size. The test asks whether the observed gap between the two proportions is larger than you would expect from random sampling alone.
How is the z-statistic calculated?
First the calculator finds each sample proportion, p1 = x1/n1 and p2 = x2/n2, then the pooled proportion p = (x1 + x2) / (n1 + n2). The z-statistic is the difference p1 - p2 divided by the pooled standard error, sqrt(p(1 - p)(1/n1 + 1/n2)). A larger absolute z means the two proportions sit further apart relative to the sampling noise.
What is the difference between the one-tailed and two-tailed p-value?
The two-tailed p-value tests for a difference in either direction. The calculator's one-tailed value is the tail in the direction of the observed difference and is half the two-tailed value. A preregistered hypothesis in the opposite direction would use the other tail, not this displayed one-tailed value.
Why does the confidence interval use a different standard error than the test?
The hypothesis test assumes the two proportions are equal under the null hypothesis, so it pools both samples into one standard error. The confidence interval for the difference does not assume they are equal, so it uses the unpooled standard error, sqrt(p1(1 - p1)/n1 + p2(1 - p2)/n2). Because the two methods use slightly different variances, the interval and the p-value can occasionally disagree right at the significance boundary.
How large do the samples need to be?
The z-test relies on a normal approximation, which is reliable when each group has at least roughly 5 to 10 successes and 5 to 10 failures. With very small counts, or proportions near 0% or 100%, prefer an exact method such as Fisher's exact test. Larger samples also produce a narrower confidence interval for the difference.
Does a significant result prove the groups are different?
No. A small p-value means your data would be unlikely if the two proportions were truly equal, but it is not proof, and it does not measure how large the difference is. Read the confidence interval to judge practical importance, and remember that a non-significant result does not prove the proportions are equal. This tool is for education and analysis, not a guarantee about your specific decision.
Related Calculators
More calculators in "Math"
Chinese Remainder Theorem CalculatorCohen's d CalculatorEuler's Totient CalculatorExtended Euclidean Algorithm CalculatorMatrix Rank CalculatorMatrix Transpose Calculator
See all 202 calculators in "Math"