Sample Size & Margin of Error Planner

plan survey sample size and precision

Loading interactive simulation...

A national poll needs no more people than a town poll

How many people you need barely depends on how many people there are. At 95% confidence and ±5%, this tool asks for 385 respondents whether the population is one million or entirely unbounded — the two give the identical answer. Only when the population shrinks to something like 5,000 does the finite-population correction bite at all, and even then it merely trims 385 to 357. The intuition it overturns is the idea that a sample should be a percentage of the whole, which would make polling a country hopeless; what the formula actually cares about is how much random variation you are willing to tolerate, and a population of millions contributes none of its own.

Why precision quadruples the cost

This planner answers one question: how many people must you ask to pin a percentage down to a chosen margin of error? Because the margin shrinks with the square root of the sample size, buying twice the precision costs four times the respondents — moving from ±3% to ±1.5% roughly quadruples n. When the expected proportion is unknown, set p = 0.5: that maximizes p(1−p) and gives the largest, safest sample size.

When 2.4 million answers got it wrong

The margin-of-error formula measures only random sampling error — it assumes every respondent was chosen at random. In 1936 the Literary Digest polled about 2.4 million people and confidently predicted Landon would beat Roosevelt; George Gallup called it correctly with barely 50,000. The Digest's list over-sampled car and telephone owners during the Depression, so a huge but biased sample lost to a small representative one. No sample size can fix a skewed sampling frame.

Problem solved in full

  1. The sample size for a poll accurate to ±5% at 95% confidence 5 steps

    You want a poll accurate to ±5% at 95% confidence. Derive the sample size — then find what it costs to halve the error, and why the population size never appears.

    1. The margin of error is the half-width of the confidence interval for a proportion. It shrinks as the square root of the sample size, which is where everything surprising comes from.

      ME=z∗p(1−p)n\text{ME}=z^{*}\sqrt{\frac{p(1-p)}{n}}
    2. Rearrange for n. The 1.96 is the standard normal value cutting off 2.5% in each tail — it is a property of the confidence level, not of your data.

      n=(z∗)2p(1−p)ME2,z∗=1.96 at 95%n=\frac{(z^{*})^2p(1-p)}{\text{ME}^2},\qquad z^{*}=1.96\ \text{at }95\%
    3. Substitute. The planner above prints this n, and the answer of 385 is the reason so many polls quote around a thousand respondents.

      n=1.962×0.250.052=0.96040.0025=384.2 → 385n=\frac{1.96^2\times0.25}{0.05^2}=\frac{0.9604}{0.0025}=384.2\ \rightarrow\ 385
    4. Notice p = 0.5 was used without knowing the true proportion. That is deliberate: p(1−p) peaks there, so it is the worst case and the sample size is safe whatever the answer turns out to be.

      p(1−p)≤0.25 always, maximised at p=0.5p(1-p)\le0.25\ \text{always, maximised at }p=0.5
    5. Now halve the target error. The square in the denominator does the damage.

      ME=2.5%: n=0.96040.000625=1537\text{ME}=2.5\%:\ n=\frac{0.9604}{0.000625}=1537

    Answer

    385 people for ±5%, and 1537 for ±2.5%. Four times the cost to double the precision — the square-root law running backwards, and the reason polls stall at a few thousand rather than pushing to ±1%, which would need 9604. The other surprise is what is missing: the population never enters. A sample of 385 is as accurate for a city of 100 000 as for a country of 100 million, because the estimate depends on how many you asked, not on how many you did not.

    n=(z∗)2p(1−p)ME2=385ME halved⇒n quadrupledn=\frac{(z^{*})^2p(1-p)}{\text{ME}^2}=385\qquad \text{ME}\ \text{halved}\Rightarrow n\ \text{quadrupled}

Learning path

When is a difference real?

References (1)
Further reading (2)