Sample Size Calculator
Work out the minimum sample size needed to estimate a proportion within a chosen margin of error and confidence level.
| Required sample size | 377 |
|---|---|
| Sample size for an infinite population | 385 |
| Critical value (z) | 1.9600 |
Link to this calculation – copied!
Formula
n = n0 ÷ ( 1 + (n0 − 1) ÷ N )
| Symbol | Meaning |
|---|---|
| z | Critical value for the confidence level (1.96 for 95%) |
| p | Expected proportion (use 0.5 if unknown) |
| E | Margin of error as a decimal |
| N | Population size (leave blank if very large) |
| n0, n | Sample size before and after finite population correction |
How to Use This Calculator
- Enter the Confidence level (%).
- Enter the Margin of error (%).
- Enter the Expected proportion (%). Use 50% if you have no prior estimate; it gives the largest, safest sample.
- Enter the Population size. Leave blank for a very large or unknown population.
- Press Calculate. Results also update automatically as you type.
Worked Example
Using the values pre-filled in the calculator above:
| Confidence level | 95 % |
|---|---|
| Margin of error | 5 % |
| Expected proportion | 50 % |
| Population size | 20,000 |
| Required sample size | 377 |
|---|---|
| Sample size for an infinite population | 385 |
| Critical value (z) | 1.9600 |
About This Calculation
Before running a survey or poll, you need to know how many people to ask. Too few and the results are too noisy to be useful; too many and you waste time and money. This calculator uses Cochran's formula, the standard approach for estimating a proportion such as the share of customers who would recommend a product.
Three choices drive the answer. The confidence level (commonly 95%) is how sure you want to be that the true value lies within your margin. The margin of error is how close you need the estimate to be, for example ±5 percentage points. The expected proportion matters because answers near 50/50 vary the most; if you do not know it, 50% is the conservative choice. Halving the margin of error roughly quadruples the required sample, which is why very precise polls are expensive.
When the population is small, say 500 employees, the finite population correction reduces the number you need. For large populations it makes almost no difference: around 385 responses give ±5% at 95% confidence whether the population is 100,000 or 100 million. Remember that the formula assumes a random sample; it cannot fix bias from who chooses to respond, and you should plan for non-responses by inviting more people than the minimum.
Frequently Asked Questions
- Why is the sample size about the same for a city and a whole country?
- Precision depends mainly on the number of responses, not on the fraction of the population sampled. Once the population is much larger than the sample, the finite population correction is negligible.
- What proportion should I use if I have no idea?
- Use 50%. The term p(1 − p) is largest at 0.5, so it gives the biggest sample size and guarantees your margin of error is met whatever the true proportion turns out to be.
- How do I find the margin of error for a sample I already have?
- Use the margin of error calculator, which reverses this formula.