Understanding the sample size calculator — concept and principle
Before running a survey or poll, you need to know how many responses are enough to estimate a percentage within a chosen margin of error. This calculator answers that question for a proportion, such as the share of customers who are satisfied or voters who support a proposal, with an optional correction when the population is small.
How it is calculated
- Infinite population: n₀ = z² × p(1 − p) ÷ e², where z is the critical value for the confidence level (1.96 for 95%, 2.576 for 99%), p is the expected proportion and e is the margin of error, both as decimals.
- Finite population correction: n = n₀ ÷ [1 + (n₀ − 1) ÷ N], where N is the population size. Enter 0 to skip it.
- The result is always rounded up, because a fraction of a respondent is not possible and rounding down would miss the target precision.
The principle
The margin of error of a proportion is z × √[p(1 − p)/n]. Setting that equal to e and solving for n gives the formula. The term p(1 − p) is largest at p = 0.5 (value 0.25), so assuming 50% gives the most conservative, largest sample when you have no prior estimate. When you sample a large share of a finite population, each response removes more uncertainty, which is what the correction factor captures.
Worked example
- Inputs: confidence 95%, margin 5%, expected proportion 50%, population 0 (infinite).
- z = 1.959964, so z² = 3.841459.
- n₀ = 3.841459 × 0.5 × 0.5 ÷ 0.05² = 0.960365 ÷ 0.0025 = 384.15.
- Round up: 385 respondents.
- Because the population is infinite, the infinite-population n is also 385.
| Population (0 = infinite) | Sample size |
|---|---|
| 0 | 385 |
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
| 4 | 4 |
| 5 | 5 |
| 6 | 6 |
How to read the result
385 is the number of completed, usable responses, not the number of invitations. If you expect a 20% response rate, you need to contact about 385 ÷ 0.20 ≈ 1,925 people. Precision is costly: halving the margin to 2.5% roughly quadruples n to 1,537, and moving to 99% confidence at 5% raises it to 664. For a population of 10,000 the correction lowers 385 to 370.
Common mistakes
- Entering the margin as 0.05 when the field expects a percentage (5).
- Forgetting that subgroup results (for example, only women aged 20–29) need their own adequate sample size.
- Assuming a large sample fixes a biased sampling method; it does not.
Frequently asked questions
Why is 385 so common in survey guides?
It is the result for 95% confidence, ±5% and p = 50%, the most frequently used default.
Does a population of 1 million need a larger sample than 100,000?
Barely. Once the population is much larger than the sample, size hardly matters; precision depends mainly on n.
Should I use a different p than 50%?
If a reliable earlier study suggests, say, 20%, using it gives a smaller n (246 at 95% and ±5%). Use 50% if unsure.
Sources: Cochran, W. G. (1977). Sampling Techniques (3rd ed.). Wiley. · NIST/SEMATECH e-Handbook of Statistical Methods.