The short answer
Required sample size grows with how confident you want to be and shrinks as you accept a larger margin of error. For a proportion, n = (z² × p × (1−p)) ÷ e², where z comes from your confidence level, p is the expected proportion (0.5 if unknown), and e is your acceptable margin of error. Tighter margins and higher confidence both push the required sample size up, often dramatically.
Key takeaways
- Cutting the margin of error in half roughly quadruples the required sample size, since e is squared in the denominator.
- Using p = 0.5 when the true proportion is unknown is the safest choice, since p(1−p) is maximized there — any other guess would only need a smaller sample if you happened to guess right.
- A known, finite population size lets you apply a correction that meaningfully reduces the required sample for smaller populations, but makes little difference once the population is much larger than the sample.
- Estimating a mean requires an estimate of the population's standard deviation, not a proportion — the two calculation types use related but different formulas.
The proportion sample size formula
n = (z² × p × (1 − p)) / e²
z comes from the confidence level (1.96 for 95%), p is the expected population proportion, and e is the margin of error expressed as a decimal (5% = 0.05).
Why margin of error dominates the formula
| Margin of error | Required n (95% confidence, p=0.5) |
|---|---|
| 10% | 97 |
| 5% | 385 |
| 2.5% | 1,537 |
| 1% | 9,604 |
Halving the margin of error roughly quadruples the sample size needed — this is why national polls typically settle for a ±3-5% margin instead of chasing ±1% precision, which would require tens of thousands of respondents.
Worked example: planning a survey
You want 95% confidence and a 5% margin of error, with no prior estimate of the proportion.
n = (1.96² × 0.5 × 0.5) / 0.05² = 0.9604 / 0.0025 ≈ 384.16
Round up: n = 385
Sample size always rounds up, never down — a fractional respondent isn't possible, and rounding down would leave you just short of your target precision.
Common mistakes to avoid
- Expecting a halved margin of error to double the sample size — it roughly quadruples it instead, since e is squared.
- Guessing a proportion far from 50% "to be safe" — that actually shrinks the calculated sample size, the opposite of conservative; 50% is the truly conservative (maximum) choice.
- Applying the finite population correction to an effectively infinite population (national surveys, web traffic) — the correction barely changes anything at that scale.
- Confusing the proportion formula with the mean formula — the mean version needs an estimate of standard deviation, not a proportion.
Related calculators
- Confidence Interval Calculator — build the interval your finished study will actually report.
- Standard Deviation Calculator — estimate variability for the mean version of this calculation.
- Probability Calculator — explore the probability concepts behind confidence levels.
- P-Value Calculator — test a hypothesis once your data is collected.