Two-Proportion Z-Test Calculator
Test whether two population proportions are significantly different.
Enter successes and sample sizes for each group to get the z-statistic, p-value, and confidence interval.
The two-proportion z-test asks: given two samples from two groups, is the difference in their proportions statistically significant, or could it be explained by random sampling variation?
Setup: group 1 has x1 successes out of n1 trials (proportion p1 = x1/n1). Group 2 has x2 successes out of n2 trials (proportion p2 = x2/n2).
The pooled proportion (assuming the null hypothesis H0: p1 = p2 is true): p_pool = (x1 + x2) / (n1 + n2)
The z-statistic: z = (p1 - p2) / sqrt(p_pool * (1 - p_pool) * (1/n1 + 1/n2))
A large |z| means the observed difference is unlikely under H0. Common critical values: |z| > 1.645 for p < 0.10 (one-tailed), |z| > 1.96 for p < 0.05, |z| > 2.576 for p < 0.01.
This calculator uses a normal approximation. It is valid when both n1p_pool and n1(1-p_pool) are at least 5 (and similarly for group 2). For small samples, use Fisher’s exact test instead.
The 95% confidence interval for (p1 - p2) uses the unpooled standard error: SE = sqrt(p1*(1-p1)/n1 + p2*(1-p2)/n2) CI: (p1 - p2) +/- 1.96 * SE
If this interval excludes zero, the difference is significant at the 5% level – consistent with (but not identical to) the pooled test.