DoesWhatAnswersSlangEmojisCalculatorsTriviaPlayBlog

Trivia Questions and Weird Facts

Math

What Is the Sample Size Formula?

Short answerThe sample size formula estimates how many people you need to survey so your results are close to the truth. The common version is n = z squared times p times (1 minus p), all divided by margin of error squared. Plug in a confidence level, an expected proportion, and your error tolerance.

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²

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 errorSample size (95 percent, p = 0.5)
10 percentabout 96
5 percentabout 384
3 percentabout 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

Keep going