🧮 Free tool

Sample size calculator

How many people do you need to interview for your survey results to be reliable? Enter the population, the margin of error and the confidence level: the calculation is instant, and the formula is explained just below.

The total number of people concerned: beneficiaries, households, pupils, employees. Leave it empty if it is unknown or very large.
The tolerated spread around the result, in points. 5 % means a result of 60 % reads as "between 55 % and 65 %".
The probability that the true value falls inside the interval. 95 % is the survey convention.
Advanced options
The share of "yes" you expect. 50 % is the most demanding case, and therefore the cautious default.
The share of those contacted who will actually answer. Used to work out how many to approach.
People to interview
278
valid answers needed

Interviewing 278 people out of 1 000 gives a margin of error of ± 5 % at a confidence level of 95 %.

What if you changed the margin of error?

Margin of errorSampleSampling rate

The Cochran formula

The calculator applies the Cochran formula for estimating a proportion, together with the finite population correction. It is the reference in sample surveys, and it is the calculation most of the calculators on the market run under the bonnet.

n = N · z² · p(1 − p) (N − 1) · e² + z² · p(1 − p)

The result is then rounded up: you do not interview half a person.

nThe sample size you are after, that is, the number of valid answers to obtain.
NThe size of the total population the survey concerns.
zThe two sided quantile of the standard normal distribution matching the confidence level: 1.960 for 95 %.
pThe proportion expected in the population, between 0 and 1. It defaults to 0.5, the value that maximises the variance and therefore gives the most cautious sample.
eThe margin of error you want, between 0 and 1. A margin of 5 % is written 0.05.

Where this formula comes from

Under simple random sampling without replacement, the variance of the estimated proportion is Var(p̂) = p(1 − p)/n × (N − n)/(N − 1). The second factor is the finite population correction: the larger the share of the population you interview, the smaller the uncertainty. The margin of error is the half confidence interval, that is e = z × √Var(p̂). Isolate n in that equality and you get exactly the formula above.

The unknown population case: when N is very large, the correction term vanishes and the formula reduces to n₀ = z² · p(1 − p) / e². That is what the tool calculates if you leave the population field empty. At 95 % confidence and a 5 % margin, it gives 385, a figure you meet in a great many survey reports.

The two common ways of writing it are in fact equivalent: computing n₀ then applying n = n₀ / (1 + (n₀ − 1)/N) gives exactly the same result as the one line formula above.

A worked example

A distribution reached 5,000 households. You want to measure their satisfaction rate to within 5 % , at a confidence level of 95 %.

  1. Confidence level of 95 %: z = 1,96 (exact value 1.959964; the usual rounding does not change the final result), so z² = 3,8416.
  2. No assumption about the satisfaction rate, so take p = 0,5, so p(1 − p) = 0,25.
  3. Common numerator: z² × p(1 − p) = 0,9604.
  4. Margin of error of 5 %: e = 0,05, so e² = 0,0025.
  5. Denominator: (5 000 − 1) × 0,0025 + 0,9604 = 13,4579.
  6. Numerator: 5 000 × 0,9604 = 4 802.
  7. Result: 4 802 / 13,4579 = 356,8, rounded up to 357 households.

If you expect 15 % of households to be absent or to refuse, the expected response rate is 85 %, so you need to plan 357 / 0,85 = 420 visits to gather the 357 usable questionnaires.

The three parameters explained

The population size

This is the total number of individuals you want to draw conclusions about: all the beneficiaries of a project, all the households in an area, all the pupils in a district. One important and often counter intuitive point: its influence runs out quickly. Going from 100,000 to 10 million individuals changes almost nothing in the sample size required. What counts is not the share of the population interviewed, it is the absolute number of answers.

The margin of error

It is expressed in percentage points, not in relative percentage. A margin of 5 % on a result measured at 60 % means the true value lies between 55 % and 65 %, not between 57 % and 63 %. It is the most expensive parameter: halving the margin multiplies the sample by four, since e appears squared in the denominator.

Choosing your margin: 5 % is the standard for monitoring surveys. Go down to 3 % when a binding decision rests on the figure, or when you have to compare two subgroups. Accept 8 to 10 % for a quick orientation poll, and say so explicitly in the report.

The confidence level

It describes the reliability of the procedure, not of one particular result: at 95 %, if the survey were repeated a hundred times under the same conditions, the calculated interval would contain the true value in about 95 of them. Going from 95 % to 99 % looks harmless but costs a lot: at the same population and margin, the sample rises by about 73 %, since z goes from 1.960 to 2.576, and it too appears squared.

Where z comes from

The coefficient z is the two sided quantile of the standard normal distribution: the value such that the probability of falling between −z and +z equals the chosen confidence level. Formally, for a confidence level C, you take z = Φ⁻¹((1 + C)/2), where Φ⁻¹ is the quantile function of the normal distribution.

This calculator does not read z off a fixed table: it obtains it through a numerical approximation of Φ⁻¹ accurate to about 10⁻⁹, which lets it accept any confidence level at all, including 92.5 % or 98 %.

Confidence levelValue of z
80 %1,28161,6424
85 %1,43952,0723
90 %1,64492,7055
95 %1,96003,8415
97 %2,17014,7093
99 %2,57586,6349

Reference table

Sample sizes for a confidence level of 95 % and an expected proportion of 50 %, by population size and target margin of error.

Population ± 10 % ± 5 % ± 3 % ± 1 %
10050809299
25070152203244
50081218341476
1 00088278517906
2 500933347491 984
5 000953578803 289
10 000963709654 900
50 000963821 0458 057
100 000963831 0568 763
1 000 000973841 0669 513
Very large973851 0689 604

The saturation effect is plain to see: between 100,000 and 1,000,000 individuals, the "± 5 %" column moves by a single unit.

The limits to know about

This formula is exact within its frame, and that frame has boundaries. Ignoring them is the most frequent source of error in survey reports.

It assumes simple random sampling

Every individual must have the same probability of being drawn, independently of the others. As soon as you sample by cluster, by village, camp or school, that assumption fails: people in the same cluster resemble one another, so each answer carries less information. You then have to multiply the result by the design effect DEFF = 1 + (m − 1) × ρ, where m is the average number of individuals per cluster and ρ the intra cluster correlation coefficient. In humanitarian household surveys a DEFF of 1.5 to 2 is common, which is enough to double the sample.

The calculated size is not the number of people to contact

It is the number of valid answers to obtain. Absences, refusals, incomplete or nonsensical questionnaires mechanically cut the yield. Divide the size by the expected response rate to get the real field workload, which is what the "response rate" option of the calculator does.

It holds for the whole population, not for each subgroup

If you have to conclude separately about women and men, about three districts or about two age bands, each stratum must reach its own sample size. An overall sample of 400 people split into four groups of 100 gives each group a margin of error close to 10 %, not 5 %. This is the mistake that most often derails a disaggregated PDM survey.

It is about a proportion, not a mean

To estimate a mean (an income, a number of meals, a distance), the formula becomes n₀ = (z × σ / e)², where σ is the standard deviation of the variable and e the margin of error in the unit of the variable. The finite population correction applies in the same way.

The normal approximation needs a minimum of numbers

The interval rests on approximating the binomial distribution by a normal one, which holds as long as n × p and n × (1 − p) both exceed about 5. For a rare event (a prevalence of 2 %, for instance), use an exact interval of the Clopper-Pearson or Wilson kind, which is appreciably wider.

And above all: no formula corrects a selection bias. A sample of 2,000 people all recruited on the way out of the same distribution point remains less reliable than a random draw of 300 from the full list of beneficiaries. Size deals with sampling error, not coverage error.

Glossary

Population (N)
The complete set of individuals you want to conclude about, also called the target population, or the sampling frame when it is listed.
Sample (n)
The subset actually interviewed, meant to represent the population.
Margin of error
The half confidence interval around the measured result, in percentage points.
Confidence level
The probability that the calculated interval contains the true value, over a large number of repetitions of the survey.
Finite population correction
The factor that reduces the sample needed when you interview a non negligible share of a population of limited size.
Design effect (DEFF)
The ratio between the variance obtained with the real sampling design and that of a simple random draw of the same size.
Sampling rate
The share of the population actually interviewed, that is n divided by N.
Stratum
A subgroup of the population treated as a population in its own right for drawing the sample and for the analysis.

All the monitoring and evaluation terms are gathered in the full MEAL glossary.

Frequently asked questions

How do you calculate a sample size?

You apply the Cochran formula with the finite population correction: n = N·z²·p(1−p) / ((N−1)·e² + z²·p(1−p)), where N is the population size, e the margin of error you want, p the expected proportion (0.5 by default, the most demanding case) and z the normal quantile matching the confidence level (1.960 for 95 %). The result is rounded up.

What sample size for a population of 1,000 people?

For a population of 1,000 people, with a margin of error of 5 % and a confidence level of 95 %, you need to interview 278 people. With a margin of error of 3 % you need 517; with 10 %, 88 are enough.

What is the margin of error of a survey?

It is the maximum gap, in percentage points, between the result measured on the sample and the real value in the population. If 60 % of those interviewed say they are satisfied with a margin of error of 5 %, the true proportion very probably lies between 55 % and 65 %.

What is the confidence level?

It is the probability that the calculated interval contains the true value, if the survey were repeated a large number of times. At 95 %, about 95 samples out of 100 drawn under the same conditions would give an interval containing the real value. The higher it is, the larger the sample needed.

Why does the number 385 come up so often?

385 is the sample size required for an infinite or very large population, at 95 % confidence and a 5 % margin of error. Beyond about 100,000 individuals, the population size no longer affects the calculation: interviewing 385 people is enough, whether the population is 500,000 or 50 million.

Does this calculation hold for a cluster survey?

No, not directly. The formula assumes simple random sampling. For a cluster survey (villages, households, schools), you have to multiply the result by the design effect DEFF = 1 + (m−1)·ρ, where m is the average cluster size and ρ the intra cluster correlation coefficient. A DEFF of 2, common in humanitarian household surveys, doubles the sample size needed.

Should you plan for more people than the calculated sample size?

Yes. The calculated size is the number of valid answers to obtain, not the number of people to contact. If you expect 80 % usable answers, you need to contact n / 0.80 people. The calculator includes this response rate in its advanced options.

Can I use an expected proportion other than 50 %?

Yes, and it is even preferable when you have a solid estimate, from a baseline survey for instance. A proportion of 10 % or 90 % cuts the sample needed considerably, since p(1−p) falls from 0.25 to 0.09. But if your estimate is wrong, the real margin of error will be wider than announced: with no reliable reference point, keep 50 %.

From the sample to the questionnaire

Once the sample size is settled, the real work begins: designing the questionnaire, deploying it in the field, analysing the answers and writing the report. That is exactly what Opti' covers. Describe your survey in one sentence, and Opti Gemba generates a complete XLSForm questionnaire , ready to import into KoboToolbox or ODK, with skip logic, constraints and humanitarian disaggregation. Collection, disaggregated analysis and the narrative report follow in the same tool.

Your sample is calculated. What about the questionnaire?

Create your free account, no card required, and get an XLSForm ready to import into Kobo.

Open Opti' →