Sample Size Calculator
Written by Thierno Sadou Diallo, formula verified per our methodology • Last checked on 9/10/2026
The needed sample size is calculated with n = (Z² × p × (1−p)) ÷ e². For a confidence level of 95%, a margin of error of 5%, and an estimated proportion of 50%, you need 385 respondents.
Explanation
Before launching a survey or study, it is essential to determine how many respondents are needed for the results to be statistically reliable, rather than choosing an arbitrary number. Three parameters determine this size: the desired confidence level (the probability that the population's true result lies within the stated margin of error — 95% is the most widespread standard), the tolerated margin of error (the smaller it is, the larger the needed sample: halving the margin of error quadruples the required sample size, an inverse-square relationship often underestimated), and the estimated proportion in the population (a proportion close to 50% requires the largest sample, because it is the case of greatest statistical variability; if you do not know this proportion in advance, using 50% as a precaution guarantees a sufficient sample whatever the actual result). This formula assumes a large population (generally more than 20,000 individuals); for a smaller population, an additional correction factor slightly reduces the needed size, not calculated here. The result is always rounded up to the next respondent, since a survey cannot interview a fraction of a person.
Example: confidence 95%, margin 5%, proportion 50%
Inputs
Confidence level: 95% (Z = 1.96). Margin of error: 5%. Estimated proportion: 50%.
Calculation
n = (1.96² × 0.5 × 0.5) ÷ 0.05² = (3.8416 × 0.25) ÷ 0.0025 = 0.9604 ÷ 0.0025 = 384.16, rounded up to 385.
Result
You need to interview 385 respondents to reach this level of precision.
Frequently asked questions
Why use 50% for the estimated proportion if I have no idea?
Because the statistical variability p × (1−p) is maximal at 50%, which gives the largest possible sample size for the other parameters fixed. Using this default value guarantees the calculated sample stays sufficient, whatever the proportion actually observed once the survey is done.
Why does halving the margin of error quadruple the sample size?
Because the margin of error (e) appears squared in the denominator of the formula: dividing e by 2 amounts to dividing e² by 4, therefore multiplying the result of the division by 4. This is why aiming for very fine precision (a margin of error of 1%, for example) requires a considerably larger sample than a broader precision (5%).
Does this formula apply to any population size?
It assumes a population large enough (generally more than 20,000 individuals) that the population size itself does not influence the result. For a smaller population, a finite-population correction factor slightly reduces the needed sample size compared with what this formula gives, and is not applied here.