Margin of Error Calculator
Find the margin of error for your survey or estimate the sample size you need.
📖 What is Margin of Error?
The margin of error (MOE) quantifies the uncertainty in a survey or statistical estimate. It tells you how much the sample result might differ from the true population value, at a specified confidence level. A survey result of "52% ± 3%" means the true proportion is estimated to lie between 49% and 55% with the stated confidence.
Margin of error is central to survey research, opinion polling, scientific experiments, and quality control. It depends on three factors: sample size (larger samples = smaller MOE), population variance (more heterogeneous populations = larger MOE), and confidence level (higher confidence = larger MOE because you need a wider interval to be more certain).
Understanding MOE is critical for interpreting surveys correctly. When two candidates are within each other's margin of error (e.g., Candidate A at 51% and Candidate B at 49% with MOE ±3%), the race is statistically too close to call from that poll alone - the difference is within the range of sampling variability.
📐 Formula
z* = critical value for the confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
p = sample proportion (use 0.5 for maximum MOE when unknown)
n = sample size
For a mean (known σ): MOE = z* × σ/√n
Required sample size for target MOE: n = (z*/MOE)² × p(1−p)
Confidence interval: [p̂ − MOE, p̂ + MOE]
📖 How to Use This Calculator
📝 Example Calculations
Example 1 - Political Poll
n = 1,000, p = 0.5, confidence = 95%. MOE = 1.96 × √(0.25/1000) = 1.96 × 0.01581 = ±3.10%
If the poll shows 54% support, the 95% CI is [50.9%, 57.1%].
Example 2 - Clinical Trial
n = 400, p = 0.72, confidence = 99%. MOE = 2.576 × √(0.72×0.28/400) = 2.576 × 0.02244 = ±5.78%
Observed response rate of 72% has 99% CI: [66.2%, 77.8%].
Example 3 - Required Sample Size
Target MOE = ±2%, p = 0.5, confidence = 95%. n = (1.96/0.02)² × 0.25 = 9604 × 0.25 = 2,401
You need at least 2,401 respondents for ±2% MOE at 95% confidence.
Example 4 - Known Proportion
Target MOE = ±3%, p = 0.15 (known from prior research), confidence = 95%. n = (1.96/0.03)² × 0.15×0.85 = 4268 × 0.1275 = 544
With known prior proportion, fewer respondents needed than with p = 0.5.
Example 5 - 90% Confidence Level
n = 600, p = 0.5, confidence = 90%. MOE = 1.645 × √(0.25/600) = 1.645 × 0.02041 = ±3.36%
Lower confidence = smaller MOE. Same sample gives ±3.10% at 95% and ±3.36% at 90%... wait, lower confidence should give smaller MOE. At 90%: ±3.36% vs 95%: 1.96×0.02041 = ±4.00%. Actually for n=600: 90%: ±3.36%, 95%: ±4.00%, confirming lower confidence = smaller MOE.