How to use this calculator
Free Two-proportion z-test calculator. Compare two sample proportions with a pooled standard error under the equal-proportions null.
- Enter Group 1 events / Group 2 events, Group 1 sample size / Group 2 sample size. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Test the equal-rate null using a pooled estimate
The two-proportion z test compares event rates from independent groups. Under its null hypothesis, the two populations share one proportion, so the standard error is calculated from the combined event count.
Inputs for this calculation
- Group 1 events / Group 2 events: Counts of the same binary event for the first and second groups.
- Group 1 sample size / Group 2 sample size: Total observations for each independent group.
Formula and method
Under H₀: p₁ = p₂, combine the event counts to estimate the shared rate, p̂ = (x₁ + x₂)/(n₁ + n₂). The null standard error is √[p̂(1 − p̂)(1/n₁ + 1/n₂)]; divide the observed rate difference by it to obtain z. This page reports a two-sided normal-approximation p-value.
Worked example
Group 1 has 16 events in 40 (40%); Group 2 has 12 in 60 (20%). The pooled estimate is 28/100 = 0.28, giving SE₀ = √[0.28×0.72×(1/40 + 1/60)] ≈ 0.09165. Thus z ≈ 0.20/0.09165 = 2.182 and the two-sided p-value is about 0.0291.
Reading the result
If the equal-proportion model were true, a difference at least this far from zero would be unusual under the normal approximation. The p-value is not the probability that the null is true and does not measure practical importance.
Assumptions and limits
The test assumes independent observations and a suitable large-sample approximation. Sparse expected cell counts can make the z approximation unreliable; exact or design-specific methods may be preferable.
Method references
Frequently asked questions
Why is the proportion pooled for this test?
The null hypothesis says both groups share one event probability, so their combined counts estimate that common probability for the null standard error.
How do I use the Two-proportion z-test calculator?
Enter Group 1 events / Group 2 events, Group 1 sample size / Group 2 sample size. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Two-proportion z-test?
Group 1 has 16 events in 40 (40%); Group 2 has 12 in 60 (20%). The pooled estimate is 28/100 = 0.28, giving SE₀ = √[0.28×0.72×(1/40 + 1/60)] ≈ 0.09165. Thus z ≈ 0.20/0.09165 = 2.182 and the two-sided p-value is about 0.0291.
What does the Two-proportion z-test calculator calculate?
Free Two-proportion z-test calculator. Compare two sample proportions with a pooled standard error under the equal-proportions null.
What assumptions apply to Two-proportion z-test?
The test assumes independent observations and a suitable large-sample approximation. Sparse expected cell counts can make the z approximation unreliable; exact or design-specific methods may be preferable.