Sample Size Calculator (Statistics)
Determine how many survey responses you need to achieve your desired precision. Enter the confidence level, acceptable margin of error, and estimated proportion to compute the required sample size.
Advertisement
Calculator
See your Sample Size Calculator (Statistics) results
Enter your email to unlock results — free forever.
No spam, ever. Unsubscribe at any time.
Advertisement
Formula
n = ceil( z*² × p(1−p) / e² )
Square the critical z-value (z* = 1.645 for 90%, 1.96 for 95%, 2.576 for 99%), multiply by the estimated proportion p times (1−p), and divide by the squared margin of error e. The ceil function rounds up to the nearest whole number since you cannot survey a fraction of a person. Using p = 0.5 gives the largest (most conservative) sample size.
How to use the Sample Size Calculator (Statistics)
- 1
Enter your confidence level
- 2
Enter your margin of error (%)
Value should be in %.
- 3
Enter your estimated proportion (%)
Value should be in %.
- 4
Read your results instantly
Results update in real time as you type.
Advertisement
How many responses do you actually need?
For a standard survey at 95% confidence with a ±5% margin of error, assuming a 50% proportion, you need 385 responses. This is a widely used benchmark for national opinion polls. For ±3% margin of error (more precise), you need 1,068. For ±10% (less precise), only 97 responses suffice.
This formula gives the sample size for an infinitely large population. If your population is small (say, fewer than 10,000), you can apply the finite population correction to reduce the required size: n_adjusted = n / (1 + (n−1)/N), where N is the population size.
The 50% proportion and conservative planning
When you do not know the true proportion in advance, use 50%. This maximizes p(1−p) and therefore maximizes the required sample size — guaranteeing adequate precision regardless of the true proportion. It is the standard practice in survey design when no prior data is available.
If you have a reasonable estimate of the proportion (say, from a previous study), use it. For example, if you know the approval rate is around 30%, using p = 0.30 requires fewer responses than using p = 0.50 for the same margin of error.
Advertisement
Practical considerations beyond the formula
The formula gives the minimum sample size assuming a perfect random sample. In practice, account for: (1) response rate — if you expect 40% response, send invitations to n/0.40 people; (2) incomplete surveys — some respondents skip key questions; (3) subgroup analysis — if you want to analyze by demographic groups, each subgroup needs adequate n.
For online surveys, a common rule of thumb is to target at least 200-400 completed responses for general audience research, or 100 per subgroup for segment analysis. Statistical requirements are the floor, not the ceiling.
Tips & Insights
Smaller margin of error requires exponentially more responses
Halving the margin of error quadruples the required sample size. Going from ±5% to ±2.5% margin requires four times as many responses. Always check whether the increased precision justifies the cost.
This formula assumes simple random sampling
Cluster sampling, stratified sampling, and convenience sampling all require different sample size calculations. The formula here applies to simple random samples only.
Add a buffer for non-response
Divide the calculated sample size by your expected response rate to determine how many people to contact. If you need 385 completions and expect 30% response, contact at least 1,284 people.
Worked Examples
Political poll planning
Required sample size: 1,068. A well-designed poll with about 1,000 responses can achieve ±3% margin of error at 95% confidence.
Internal employee survey
Required sample size: 323. Using p=70% (based on prior survey data) requires fewer responses than the conservative p=50% estimate of 385.
Advertisement
Frequently Asked Questions
How do I determine sample size for a survey?
Use the formula n = z*² × p(1−p) / e², where z* is the critical value for your confidence level, p is the estimated proportion, and e is the desired margin of error. Round up to the nearest whole number.
What sample size do I need for a 5% margin of error at 95% confidence?
Using p=50% (most conservative), you need n = 1.96² × 0.5 × 0.5 / 0.05² = 384.16, rounded up to 385 responses.
Does population size affect required sample size?
For large populations (above ~10,000), sample size is essentially independent of population size. For smaller populations, apply the finite population correction, which reduces the required sample.
Why is 50% used as the default proportion?
50% maximizes p(1−p), giving the most conservative (largest) sample size estimate. Using any other proportion assumes knowledge you may not have and could result in an underpowered study.
What is the difference between sample size for estimation vs. hypothesis testing?
This calculator computes sample size for estimating a proportion with a given margin of error. Sample size for hypothesis testing also considers statistical power (the probability of detecting a true effect) and requires a specified effect size.
Advertisement