Sample Size for Proportion Calculator
How Many Responses Do You Actually Need?
Every survey, poll, or A/B test estimating a proportion — a conversion rate, a yes/no vote share, a defect rate — has to answer this question before data collection starts: how many observations are enough to trust the result? Collect too few and the margin of error swamps any real signal; collect far more than necessary and the extra effort is wasted. This calculator works out the minimum sample size for a target margin of error and confidence level.
The Formula
where Z is the critical value for the chosen confidence level, p is the expected proportion, E is the margin of error (as a decimal)
Sample Size at Various Margins of Error
Assuming the most conservative case, p = 0.5 (maximum variance), and 95% confidence:
| Margin of Error | Required n |
|---|---|
| ±10% | 97 |
| ±5% | 385 |
| ±3% | 1,068 |
| ±2% | 2,401 |
| ±1% | 9,604 |
Sample sizes computed directly from the calculator's formula and rounded up to the next whole respondent.
Halving the margin of error roughly quadruples the required sample — a direct consequence of E appearing squared in the denominator, and the reason tightening a poll from ±3% to ±1% is so much more expensive than it sounds.
Sample Size by Confidence Level
| Confidence Level | Z | Required n |
|---|---|---|
| 90% | 1.645 | 271 |
| 95% | 1.96 | 385 |
| 99% | 2.576 | 664 |
Where This Calculation Matters
- Political and market polling — the familiar "margin of error of plus or minus 3 points" quoted with a poll traces directly back to this formula.
- Conversion rate testing — before launching an A/B test on a website, this determines how many visitors are needed per variant to detect a meaningful difference in conversion rate.
- Quality control sampling — estimating a defect rate in a manufacturing batch to a required precision uses the same formula.
How to Use This Calculator
- Select a confidence level: 90%, 95%, or 99%.
- Enter the expected proportion (0 to 1); leave blank to default to 0.5, the most conservative assumption.
- Enter the desired margin of error as a percentage.
- Select Calculate to get the minimum required sample size.
Related Calculations
For estimating a population mean rather than a proportion, use the Sample Size for Mean Calculator. To check the margin of error for a sample size you already have, see the Margin of Error Calculator.