What this answers
This planner answers "how many observations do I need to collect, before I start, to estimate a proportion to a specific level of precision?" It is a design tool used before data collection, not an analysis tool used after it. Answering "how big should my sample be" always requires a decision about what precision and confidence you actually need; there is no single universal sample size that fits every question.
How it is calculated
Required sample size is the square of your confidence level's z critical value, times the expected proportion times one minus that proportion, divided by the square of your target margin of error, then rounded up to a whole number of observations. The expected proportion matters because a proportion near 0.5 has the most inherent variability to estimate; using 0.5 when you genuinely do not know the true proportion is the conservative choice, since it never underestimates the sample size you need. If you expect to lose participants after enrollment, an attrition-adjusted enrollment target inflates the raw requirement so the number who actually complete the study still meets your target.
Worked example
For a 95% confidence level, a 5 percentage point target margin of error, and the conservative assumption of p = 0.5: the required sample size works out to 385, matching the widely cited result for this exact combination. If you additionally expect 20% attrition, the enrollment target rises to 385 divided by 0.8, rounded up to 482, so that 385 people are still expected to remain after the expected dropout.
Assumption audit
What this result does not mean
This required sample size describes statistical precision only. It says nothing about whether your sampling frame is representative, whether nonresponse will be random or systematic, or whether the margin of error you chose is actually small enough to answer your real decision. A correctly sized but poorly sampled study still produces a misleading estimate.
Limitations
This formula assumes a simple random sample and a normal approximation to the binomial distribution, which is accurate for the sample sizes typically involved here but does not account for clustering, stratification, or other complex survey designs. Those designs require a design effect adjustment beyond this calculator's scope.