/

Margin of Error Calculator – MOE Formula, Confidence Interval & Sample Size

Margin of Error Calculator - MOE Formula, Confidence Interval & Sample Size
Statistics Tool

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.

Tool 1 — Margin of Error from Sample Statistics
MOE = crit × (σ/√n)  =  ?
95%, z*, σ=15, n=40
90%, z*, σ=8, n=64
99%, t*, s=10, n=12
95%, t*, s=5, n=20
Error

Margin of Error

MOE = —

Step-by-Step Working
Tool 2 — Margin of Error for Proportions (Polls & Surveys)
MOE = z* × √(p̂(1−p̂)/n)  =  ?
Enter p̂ as a decimal (0.52) or a percentage (52) — both are accepted automatically.
95%, p̂=0.52, n=1000
90%, p̂=0.5, n=500
99%, p̂=0.35, n=2000
95%, p̂=0.5, n=100
Error

Margin of Error

MOE = —

Step-by-Step Working
Tool 3 — Required Sample Size for a Target Margin of Error
n = (z* × σ / MOE)²  =  ?
Mean: σ=15, MOE=3, 95%
Mean: σ=10, MOE=2, 99%
Prop: p̂=0.5, MOE=3%, 95%
Prop: p̂=unknown, MOE=5%, 90%
Error

Required Sample Size

n = —

Step-by-Step Working
Margin of Error Formulas — Interactive Reference
1 MOE for a Mean — Known σ MOE = z*×(σ/√n)

Use when the population standard deviation σ is known, or the sample is large enough (commonly n ≥ 30) that s reliably approximates σ.

2 MOE for a Mean — Unknown σ MOE = t*×(s/√n)

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.

3 MOE for a Proportion MOE = z*×√(p̂(1−p̂)/n)

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.

4 Confidence Interval from MOE CI = estimate ± MOE

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.

5 Required Sample Size — Mean n = (z*σ/MOE)²

Solve the MOE formula for n. Always round the result up to the next whole number — a fractional participant is not possible.

6 Required Sample Size — Proportion n = z*²p̂(1−p̂)/MOE²

If p̂ is unknown, use p̂ = 0.5 as the most conservative (largest) estimate — guarantees the target MOE regardless of the true proportion.

7 MOE and Standard Error MOE = critical value × SE

Margin of error is built directly from standard error. Explore SE calculations on their own with our Standard Error Calculator.

8 Critical Value Determination z* or t* from confidence level

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.

Common Critical Values & MOE Quick Reference
Confidence Level → Critical Value (z*)
Confidencez* (two-tailed)Common Use
90%1.645Quick estimates, exploratory polls
95%1.960Standard for most research & polling
98%2.326Higher-stakes estimates
99%2.576Medical, quality control
99.9%3.291Very high-stakes decisions
Formula Quick Lookup
ScenarioFormulaNotes
MOE — mean, known σz*×(σ/√n)Click to load example
MOE — mean, unknown σt*×(s/√n)Click to load example
MOE — proportionz*×√(p̂(1−p̂)/n)Click to load example
Sample size — mean(z*σ/MOE)²Click to load example
Sample size — proportionz*²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 = critical value × standard error critical value = z* or t* · standard error = σ/√n or √(p̂(1−p̂)/n)

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

MOE = z* (or t*) × (σ/√n) use z* if σ is known or n is large; use t* if σ is unknown (small n)

For a Proportion

MOE = z* × √(p̂(1−p̂)/n) p̂ is the observed sample proportion, always paired with z* (not t*)
SymbolMeaning
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)
nSample size
Sample proportion (e.g. 0.52 for 52%)

How to Find Margin of Error — Step-by-Step

  1. 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.
  2. 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.
  3. Step 3 — Calculate the standard error. For a mean: SE = σ/√n (or s/√n). For a proportion: SE = √(p̂(1−p̂)/n).
  4. Step 4 — Multiply: MOE = critical value × standard error.
  5. Step 5 — Build the confidence interval (optional): estimate ± MOE.

Worked Example — Finding MOE for a Mean

  1. Given: σ = 15, n = 40, confidence level = 95%
  2. Critical value: z* = 1.96 (large n, so z* is appropriate)
  3. Standard error: SE = 15/√40 ≈ 2.372
  4. MOE = 1.96 × 2.372 ≈ 4.649
  5. 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.

AspectMeanProportion
Data typeContinuous (heights, scores, prices)Categorical / binary (yes-no, support-oppose)
Standard errorσ/√n or s/√n√(p̂(1−p̂)/n)
Critical valuez* or t*Almost always z*
Typical useAverages: test scores, weights, incomesPolls, 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.

MOE = critical value × (σ/√n) as n increases, √n increases, so σ/√n gets smaller — MOE shrinks

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

  1. σ = 20, confidence = 95% (z* = 1.96)
  2. n = 25 → SE = 20/5 = 4 → MOE = 1.96×4 = 7.84
  3. n = 100 (4× larger) → SE = 20/10 = 2 → MOE = 1.96×2 = 3.92 (exactly half)
  4. 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:

  1. 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.
  2. 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.
  3. 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)

  1. Given: s = 10, n = 12, confidence = 99%
  2. Degrees of freedom: df = 12−1 = 11
  3. Critical value: t* ≈ 3.106 (99% confidence, df=11)
  4. SE = 10/√12 ≈ 2.887
  5. MOE = 3.106 × 2.887 ≈ 8.968

2. MOE for a Proportion (Polling Example)

  1. Given: p̂ = 0.52, n = 1000, confidence = 95%
  2. Critical value: z* = 1.96
  3. SE = √(0.52×0.48/1000) = √0.0002496 ≈ 0.01580
  4. MOE = 1.96 × 0.01580 ≈ 0.0310 (≈ ± 3.1 percentage points)
  5. CI = 52% ± 3.1% = [48.9%, 55.1%]

3. Margin of Error from a Given Confidence Interval

  1. Given: a reported confidence interval of [44.2, 55.8]
  2. MOE = (55.8 − 44.2)/2 = 11.6/2 = 5.8
  3. Estimate (midpoint) = (55.8 + 44.2)/2 = 50

4. Required Sample Size for a Target MOE — Mean

  1. Desired MOE = 3, σ = 15, confidence = 95% (z* = 1.96)
  2. n = (z*σ/MOE)² = (1.96×15/3)² = (9.8)² = 96.04
  3. Round up: n = 97

5. Required Sample Size for a Target MOE — Proportion

  1. Desired MOE = 0.03 (3%), p̂ unknown → use 0.5, confidence = 95% (z* = 1.96)
  2. n = z*²×p̂(1−p̂)/MOE² = (1.96)²×0.25/(0.03)² = 3.8416×0.25/0.0009 ≈ 1067.1
  3. Round up: n = 1068 — this matches the typical sample size seen in national polls targeting ±3% margin of error.

Frequently Asked Questions

What is margin of error?
Margin of error (MOE) is the range of values above and below a sample statistic (like a mean or proportion) within which the true population value is likely to fall, at a stated confidence level. Formula: MOE = critical value × standard error. A smaller margin of error means a more precise estimate.
How do you find margin of error?
To find margin of error: (1) choose a confidence level (e.g. 95%), (2) find the critical value z* or t* for that confidence level, (3) calculate the standard error (σ/√n or s/√n for means, √(p̂(1−p̂)/n) for proportions), (4) multiply the critical value by the standard error: MOE = critical value × SE.
What is the formula for margin of error?
The MOE formula for a mean is MOE = z*(or t*) × (σ/√n). For a proportion, MOE = z* × √(p̂(1−p̂)/n). The critical value (z* or t*) depends on the chosen confidence level; z* is used when the population standard deviation is known or n is large, t* is used otherwise.
How do you find margin of error from a confidence interval?
If you already have a confidence interval (lower bound, upper bound), the margin of error is half the width of the interval: MOE = (upper bound − lower bound) / 2. The sample estimate (mean or proportion) is the midpoint: estimate = (upper bound + lower bound) / 2.
Does margin of error increase with sample size?
No — margin of error decreases as sample size increases, not increases. Because MOE = critical value × (σ/√n), a larger n produces a larger √n, which shrinks the fraction σ/√n and therefore shrinks the margin of error. To cut MOE in half, you must roughly quadruple the sample size, since MOE scales with 1/√n.
How do you reduce margin of error?
Three ways to reduce margin of error: (1) increase the sample size n — MOE shrinks proportional to 1/√n; (2) lower the confidence level — a 90% confidence interval has a smaller MOE than a 99% interval, at the cost of less certainty; (3) reduce variability in the data (smaller σ or s) through better measurement or a more homogeneous population.
What is margin of error for a proportion?
Margin of error for a proportion (common in polls and surveys) is MOE = z* × √(p̂(1−p̂)/n), where p̂ is the sample proportion, n is sample size, and z* is the critical value for the chosen confidence level. This is the formula behind the typical "± 3 percentage points" reported in political polling.
What sample size do I need for a specific margin of error?
Solve the MOE formula for n. For a mean: n = (z*×σ / MOE)². For a proportion: n = z*² × p̂(1−p̂) / MOE². If p̂ is unknown, use p̂ = 0.5 for the most conservative (largest) required sample size. Always round the result up to the next whole number.
What is the difference between margin of error and standard error?
Standard error (SE) measures the variability of a sample statistic on its own. Margin of error (MOE) is standard error multiplied by a critical value (z* or t*) tied to a chosen confidence level: MOE = critical value × SE. MOE is used to build a confidence interval; SE alone is not sufficient without a critical value.
What z-value is used for a 95% confidence margin of error?
For a 95% confidence level, z* ≈ 1.96. Other common values: 90% confidence → z* ≈ 1.645, 98% confidence → z* ≈ 2.326, 99% confidence → z* ≈ 2.576. Higher confidence levels require larger critical values, which widen the margin of error.
When should I use t* instead of z* in the margin of error formula?
Use t* when the population standard deviation is unknown and you are estimating it with the sample standard deviation, especially with a small sample size (commonly n < 30). Use z* when the population standard deviation is known, or the sample size is large enough that the sample standard deviation is a reliable estimate.

Related Calculators

Quick Formulas
MOE = z*×(σ/√n) Mean — known σ
MOE = t*×(s/√n) Mean — unknown σ
MOE = z*×√(p̂(1−p̂)/n) Proportion
n = (z*σ/MOE)² Sample size — mean
n = z*²p̂(1−p̂)/MOE² Sample size — proportion
CI = estimate ± MOE Confidence interval
Most Searched
MOE: 95%, σ=15, n=40
MOE: 95%, p̂=0.52, n=1000
MOE: 99%, s=10, n=12
Sample size: σ=15, MOE=3
Sample size: p̂=0.5, MOE=3%

Share This Tool

Share the Margin of Error Calculator

Free chemistry, physics, biology & math calculators with step-by-step solutions. Trusted by 100,000+ students. Solve any science problem instantly!

Newsletter

Subscribe to our Newsletter to be updated. We promise not to spam.

Copyright © 2026 SciSolveLab. All Rights Reserved

Scroll to Top