Skip to content

Sample Size for Two Proportions

Plan how many observations you need per group to reliably detect a difference between two independent proportions, such as comparing two conversion rates or two event rates.

What this answers

This calculator answers "how many observations per group do I need to reliably detect a gap between these two assumed rates?" before you collect any data, using both rates as planning assumptions rather than something you already measured.

How it is calculated

This calculator uses the standard normal-approximation formula for two independent proportions: a pooled proportion is used for the alpha-driven term, and each group's own assumed rate is used for the power-driven term, combined and divided by the squared difference between the two rates. The result is rounded up to a whole number of observations per group.

Worked example

For an assumed rate of .5 in Group 1 and .65 in Group 2, at the conventional 95% confidence and 80% power, this calculator requires somewhere in the range of 160 to 180 observations per group, a substantial commitment reflecting how much data even a moderately sized 15 percentage-point gap requires to detect reliably.

Assumption audit

Calculated from your data: the pooled proportion driving the alpha term, and the required per-group and total sample sizes.
Evidence to review: how confident you are in both assumed rates; the required sample size is highly sensitive to how far apart p1 and p2 are, so a conservative (smaller) assumed gap protects against an underpowered study more than an optimistic one.
You must verify: that both groups will be sampled independently and that the two rates you assumed are realistic for your actual population, not simply desired targets.

What this result does not mean

This sample size is only correct if your assumed rates are reasonably close to what actually happens; if the true gap between groups turns out smaller than assumed, your study will be underpowered even though this calculation itself is correct given its inputs.

Common mistakes

Assuming a larger gap between p1 and p2 than is realistic, simply because it produces a smaller, more comfortable-looking sample size, is the most consequential error this calculator's inputs invite; a conservative (smaller) assumed gap is the safer planning choice. A second mistake is confusing this design with a single-proportion plan; if you are estimating one rate rather than comparing two groups, the Sample Size for a Proportion calculator is the correct tool instead.

Limitations

This calculator assumes equal allocation between the two groups; unequal allocation ratios (recruiting more into one group than the other) require a different, more general version of this same formula not offered by this specific calculator.