The first question in survey design is usually "how many people do I need?" Too few and the results are too noisy to use; too many and you waste money and time. For a survey that estimates a proportion, the sample size follows from a simple formula once you choose the margin of error and the confidence level.
The basic formula
To estimate a population proportion p within a margin of error E, the required sample size is:
n = z² × p(1−p) / E²
The symbols are:
z: the standard normal critical value for the confidence level (about 1.645 for 90%, 1.960 for 95%, 2.576 for 99%)p: the expected proportionE: the margin of error you can accept, as a decimal (0.03 for ±3 percentage points)
The formula comes from the proportion confidence interval p̂ ± z × √(p̂(1−p̂)/n): set the margin part equal to E and solve for n. Always round up. Rounding down means the margin of error is not met.
Why use p = 0.5?
Before the survey you do not know the true proportion, yet the formula needs p. The usual choice is p = 0.5, because p(1−p) reaches its maximum of 0.25 at p = 0.5.
| p | p(1−p) |
|---|---|
| 0.1 or 0.9 | 0.09 |
| 0.2 or 0.8 | 0.16 |
| 0.3 or 0.7 | 0.21 |
| 0.5 | 0.25 |
A sample size computed with p = 0.5 is therefore the most conservative value: it meets the margin of error whatever the true proportion turns out to be. It also works for every question when one survey asks many. If a previous survey gives reliable evidence that the proportion is around 20%, you can use p = 0.2 and need fewer people. At 95% and ±5 points, p = 0.5 needs 385 respondents but p = 0.2 needs only 246.
Example: 95% confidence, ±5 points
z = 1.96,p = 0.5,E = 0.05n = 1.96² × 0.25 / 0.05² = 3.8415 × 0.25 / 0.0025 ≈ 384.15- Round up: 385 respondents
The phrase often seen in election polls, "±3.1 points at the 95% confidence level", corresponds to a sample of about 1,000.
Required sample size by confidence level and margin of error
Values for a very large population with p = 0.5 (all rounded up):
| Confidence level | ±1 point | ±3 points | ±5 points |
|---|---|---|---|
| 90% | 6,764 | 752 | 271 |
| 95% | 9,604 | 1,068 | 385 |
| 99% | 16,588 | 1,844 | 664 |
Two patterns stand out.
- Halving the margin of error takes about four times the sample, because n is inversely proportional to E². Going from ±5 to ±1 points, five times more precise, takes 25 times the sample.
- Raising confidence from 95% to 99% takes about 1.73 times the sample, since
(2.576/1.960)² ≈ 1.73.
Working backward: margin of error from a sample size
If the sample size is already fixed, reverse the formula to get the margin of error.
E = z × √(p(1−p) / n)
At 95% with p = 0.5, 200 respondents give 1.96 × √(0.25/200) ≈ 0.0693 (about ±6.9 points), 500 give about ±4.4 points, and 2,000 give about ±2.2 points. Knowing these values helps you judge whether the gap between two answers in a published survey is within the margin of error.
Finite population correction
The formula above assumes a very large population. When the population N is small and the sample is a sizable share of it, fewer respondents are needed. This is the finite population correction (FPC).
n = n₀ / (1 + (n₀ − 1) / N)
Here n₀ is the value from the basic formula (before rounding). Some textbooks use 1 + n₀/N in the denominator; with N of a few hundred or more the difference is negligible.
For a company of 2,000 employees at 95% and ±5 points:
n₀ ≈ 384.15n = 384.15 / (1 + 383.15 / 2000) = 384.15 / 1.1916 ≈ 322.39- Round up: 323 respondents
The effect of the correction by population size (95%, ±5 points):
| Population N | Required sample |
|---|---|
| 500 | 218 |
| 2,000 | 323 |
| 10,000 | 370 |
| 100,000 | 383 |
| very large | 385 |
Once the population passes tens of thousands, the required sample barely depends on its size. That is why a national survey of 50 million people and a city survey of 500,000 need similar samples for the same precision. A common rule is to apply the correction when the sampling fraction n/N exceeds 5%.
Accounting for response rates
The formula gives the number of completed responses. The number of people to invite is that figure divided by the expected response rate.
invitations = required responses / expected response rate
With 385 required responses and an expected 30% response rate, 385 / 0.30 ≈ 1,283.3 → invite 1,284 people. For the company example (323 responses), a 30% response rate means 1,077 invitations, more than half of all employees.
The lower the response rate, however, the more likely non-respondents differ from respondents (non-response bias). A bigger sample only reduces random error; it does nothing about this bias.
If you plan subgroup analysis
If you plan to report results by age group or region as well as overall, each subgroup needs its own adequate sample. Splitting 385 respondents into 5 age groups leaves about 77 per group, and the margin of error within a group grows to about ±11 points at 95%. For ±5 points in every subgroup, each needs close to 385.
Assumptions behind the formula
- It assumes simple random sampling. Stratified or cluster sampling needs a design effect adjustment.
- It is for estimating a proportion. Estimating a mean or comparing two groups uses other formulas that involve the standard deviation, effect size and power.
- For convenience samples (such as an open online link), the margin of error does not strictly apply at all.
Enter the confidence level, margin of error, population size and response rate into this site's sample size calculator to get both the required responses and the number of invitations.
Key takeaways
- The required sample is
n = z² × p(1−p) / E², always rounded up. - If p is unknown, use 0.5, which maximizes
p(1−p), for a conservative answer. - At 95%, ±5 points needs 385, ±3 points needs 1,068 and ±1 point needs 9,604.
- For small populations, correct with
n₀ / (1 + (n₀−1)/N); N = 2,000 gives 323. - Divide required responses by the response rate to get invitations, and remember that a larger sample does not fix non-response bias.