On this page
What a two-proportion power planner estimates
This planner estimates the equal number of analyzable observations needed in each of two independent groups to detect a specified difference between binary success probabilities, or estimates prospective power for a fixed group size. It uses a normal approximation for the pooled two-proportion z-test of equal population proportions. It is a planning tool for one superiority question, not a test of data already collected.
A success might mean a student completed a task or a participant met a prespecified outcome. Define the outcome consistently in both groups. The entered proportions describe assumptions for planning; they are not observed rates, a forecast, or a recommended effect size. Choose values from relevant prior evidence or a smallest difference that matters to the study question.
Enter expected proportions and a difference worth detecting
Enter the anticipated success rate for Group 1 and Group 2 as percentages. The signed difference is Group 1 minus Group 2 and is shown in percentage points. For example, 75% versus 50% describes a 25 percentage-point difference. This is not a 25% relative increase; relative comparisons use a different scale.
Do not choose proportions because they produce a convenient recruitment target. Explain why the assumed difference matters, how the baseline rate was obtained and how well those sources match the planned population and measurement. If the difference is uncertain, compare several justified scenarios rather than presenting one estimate as certain.
Choose alpha, target power and direction before the study
Alpha is the planned Type I error probability under the null model. Target power is the probability of rejecting that null when the specified alternative and model are true. Select a one-sided direction only if it was justified in advance; the planner requires the assumed difference to align with that direction. A two-sided test evaluates departures in either direction.
If the study has multiple primary outcomes, interim analyses, clustered groups or a non-inferiority question, a single unadjusted two-proportion calculation does not represent that design. Document the outcome, null and alternative hypotheses, alpha, target power, effect assumption, allocation and planned analysis before data collection.
How the pooled-null approximation works
For equal group sizes n, the null model pools the expected proportions: p̄ = (p₁ + p₂)/2. The null standard error for the difference is √[2p̄(1 − p̄)/n]. Under the planning alternative, the variance uses the two separate expected proportions: √[p₁(1 − p₁)/n + p₂(1 − p₂)/n]. The calculation evaluates the full rejection probability, including both tails for a two-sided test, then searches supported integer group sizes, starting at two per group, for the first count that reaches the target.
R’s documented example uses p₁ = 0.50, p₂ = 0.75, alpha = 0.05 and target power = 0.90, with a continuous estimate of 76.7 observations per group. This planner rounds to 77 per group, or 154 analyzable observations in total; under its two-tail approximation, estimated power is about 90.11% at 77 and 89.73% at 76. This reproduces a published software example for checking the calculation, not a recommendation or a study result.
Interpret analyzable counts and design limits
The sample-size result is the number of analyzable participants or independent units in each equally sized group. It does not add an allowance for attrition, missing outcomes, exclusions, nonresponse or unusable records. If you expect losses, estimate a recruitment target separately and show the assumption used.
The model assumes two independent binomial samples and a pooled z-test of equality, without a continuity correction. It is a normal approximation, not exact binomial power. It does not handle paired before-and-after outcomes, unequal allocation, clustering, stratification, covariate adjustment, multiple testing, non-inferiority or equivalence. Inspect the expected success and failure counts and the approximation’s suitability for your design; there is no universal sparse-count cutoff that makes this calculation valid for every study. Use a method that reflects the study design and verify the analysis with qualified statistical support when needed.
Free statistical planning tool
Plan sample size for two independent proportions
Use expected success rates you can justify before data collection. Estimate equal analyzable group sizes or prospective power under the pooled two-proportion z-test approximation.
The calculation runs in this browser. The entered planning assumptions are not uploaded or automatically saved.
The published R example is loaded. Calculate to inspect its planning estimate.
Planning estimate
- Expected Group 1 proportion
- Expected Group 2 proportion
- Expected difference (Group 1 − Group 2)
- Alpha
- Target or estimated power
- Power at the previous group size
- Expected successes / failures in Group 1
- Expected successes / failures in Group 2
- Model
- Pooled two-proportion z-test; normal approximation
Questions about this topic
How many participants do I need in each group to compare two proportions?
There is no single number. It depends on the baseline and target proportions, alpha, target power, direction, allocation and test method. This tool estimates equal group sizes for one independent two-proportion z-test under a normal approximation.
Is sample size for two proportions different from a survey sample-size calculator?
Yes. A survey precision calculator estimates responses for one population proportion at a chosen confidence level and margin of error. This planner estimates group sizes for a hypothesis test of a difference between two independent proportions at a target power.
Can I use this planner for before-and-after data from the same people?
No. The groups must be independent. Paired binary outcomes require a method that accounts for within-pair changes, such as McNemar’s test.
Does the output include people I may lose to follow-up?
No. The result is the analyzable count in each group. Make a separate, justified recruitment adjustment for missingness, attrition or unusable outcomes.
Does it calculate power exactly for small samples?
No. It uses a normal approximation to the pooled two-proportion z-test and does not calculate exact binomial power. Sparse expected successes or failures, unequal group sizes and complex designs need a method suited to those conditions.
Should I choose a one-sided test because it needs fewer participants?
Choose direction from the research question and protocol before seeing data. A one-sided test does not provide evidence for the unplanned opposite direction.
Are my planning values uploaded or saved?
No. The calculation runs in this browser tab and does not send or automatically save the entered planning values.
Sources and editorial notes
The supporting reading below informs our editorial guidance. Exercises and scenarios illustrate a method; they do not report a completed product test or measured learning outcome. Read our editorial policy or send a correction with a supporting source to info@ai-essay.com.