Quick Answer
For a survey, n = z² × p(1 − p) ÷ E². At 95% confidence (z = 1.96), a 5% margin of error and p = 50%, you need 385 responses. For a population of 10,000, the finite population correction lowers this to 370.
Embed this calculator
Adjust the size if needed, then copy the code below into your page or blog. The calculator will load in an iframe and stay updated automatically.
Table of Contents
- Sample Size Calculator
- Quick Answer
- Related Calculators
- How This Sample Size Calculator Works
- How to Use the Sample Size Calculator
- Core Formulas
- Key Terms
- Worked Example
- Real-Life Examples
- Sample Size vs Margin of Error
- Sample Sizes for Large Populations
- What Changes the Sample Size
- Common Mistakes to Avoid
- Frequently Asked Questions
- References & Sources
How This Sample Size Calculator Works
Choose whether you want to estimate a percentage, such as the share of customers who are happy, or an average, such as mean spending. Set the confidence level and margin of error you want. If you know the total population, enter it to apply the finite population correction. Add a response rate to see how many people to invite.
Quick explanation: more people give a smaller margin of error, but the gains slow down as the sample grows.
- Margin of error: how close you want the result to be, such as ±5%.
- Confidence level: how sure you want to be, usually 95%.
- Expected percentage: 50% is the safest choice, as it gives the largest sample.
How to Use the Sample Size Calculator
- Choose whether you are estimating a percentage or an average.
- Choose the confidence level, usually 95%.
- Enter the margin of error, and the expected percentage or standard deviation.
- Optionally, enter the population size and expected response rate.
- Press Calculate and read how many people you need.
Core Formulas
- Percentage: n₀ = z² × p(1 − p) ÷ E²
- Mean: n₀ = (z × σ ÷ E)²
- Finite population: n = n₀ ÷ (1 + (n₀ − 1) ÷ N)
- Invitations: n ÷ response rate
z is the critical value for the confidence level, p the expected proportion, E the margin of error, σ the standard deviation and N the population size. Always round up.
Key Terms
- Sample size: the number of people or items you measure.
- Population: the whole group you want to learn about.
- Margin of error: the ± range around your result at the chosen confidence level.
- Confidence level: how often the method gives a range that contains the true value.
- Finite population correction: a factor that lowers the sample size when the population is small.
Worked Example
A school with 1,200 students wants a survey at 95% confidence and ±5%.
- n₀ = 1.96² × 0.5 × 0.5 ÷ 0.05² = 384.15
- n = 384.15 ÷ (1 + 383.15 ÷ 1,200) = 291.18
- Round up: survey 292 students
Real-Life Examples
- A customer survey: for ±3% at 95% confidence, you need 1,068 responses. With a 20% response rate, invite 5,340 customers.
- A staff survey: a company of 300 staff, at ±5% and 95%, needs 169 responses.
- A national poll: ±3% at 95% needs about 1,068 people, whether the country has 10 million or 300 million adults.
- An average: to estimate mean spending within ±$3 when the standard deviation is about $15, at 95% confidence, you need 97 people.
Sample Size vs Margin of Error
- Sample size: how many people you ask. You plan it before the study.
- Margin of error: how precise the result is. It shrinks as the sample grows.
- After the study: use our Confidence Interval Calculator to find the actual margin from your results.
Sample Sizes for Large Populations
| Margin of error | 90% | 95% | 99% |
|---|---|---|---|
| ±1% | 6,764 | 9,604 | 16,588 |
| ±2% | 1,691 | 2,401 | 4,147 |
| ±3% | 752 | 1,068 | 1,844 |
| ±4% | 423 | 601 | 1,037 |
| ±5% | 271 | 385 | 664 |
| ±10% | 68 | 97 | 166 |
What Changes the Sample Size
- Margin of error: halving it needs about four times as many people.
- Confidence level: 99% needs about 73% more people than 95%.
- Population size: matters only when the sample is a large share of it.
- Expected percentage: results near 50% need the largest samples.
Common Mistakes to Avoid
- Using a guessed percentage that is too low or high. If unsure, use 50%.
- Forgetting non-responses. Invite more people than the sample size you need.
- Thinking a bigger population needs a much bigger sample. Above about 20,000, it barely changes.
- Ignoring sampling bias. A large but biased sample is still wrong.
- Splitting results into small groups. Each subgroup needs enough people too.
Frequently Asked Questions
For a large population, 95% confidence and ±5%, you need 385. For ±3%, you need 1,068.
It gives the largest sample size, so your result will be precise enough whatever the true percentage is.
Only when it is small. For populations over about 20,000, the sample size hardly changes.
±5% is common for general surveys. Polls often aim for ±3%, and important studies may need ±1% to ±2%.
95% is the most common. Use 90% for quick checks or 99% when mistakes are costly.
Divide the sample size by the expected response rate. For 385 responses at 25%, invite 1,540 people.
Yes. Choose An average, then enter a guess of the standard deviation and the margin of error in the same units.
Use results from a past study or a small pilot. A rough rule is the range of likely values divided by 4.
It is a common rule of thumb for the t distribution, but it is usually too small for a precise survey of percentages.
It is the sample needed for 95% confidence and ±5% when the population is large and you assume 50%.
Not directly. A/B tests compare two groups and need a power calculation that includes the effect size.
Rounding down would give a slightly larger margin of error than you asked for.
References & Sources
| Source | Used For | Link |
|---|---|---|
| NIST/SEMATECH e-Handbook, Sample sizes required | Sample size for estimating a mean. | https://www.itl.nist.gov/div898/handbook/prc/section2/prc222.htm |
| Wikipedia, Sample size determination | Formulas for proportions and means. | https://en.wikipedia.org/wiki/Sample_size_determination |