Sample size calculator
Working backwards from the margin of error you can live with gives the sample size you have to collect.
%
%
Leave at zero for an effectively infinite population.
Sample size needed
1068
- Before the population correction
- 1067.1
- Share of the population
- 0.000 %
Show the working
- Target margin of error = 3
- Expected proportion = 50
- Confidence level = 1.959 96
- Population size = 0
- prop = 50 / 100 = 0.5
- err = 3 / 100 = 0.03
- Before the population correction = 1.959 96^2 * 0.5 * (1 - 0.5) / 0.03^2 = 1067.07
- adjusted = 0 > 0 ? 1067.07 / (1 + (1067.07 - 1)/0) : 1067.07 = 1067.07
- Sample size needed = ceil(1067.07) = 1068
- Share of the population = 0 > 0 ? 1068 / 0 * 100 : 0 = 0
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- n = z^2 p(1-p) / e^2
- adjusted n = n / (1 + (n - 1)/N) for a finite population
Assuming a 50/50 split gives the largest, safest sample size. If you genuinely expect a lopsided result you can use fewer.
A 3% margin at 95% confidence needs 1068 responses, whether the population is a city or a country.