The formula
n = z² · p · (1 − p) / e², corrected for a finite population
What it means
Sample size follows from three decisions: how much confidence you want, how much margin of error you accept and what proportion you expect to find. With no idea of the proportion, 50 % is used, which demands the largest sample and is therefore the safe choice. The finite population correction kicks in when the whole group is not much bigger than the sample: surveying four hundred people in a town of a thousand is not the same as in a country.
How to work it out by hand
- Pick the confidence level and look up its critical value: 1.96 for 95 %
- Decide the margin of error you accept, as a fraction
- Apply n = z² · p · (1 − p) ÷ e², with p = 0.5 if the proportion is unknown
- If the population is small, correct by dividing by 1 + (n − 1) ÷ N
What is worth knowing
This number is the mathematical minimum for the margin you asked for, and it assumes simple random sampling and a full response rate. In practice you have to approach more people than the formula says because some will not answer, and if the sampling is clustered or stratified the calculation changes. And the famous figure of 385 people for "any country" is real and rightly baffling: past a certain size, the population stops mattering almost entirely.