Home › Statistics & Probability Calculators › Sample Size Calculator for a Proportion
Sample Size Calculator for a Proportion
This is the classic survey sample size calculator. Enter the expected proportion (use 0.5 if you have no idea, since it gives the largest and therefore safest n), the margin of error you want (0.03 for ±3 percentage points), the confidence level and, if you are sampling from a known, limited population, its size.
The formula is n = z²p(1 − p) ÷ E². When a population size is given, the finite population correction nadj = n ÷ [1 + (n − 1)/N] reduces the requirement, which matters when the sample would be more than about 5% of the population. Results are rounded up.
With p = 0.5, 95% confidence and E = 0.03 the answer is 1068, which is why national polls typically survey about a thousand people. Once the data are in, use the confidence interval for a proportion to report the actual margin of error. The formula assumes simple random sampling; cluster or quota samples usually need a larger n to reach the same precision.
Result and step-by-step solution
To estimate a proportion within ±4 percentage points with 95% confidence.
- Formulan = z² × p(1 − p) ÷ E²
- Critical valuez0.025 = 1.96
- Substituten = 1.96² × 0.5 × 0.5 ÷ 0.04² = 600.2279
- Round upn = 601
Frequently asked questions
- Why use p = 0.5 when the proportion is unknown?
- p(1 − p) is largest at p = 0.5, so it gives the largest sample size. Any true proportion will then be estimated at least as precisely as planned.
- What is the finite population correction?
- An adjustment that reduces n when the population is small: n ÷ [1 + (n − 1)/N]. Sampling 300 of 400 students needs fewer responses than 300 from a whole country.
- How many people do I need for a ±5% margin of error?
- 385 at 95% confidence with p = 0.5. For ±3% it is 1068 and for ±1% it is 9604.
- Does the sample size depend on the population size?
- Only slightly, and only through the finite population correction. For large populations the required n is essentially the same whether the population is 100,000 or 100 million.
Last reviewed: September 25, 2026. Calculations run in your browser and were validated against SciPy.
