Two-Proportion z-Test Calculator
Test whether two independent groups differ in their success rate using a pooled two-proportion z-test.
Alternative hypothesis
p-value = 0.0285
- 1
Proportion 1 (p̂₁)
45 ÷ 100 = 0.45 - 2
Proportion 2 (p̂₂)
30 ÷ 100 = 0.3 - 3
Pooled proportion (p̄)
(45 + 30) ÷ (100 + 100) = 0.375 - 4
Standard error
√(0.375 × (1 − 0.375) × (1÷100 + 1÷100)) = 0.0685 - 5
z statistic
(0.45 − 0.3) ÷ 0.0685 = 2.1909
How does this calculator work?
A two-proportion z-test compares success rates of two independent groups. It pools the data to estimate a common proportion, computes z = (p̂1 − p̂2) divided by the pooled standard error, and converts z to a p-value via the normal distribution. A small p-value means the proportions differ significantly.
Formula
How this is calculated
Enter the number of successes (x1, x2) and sample sizes (n1, n2) for two independent groups, then choose the alternative hypothesis tail. The calculator computes the sample proportions p̂1 = x1/n1 and p̂2 = x2/n2, and the pooled proportion p̄ = (x1 + x2)/(n1 + n2) used under the null hypothesis that both groups share a common success rate.
The pooled standard error is √(p̄(1 − p̄)(1/n1 + 1/n2)). The z statistic is the observed difference p̂1 − p̂2 divided by that standard error. The p-value comes from the standard normal CDF Φ: two-tailed = 2(1 − Φ(|z|)), right-tailed = 1 − Φ(z), and left-tailed = Φ(z). The RangeMeter places z on the standard normal scale, where ±1.96 mark the 5% two-tailed critical values.
This test assumes independent random samples and large enough counts (a common rule is at least 5 successes and 5 failures in each group) so the normal approximation holds. Successes must not exceed sample sizes, and sample sizes must be positive; the p-value is reported on the 0–1 scale. Φ is evaluated with the Abramowitz & Stegun erf approximation.
Frequently asked questions
Under the null hypothesis both groups have the same true proportion, so combining the successes gives the best single estimate of that shared rate, which is then used to build the standard error.
A p-value below your significance level (commonly 0.05) suggests the observed difference in proportions is unlikely under the null hypothesis, so you reject it and conclude the proportions differ in the tested direction.
When samples are not independent, or when expected counts are very small (fewer than about 5 successes or failures per group). In those cases consider Fisher’s exact test instead.
Also known as
TG we-Calculate Editorial Team. (2026). Two-Proportion z-Test Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/two-proportion-z-test-calculator
TG we-Calculate Editorial Team. "Two-Proportion z-Test Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/two-proportion-z-test-calculator.
TG we-Calculate Editorial Team, "Two-Proportion z-Test Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/two-proportion-z-test-calculator
@misc{wecalculate_two_proportion_z_test_calculator, title = {Two-Proportion z-Test Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/two-proportion-z-test-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
