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