Sample Size Calculator
This calculator tells you how many responses your survey needs for results you can trust. Pick a confidence level and a margin of error, estimate the proportion you expect, and add your population size if you know it — the sample size appears instantly.
Sample Size Formula (Cochran)
n₀ = Z² × p × (1 − p) / e²
When the population size (N) is known, the finite population correction shrinks the result:
n = n₀ / (1 + (n₀ − 1) / N)
- Z = the z-score for your confidence level: 1.645 for 90%, 1.96 for 95%, 2.576 for 99%
- p = the estimated proportion, as a decimal (50% = 0.5)
- e = the margin of error, as a decimal (5% = 0.05)
- N = the population size, if known
Worked Example
You want a survey at 95% confidence with a ±5% margin of error, and you have no earlier estimate, so p = 50%.
- n₀ = 1.96² × 0.5 × 0.5 / 0.05² = 3.8416 × 0.25 / 0.0025 = 384.16.
- Round up: for an unknown or very large population you need 385 responses.
- If the population is exactly 1,000 people, the correction gives n = 384.16 / (1 + 383.16 / 1,000) = 277.74, rounded up to 278 responses.
How to Use This Calculator
- Pick a confidence level — 95% is the standard for most surveys.
- Enter the estimated proportion — leave it at 50% unless earlier research suggests another figure.
- Enter the margin of error you can accept, usually 5%.
- Add the population size if you know it, or leave it blank.
- Click “Calculate Sample Size” and survey at least that many people, chosen at random.
Frequently Asked Questions
What proportion (p) should I use?
Use 50% if you have no prior estimate. It gives the largest, safest sample size, because a 50/50 split has the most variation. If earlier research suggests a proportion, use that instead.
What is the difference between confidence level and margin of error?
The margin of error is how far off your result may be, for example plus or minus 5%. The confidence level is how sure you are that the true value falls inside that range, for example 95 times out of 100.
When should I use the finite population correction?
Use it when your population is small and known, roughly when the sample would be more than 5% of the population. For very large or unknown populations, leave the population field blank.
What if I do not know my population size?
Leave the population field blank. The calculator then uses the Cochran formula for an unknown or very large population. If the population is known and small, Slovin’s formula is a simpler alternative.