Margin of Error Calculator
Calculate margin of error from sample statistics or proportions using MOE = z*(or t*) × standard error, build the full confidence interval, or solve the required sample size for a target margin of error — with complete step-by-step working.
Margin of Error
Margin of Error
Required Sample Size
Use when the population standard deviation σ is known, or the sample is large enough (commonly n ≥ 30) that s reliably approximates σ.
Use when the population standard deviation is unknown and estimated with the sample standard deviation s — especially for small samples (n < 30). Degrees of freedom = n − 1.
The standard formula behind poll and survey margins of error. p̂ is the sample proportion; the value p̂(1−p̂) is maximized (and thus most conservative) at p̂ = 0.5.
Once MOE is known, the confidence interval is simply the sample estimate (mean x̄ or proportion p̂) plus and minus the margin of error.
Reverse direction: given a confidence interval, MOE = (upper − lower)/2 and the estimate = (upper + lower)/2.
Solve the MOE formula for n. Always round the result up to the next whole number — a fractional participant is not possible.
If p̂ is unknown, use p̂ = 0.5 as the most conservative (largest) estimate — guarantees the target MOE regardless of the true proportion.
Margin of error is built directly from standard error. Explore SE calculations on their own with our Standard Error Calculator.
z* comes from the standard normal distribution; t* comes from the t-distribution with df = n − 1. Compute either directly with our Critical Value Calculator.
| Confidence | z* (two-tailed) | Common Use |
|---|---|---|
| 90% | 1.645 | Quick estimates, exploratory polls |
| 95% | 1.960 | Standard for most research & polling |
| 98% | 2.326 | Higher-stakes estimates |
| 99% | 2.576 | Medical, quality control |
| 99.9% | 3.291 | Very high-stakes decisions |
| Scenario | Formula | Notes |
|---|---|---|
| MOE — mean, known σ | z*×(σ/√n) | Click to load example |
| MOE — mean, unknown σ | t*×(s/√n) | Click to load example |
| MOE — proportion | z*×√(p̂(1−p̂)/n) | Click to load example |
| Sample size — mean | (z*σ/MOE)² | Click to load example |
| Sample size — proportion | z*²p̂(1−p̂)/MOE² | Click to load example |
What Is Margin of Error
This margin of error calculator finds the MOE from sample statistics or proportions, builds the full confidence interval, and solves the required sample size for a target margin of error — with complete step-by-step working for every result.
Margin of error (MOE) is the range of values, above and below a sample statistic, within which the true population value is likely to fall at a stated confidence level. When a news poll reports "52% support, ± 3 percentage points," the ± 3 is the margin of error — it tells you how much the true population percentage could plausibly differ from the sampled 52%.
MOE is built directly from these two calculators — use them individually or combine here: the Critical Value Calculator for z*/t*, and the Standard Error Calculator for the SE component.
Why Margin of Error Matters
- It quantifies the uncertainty inherent in every sample-based estimate
- It defines the width of a confidence interval — smaller MOE means a tighter, more precise interval
- It is reported alongside virtually every poll, survey, and scientific estimate
- It directly informs how large a sample you need to achieve a desired level of precision
Margin of Error Formula Explained
The general MOE formula has two versions depending on what you are estimating:
For a Mean
For a Proportion
| Symbol | Meaning |
|---|---|
| z* | Critical value from the standard normal distribution |
| t* | Critical value from the t-distribution (df = n−1) |
| σ | Population standard deviation (or s, sample std dev, as proxy) |
| n | Sample size |
| p̂ | Sample proportion (e.g. 0.52 for 52%) |
How to Find Margin of Error — Step-by-Step
- Step 1 — Choose a confidence level. Common choices are 90%, 95%, or 99%. This reflects how certain you want to be that the true value falls within your interval.
- Step 2 — Find the critical value (z* or t*) for that confidence level. Use z* if σ is known or your sample is large; use t* (with df = n−1) if σ is unknown and n is small.
- Step 3 — Calculate the standard error. For a mean: SE = σ/√n (or s/√n). For a proportion: SE = √(p̂(1−p̂)/n).
- Step 4 — Multiply: MOE = critical value × standard error.
- Step 5 — Build the confidence interval (optional): estimate ± MOE.
Worked Example — Finding MOE for a Mean
- Given: σ = 15, n = 40, confidence level = 95%
- Critical value: z* = 1.96 (large n, so z* is appropriate)
- Standard error: SE = 15/√40 ≈ 2.372
- MOE = 1.96 × 2.372 ≈ 4.649
- If x̄ = 100: confidence interval = 100 ± 4.649 = [95.351, 104.649]
Margin of Error for Means vs Proportions
Both use the same core structure (critical value × standard error), but the standard error component differs based on what kind of data you have.
| Aspect | Mean | Proportion |
|---|---|---|
| Data type | Continuous (heights, scores, prices) | Categorical / binary (yes-no, support-oppose) |
| Standard error | σ/√n or s/√n | √(p̂(1−p̂)/n) |
| Critical value | z* or t* | Almost always z* |
| Typical use | Averages: test scores, weights, incomes | Polls, surveys, election forecasting |
Polling and survey margins of error you see reported in the news ("± 3 percentage points") almost always use the proportion formula, since the underlying question is typically binary (support / oppose, yes / no).
Does Margin of Error Increase with Sample Size?
No — margin of error does not increase with sample size. It decreases. This is one of the most common points of confusion, so it is worth stating plainly and explaining why.
Because sample size n sits in the denominator (inside a square root), a larger sample always produces a smaller margin of error, holding everything else constant. This makes intuitive sense: the more data you collect, the more confident you can be that your sample accurately reflects the population, so the "uncertainty buffer" you need to add shrinks.
Important nuance: the relationship is not linear. Because MOE scales with 1/√n, doubling the sample size does not halve the margin of error — it divides MOE by √2 (≈1.41). To actually cut MOE in half, you need to roughly quadruple your sample size.
Example — MOE Shrinking as n Grows
- σ = 20, confidence = 95% (z* = 1.96)
- n = 25 → SE = 20/5 = 4 → MOE = 1.96×4 = 7.84
- n = 100 (4× larger) → SE = 20/10 = 2 → MOE = 1.96×2 = 3.92 (exactly half)
- n = 400 (16× larger than original) → SE = 20/20 = 1 → MOE = 1.96×1 = 1.96 (a quarter of the original)
How to Reduce Margin of Error
If your margin of error is too wide for your needs, three levers are available:
- Increase the sample size (n). The most direct lever — MOE shrinks proportional to 1/√n. Use Tool 3 above to solve exactly how large a sample you need for a target MOE.
- Lower the confidence level. A 90% confidence interval has a smaller critical value (and therefore smaller MOE) than a 99% interval — but you sacrifice certainty that the true value is captured.
- Reduce variability in your data (σ or s). Better measurement instruments, more controlled experimental conditions, or a more homogeneous population all reduce the standard deviation feeding into the MOE formula.
In practice, increasing sample size is the most commonly used and most reliable method — it is entirely within the researcher's control, unlike reducing natural variability in a population.
Worked Examples
1. MOE for a Mean with Unknown σ (t-distribution)
- Given: s = 10, n = 12, confidence = 99%
- Degrees of freedom: df = 12−1 = 11
- Critical value: t* ≈ 3.106 (99% confidence, df=11)
- SE = 10/√12 ≈ 2.887
- MOE = 3.106 × 2.887 ≈ 8.968
2. MOE for a Proportion (Polling Example)
- Given: p̂ = 0.52, n = 1000, confidence = 95%
- Critical value: z* = 1.96
- SE = √(0.52×0.48/1000) = √0.0002496 ≈ 0.01580
- MOE = 1.96 × 0.01580 ≈ 0.0310 (≈ ± 3.1 percentage points)
- CI = 52% ± 3.1% = [48.9%, 55.1%]
3. Margin of Error from a Given Confidence Interval
- Given: a reported confidence interval of [44.2, 55.8]
- MOE = (55.8 − 44.2)/2 = 11.6/2 = 5.8
- Estimate (midpoint) = (55.8 + 44.2)/2 = 50
4. Required Sample Size for a Target MOE — Mean
- Desired MOE = 3, σ = 15, confidence = 95% (z* = 1.96)
- n = (z*σ/MOE)² = (1.96×15/3)² = (9.8)² = 96.04
- Round up: n = 97
5. Required Sample Size for a Target MOE — Proportion
- Desired MOE = 0.03 (3%), p̂ unknown → use 0.5, confidence = 95% (z* = 1.96)
- n = z*²×p̂(1−p̂)/MOE² = (1.96)²×0.25/(0.03)² = 3.8416×0.25/0.0009 ≈ 1067.1
- Round up: n = 1068 — this matches the typical sample size seen in national polls targeting ±3% margin of error.
Frequently Asked Questions
Related Calculators
Share This Tool
Share the Margin of Error Calculator