Sample Size Calculator
Work out how many responses you need for a survey, poll or study. Set the confidence level and margin of error, optionally add the population size and expected response rate, and see the exact formula steps.
Usually 90, 95 or 99
e.g. 5 for ± 5 percentage points
50% is the safest (largest sample)
From a pilot study or past data
Leave empty if very large or unknown
Works out how many people to invite
How to use the Sample Size Calculator
- Choose a proportion or a mean: most surveys estimate a proportion.
- Set the confidence level (95% is standard) and the margin of error you can accept.
- Enter the expected proportion, or keep 50% if you do not know it.
- Add the population size if it is small (for example 500 employees).
- Read the required sample size, and add a response rate to see how many people to invite.
The sample size formula
Proportion (Cochran): n₀ = z² × p(1 − p) / E²
Mean: n₀ = (z × σ / E)²
Finite population correction: n = n₀ × N / (n₀ + N − 1)
z is the critical value (1.645 for 90%, 1.960 for 95%, 2.576 for 99% confidence), p the expected proportion, E the margin of error and N the population size. Always round the result up to the next whole number.
Example: 95% confidence, ± 5% margin, p = 50%, population 2,000. n₀ = 1.96² × 0.25 / 0.0025 = 384.16, then n = 384.16 × 2000 / (384.16 + 1999) = 322.4, so you need 323 responses.
Sample sizes at 95% confidence (p = 50%)
| Population | ± 10% | ± 5% | ± 3% | ± 1% |
|---|---|---|---|---|
| 100 | 50 | 80 | 92 | 99 |
| 500 | 81 | 218 | 341 | 476 |
| 1,000 | 88 | 278 | 517 | 906 |
| 10,000 | 96 | 370 | 965 | 4,900 |
| 100,000 | 96 | 383 | 1,056 | 8,763 |
| Very large | 97 | 385 | 1,068 | 9,604 |
Already have your data? Use the confidence interval calculator to find the actual margin of error of your results.
Frequently asked questions
How do I calculate sample size?
For a proportion, use Cochran's formula n₀ = z² × p(1 − p) / E², where z is the critical value for your confidence level, p the expected proportion and E the margin of error as a decimal. Always round up.
What sample size do I need for 95% confidence and a 5% margin of error?
For a large population and p = 50%, n = 1.96² × 0.25 / 0.05² = 384.2, so you need 385 responses. For a population of 1,000 the finite population correction lowers that to 278.
Why use 50% as the expected proportion?
p(1 − p) is largest at p = 0.5, so 50% gives the biggest, most conservative sample size. If you have prior data suggesting, say, 20%, using it gives a smaller required sample.
What is the finite population correction?
When the sample is a noticeable share of a small population, fewer responses are needed. The corrected size is n = n₀ × N / (n₀ + N − 1). For very large populations it makes almost no difference.
Does the population size matter much?
Only when the population is small. Beyond roughly 20,000 people the required sample barely changes, which is why national polls of millions often use about 1,000 respondents.
How do I account for people who do not respond?
Divide the required sample size by the expected response rate. If you need 385 responses and expect 25% to reply, invite 385 / 0.25 = 1,540 people.
How do I choose a sample size to estimate a mean?
Use n = (z × σ / E)², where σ is the expected standard deviation (from a pilot study or earlier data) and E the margin of error in the same units as your measurements.