What Is the Sample Size Formula?
What does the sample size formula actually do?
It answers one question: how many responses do I need before I can trust the number I get? Survey too few people and your result swings wildly. Survey enough and a small group can stand in for a big one. The formula turns your tolerance for error into a headcount.
What is the formula in plain words?
For a proportion, the standard formula is:
n = z² × p × (1 − p) ÷ e²
- z is the confidence level. For 95 percent confidence, z is 1.96.
- p is the share you expect to answer a certain way. If you have no idea, use 0.5, which is the safe worst case.
- e is your margin of error as a decimal. Five percent becomes 0.05.
- n is the sample size you get.
If your population is small, you then shrink n with a finite population correction. For big populations, the formula above is enough.
What is a worked example?
Say you want 95 percent confidence, a 5 percent margin of error, and you have no clue what share will say yes, so p is 0.5.
n = 1.96² × 0.5 × 0.5 ÷ 0.05²
That is 3.8416 × 0.25 ÷ 0.0025, which gives about 384. So you need roughly 384 completed responses. Want a tighter 3 percent margin? The number jumps to about 1,067. Precision gets expensive fast.
| Margin of error | Sample size (95 percent, p = 0.5) |
|---|---|
| 10 percent | about 96 |
| 5 percent | about 384 |
| 3 percent | about 1,067 |
Why does p = 0.5 show up so often?
Because it is the most cautious guess. When p is 0.5, the p × (1 − p) part hits its maximum, so you get the biggest, safest sample size. If you truly expect 90 percent of people to say yes, the required sample shrinks. Guessing 0.5 just means you will not undershoot.
What is the surprising part?
A sample of about 1,000 people can represent a country of millions with only a few points of error. The catch is randomness. A perfect random sample of 384 beats a sloppy sample of 10,000, which is why pollsters obsess over how people were picked, not just how many.
Do the math: open the sample size calculator