Sample Size Calculator for a Proportion
Work out how many people to survey for a target margin of error and confidence level, with an optional finite-population correction.
How it works
n₀ = z² · p·(1 − p) ÷ E² · then n = n₀ ÷ [1 + (n₀ − 1) ÷ N] for a finite population N
Sample-size planning inverts the margin-of-error formula: pick the precision E and confidence you want, and solve for n. Because p(1 − p) is largest at p = 0.5, using 50% gives the safest (largest) sample when you have no prior estimate. Precision improves only with the square root of n, so halving the margin of error roughly quadruples the sample. When you are sampling a large fraction of a finite population, the correction factor lowers the count you actually need.
Worked example
For a ±5% margin at 95% confidence with p = 0.5: n₀ = 1.96² · 0.25 ÷ 0.05² = 0.9604 ÷ 0.0025 ≈ 384.16, so you need 385 respondents. From a town of 5,000 the correction drops it to about 357.
Frequently asked questions
Why assume 50% if I do not know the proportion?
The variance term p(1 − p) is maximised at 0.5, so planning with 50% guarantees your sample is large enough no matter the true value. If you have a solid prior estimate — say 20% — using it lowers the required sample.
What is the finite-population correction?
When your sample is a meaningful slice of a small population, you can survey fewer people because each response carries more information. Entering the population size applies n = n₀ ÷ [1 + (n₀ − 1) ÷ N]; leaving it at 0 treats the population as effectively infinite.
Does a bigger population need a much bigger sample?
No — this is a common surprise. Above a few thousand, the required sample barely changes with population size. A national poll and a state poll aiming for the same margin need almost identical sample sizes.
Related calculators
For education — check the assumptions (sample size, independence, distribution) before using these results in real decisions.