Proportions: One and Two Groups
Calculates the sample size required for a two-sided or one-sided pooled Z-test comparing two independent proportions. Enter the anticipated proportions, significance level, desired power, and allocation ratio. Runs entirely in your browser.
This calculator uses the normal-approximation Z-test with pooled variance for comparing two independent proportions. The null hypothesis is that the two population proportions are equal. Under the null hypothesis, the variance is estimated using the pooled proportion rather than the two separate alternative proportions.
Let p1 and p2 be the anticipated proportions under the alternative hypothesis and let d = |p1 − p2|. For an allocation ratio r = n2/n1, the pooled planning proportion is
The required sample size in Group 1 is calculated as
Group 2 is then n2 = r n1. The calculator rounds each resulting group size upward to the next whole participant. For equal allocation, r = 1, giving the familiar equal-group pooled-Z formula.
For a two-sided test, zα is the 1−α/2 standard-normal quantile. For a one-sided test it is the 1−α quantile. The quantity zβ is the standard-normal quantile corresponding to the requested power, so that zβ = Φ&supmin;¹(power).
PASS's published validation example uses a one-sided pooled Z-test with P2 = 0.55, a difference of 0.10, α = 0.05, 80% power, and equal allocation. Thus P1 = 0.65. The required sample size is 296 participants per group, or 592 total. This calculator reproduces that result.
The result is the planned analyzable sample size under the specified normal-approximation assumptions. It does not automatically inflate for dropout, non-evaluable participants, interim analyses, multiplicity, continuity correction, or an exact binomial calculation. Those design considerations should be incorporated separately when applicable.
NCSS. PASS Sample Size Software: Tests for Two Proportions. The PASS documentation describes the pooled Z-test and provides the published validation example used above. PASS procedure documentation .
Fleiss, J. L. (1981). Statistical Methods for Rates and Proportions, 2nd ed. New York: John Wiley & Sons. Chapter 4, “Determining Sample Sizes Needed to Detect a Difference between Two Proportions.” Wiley reference .
nQuery Statistical Solutions. nQuery Advanced User Manual. The manual describes pooled and unpooled variance for two-proportion designs and defines the pooled variance in terms of the weighted average proportion. nQuery manual .