Margin of Error Calculator
Enter your sample size, population proportion (or use 50% for maximum margin), and confidence level to calculate the margin of error for a survey or poll.
The margin of error quantifies how much a survey or poll result might differ from the true population value. When you see "Candidate Smith leads by 5 points with a 3% margin of error at 95% confidence," it means the actual lead could be 2 to 8 points; in 95% of repeated surveys, the result would fall within ±3% of the reported lead.
This calculator computes the margin of error for a sample proportion, given the sample size, proportion, and confidence level. Use 50% proportion when unknown — this produces the largest (most conservative) margin of error, which is why poll reports typically quote it.
Margin of error depends on three factors: 1. **Sample size**: larger sample = smaller margin (inversely proportional to √n). 2. **Confidence level**: higher confidence = larger margin (95% needs more margin than 90%). 3. **Population proportion**: 50% gives largest margin; near 0 or 100% gives smaller.
Common practical values: 3% margin requires ~1100 respondents at 95% confidence. 5% margin needs ~385. Halving the margin of error quadruples required sample size. Most national polls aim for 2-3% margin, requiring 1000-2400 respondents.
Margin of error is the headline number on poll results, but full reporting should include sample size, confidence level, and whether the survey used random sampling. Non-random sampling can produce hidden biases far larger than the stated margin of error.
Inputs
Use 50% if unknown (worst-case scenario)
Leave as 0 for large populations
Results
Margin of Error
± 4.90%
Confidence Interval
45.10% to 54.90%
Standard Error
0.025000
Z-Value
1.960
Formula
How to use this calculator
- Enter sample size.
- Enter expected proportion (use 50% if unknown).
- Select confidence level (95% standard).
- Optionally enter population size for finite correction.
- Calculator returns margin of error.
- For survey planning: also use sample size calculator.
Worked examples
National political poll
**Scenario:** Poll 1000 voters. 52% support candidate. 95% confidence. **Calculation:** ME = 1.96 × √(0.52 × 0.48 / 1000) = 1.96 × √0.00025 = 1.96 × 0.0158 = 3.1%. **Result:** 52% ± 3.1%. True support between 48.9% and 55.1% with 95% confidence. Election outcome uncertain at this margin.
Customer satisfaction survey
**Scenario:** Survey 200 customers. 75% satisfied. 99% confidence. **Calculation:** ME = 2.576 × √(0.75 × 0.25 / 200) = 2.576 × √0.0009375 = 2.576 × 0.0306 = 7.9%. **Result:** 75% ± 7.9%. True satisfaction between 67% and 83% with 99% confidence. Need larger sample for tighter estimate or accept 95% confidence (smaller margin).
Small community survey
**Scenario:** Town of 5,000 residents. Survey 500. 60% support new park. 95% confidence. **Calculation:** ME without correction = 1.96 × √(0.6×0.4/500) = 1.96 × 0.0219 = 4.3%. Finite correction = √((5000-500)/(5000-1)) = √(0.9) = 0.949. Corrected ME = 4.3% × 0.949 = 4.1%. **Result:** 60% ± 4.1%. True support between 55.9% and 64.1%. Finite correction reduces margin slightly for small population.
When to use this calculator
**Use margin of error for:**
- **Poll reporting**: standard inclusion. - **Survey design**: planning required sample. - **Result interpretation**: assess precision. - **Comparison**: how confident in difference? - **Decision making**: when results are uncertain.
**Margin reduction strategies:**
| Strategy | Effect | Trade-off | |---|---|---| | Larger sample | Reduces ME by √2 per double | Higher cost | | Lower confidence | Smaller ME (90% vs 95%) | More uncertainty | | Stratified sampling | Smaller effective ME | More design | | Better question design | Reduces non-sampling error | Pre-testing time |
**Reporting standards:**
Industry standards (e.g., AAPOR): - Report sample size. - Report margin of error. - Report confidence level. - Specify whether random sampling used. - Describe response rate.
**Common errors:**
- Confusing margin of error with total error. - Computing ME for non-random samples. - Forgetting confidence level. - Comparing margins without same confidence. - Treating ME as "the only error."
**Total survey error:**
Margin of error is only one component: - **Sampling error**: random variation (this calculator). - **Coverage error**: missing some population. - **Non-response error**: people who don't answer. - **Measurement error**: question wording effects. - **Processing error**: data entry, coding.
Real-world total error often 5-10%+ even with stated 3% margin.
**Sample size for different needs:**
| ME goal | n at 95% (p=0.5) | |---|---| | 10% | 96 | | 5% | 385 | | 4% | 600 | | 3% | 1067 | | 2% | 2401 | | 1% | 9604 | | 0.5% | 38,416 |
Returns diminish: 4× more for halving ME.
**Confidence levels:**
| Confidence | Use case | |---|---| | 90% | Exploratory, small samples | | 95% | Standard research | | 99% | High-stakes decisions | | 99.9% | Very strict applications |
Higher confidence = larger margin, requires larger sample.
**Polling examples by source:**
- **National polls**: typically 1000-2000. - **Phone surveys**: 1000-1500. - **Online panels**: 1500-3000 (oversampled to combat self-selection). - **Exit polls**: 5000-20000. - **Tracking polls**: 500-1000 daily.
**Calculation tips:**
- Use p=0.5 for worst-case margin. - For known proportions, use that for tighter estimate. - Apply finite correction for small populations (n/N > 5%). - Always specify confidence level. - Include sample size in reporting.
**Software:**
- **Excel**: simple formula. - **R**: pollster package or manual. - **Python**: scipy.stats or statsmodels. - **SurveyMonkey**: built-in calculator.
**Beyond simple margin:**
- **Design effect**: cluster vs simple random. - **Effective sample size**: adjusted for design. - **Bayesian credible intervals**: alternative to frequentist margin. - **Bootstrapping**: empirical confidence intervals.
Common mistakes to avoid
- Confusing margin of error with total survey error. ME is just sampling error.
- Comparing polls with different confidence levels directly.
- Treating non-random samples like random samples for ME.
- Forgetting that 50% gives largest ME (worst case).
- Reading ME as a fixed certainty instead of probability statement.
- Computing without specifying confidence level.
- Ignoring non-sampling errors that can dwarf ME.