Sample Size Calculator
Estimate the minimum number of observations you need for a survey or study.
What a sample size calculator does
A sample size calculator helps you decide how many responses or observations you need before starting data collection. If your sample is too small, your estimate can swing wildly and your confidence interval becomes wide. If your sample is too large, you may waste time and budget.
The goal is to balance precision and practicality. In short: choose a confidence level, choose how much error you can tolerate, and estimate variability. The calculator then returns a minimum recommended sample size.
Core formulas behind the calculator
For a proportion
Use this when your result is a percentage (e.g., conversion rate, approval rate, defect rate):
- Z = z-score from confidence level (95% → 1.96)
- p = expected proportion (as decimal, 50% → 0.50)
- e = margin of error (as decimal, 5% → 0.05)
For a mean
Use this when your result is an average (e.g., mean wait time, average spend):
- σ = estimated standard deviation
- E = desired absolute margin of error in the same units
Finite population correction (optional)
If your total population N is known and not huge, adjust the initial sample size:
This usually lowers required sample size for smaller populations.
How to choose each input
1) Confidence level
Higher confidence means more certainty that your interval captures the true value, but it requires a larger sample. Common default: 95%.
2) Margin of error
Smaller error needs bigger sample size. For many surveys, ±3% to ±5% is a practical range.
3) Expected proportion or standard deviation
If you have no prior estimate for a proportion, use 50% because it gives the largest (most conservative) sample size. For mean-based studies, use pilot data or historical data to estimate standard deviation.
Quick practical examples
Example A: Customer survey
- Goal: estimate percent of satisfied users
- Confidence level: 95%
- Margin of error: 5%
- Estimated proportion: 50%
Result is typically around 385 responses for a large population.
Example B: Average delivery time
- Goal: estimate mean delivery time
- Confidence level: 95%
- Desired error: ±2 minutes
- Estimated standard deviation: 10 minutes
Result is approximately 97 observations for a large population.
Common mistakes to avoid
- Using an unrealistic margin of error just to reduce sample size.
- Ignoring nonresponse (always inflate your outreach target).
- Collecting a large sample but from a biased source.
- Confusing statistical significance with practical significance.
Recommended workflow
- Run the calculator to get the statistical minimum.
- Adjust upward for expected nonresponse and exclusions.
- Pilot test if assumptions are uncertain.
- Document assumptions in your study plan.
Final note
A sample size calculator is a planning tool, not a guarantee of perfect results. Good sampling design and clean measurement matter just as much as the numeric target. Use the calculator early, review assumptions often, and update when pilot data becomes available.