Statistical Calculators › Proportions: One and Two Groups › Two-Sample Proportions (Pooled) Sample Size Calculator
← All Calculators

Proportions: One and Two Groups

Two-Sample Proportions (Pooled) Sample Size Calculator

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.

Study Design

Specify the proportions you expect under the alternative hypothesis and the desired operating characteristics.

Required Sample Size

Normal-approximation sample size for the pooled-variance two-proportion Z-test.
Enter the study parameters and click Calculate Sample Size.

Methodology

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.

Sample Size Formula

Let p1 and p2 be the anticipated proportions under the alternative hypothesis and let d = |p1p2|. For an allocation ratio r = n2/n1, the pooled planning proportion is

p̄ = (p₁ + r p₂) / (1 + r)

The required sample size in Group 1 is calculated as

n₁ = [ zα √{ p̄(1−p̄)(1+1/r) } + zβ √{ p₁(1−p₁) + p₂(1−p₂)/r } ]² / (p₁−p₂)²

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.

Critical Values

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).

Worked Validation Example

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.

P₁ = 0.65  ·  P₂ = 0.55  ·  α = 0.05  ·  Power = 0.80  ·  One-sided  ·  N₂/N₁ = 1
Unrounded N₁ = 295.7146  →  N₁ = 296, N₂ = 296, Total N = 592

Interpretation

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.

References

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 .