Formula & Calculator

Margin of Error

The margin of error is the "plus or minus" figure you see in poll results. It equals a critical value (z) times the standard error of the estimate. For example, a poll might report 52% support with a 3% margin of error, meaning the true value is likely between 49% and 55%. It reflects the uncertainty due to sampling variability. A larger sample size or lower confidence level reduces the margin of error.

Statistics Probability Survey Design
VORZEP · CONFIDENCE INTERVALS & SAMPLING

Margin of Error Calculator

Compute the margin of error ME = z · (σ/√n) for a confidence interval, or solve for the required sample size, the critical z-value, or the population standard deviation. The calculator shows the sampling distribution, the confidence-interval error bar, and every algebraic step — all live.

ME = z · ( σ / √n ) · CI = x̄ ± ME · n = ( z · σ / ME )²
Confidence level
Solve for
Critical value z The z-score from the standard normal distribution corresponding to the chosen confidence level. For 95% confidence z = 1.96; for 99% z = 2.576; for 90% z = 1.645. The z-value is the number of standard errors that defines the half-width of the confidence interval.
z
z must be greater than zero.
Confidence level ≈ 95.00%
Population std deviation σ The population standard deviation — the spread of the underlying data. If σ is unknown and the sample is large (n ≥ 30), use the sample standard deviation s as an estimate. For small samples with unknown σ, use the t-distribution instead of z.
σ
σ must be greater than zero.
Relative σ / √n = 1.500 per unit z
Sample size n The number of observations in the sample. Margin of error shrinks with √n, so quadrupling the sample size halves the margin of error. Solving for n rounds up to the next integer because you can't collect a fraction of an observation.
n
n must be at least 1.
√n = 10.000 · standard error σ/√n = 1.500
Margin of error ME The half-width of the confidence interval: the sample mean ± ME covers the true population mean with the chosen confidence level. ME combines the critical z-value with the standard error σ/√n. Smaller ME means a more precise estimate. SOLVED
ME
ME must be greater than zero.
ME / x̄ (relative) = unknown — enter a sample mean below
The margin of error is the half-width of the confidence interval: the sample mean ± ME is expected to contain the true population mean with the chosen confidence level.
MARGIN OF ERROR (ME)
2.9400
95% CI half-width · z = 1.9600 · σ = 15 · n = 100
BALANCED PRECISION
ME = z · σ / √n = 1.9600 × 15 / 10 = 2.9400
Step-by-step solution
Sample size vs margin of error
ME(n) curve Current n Standard error σ/√n
Sampling distribution of the mean
Sampling distribution ±1 ME band ±2 ME band
Sensitivity & elasticity
Companion statistics
Sampling distribution with ME bands — live schematic
Sampling distribution of x̄ ±1 ME (the confidence interval) ±2 ME Critical z boundary
Confidence interval error bar
Interval [x̄ − ME , x̄ + ME] Point estimate x̄ True μ (hypothetical)
What the margin of error really measures
zconfidence multiplier
×
σpopulation spread
÷
√nsquare root of sample size
=
MEhalf-width

The square-root law

Margin of error shrinks with the square root of sample size. To halve the ME you must quadruple the sample; to reduce it by a factor of 10 you must increase the sample by a factor of 100. This diminishing return is the single most important fact about survey design — and why polls with n = 1,000 have a margin of error around ±3% but polls with n = 10,000 only get down to about ±1%.

Confidence vs precision trade-off

Higher confidence requires a larger z-value, which widens the interval. Going from 90% to 95% confidence increases z from 1.645 to 1.960 — about 19% wider. Going from 95% to 99% increases z to 2.576 — another 31% wider. There is no free lunch: you can have higher confidence or narrower intervals, but not both at the same sample size.

Assumptions behind the formula

The formula ME = z · σ/√n assumes the sample mean is normally distributed. This holds when the population is normal, or approximately when n is large (n ≥ 30) by the Central Limit Theorem. If σ is unknown and n is small, replace z with the t-value from the t-distribution with n − 1 degrees of freedom, and use the sample standard deviation s. Ignoring these conditions produces intervals that are too narrow and misleadingly precise.

Finite population correction

When the sample is a large fraction of the population (n/N > 5%), the standard error should be multiplied by √((N − n)/(N − 1)), the finite population correction factor. This narrows the interval because sampling without replacement from a small population gives more information per observation than sampling with replacement from an infinite population. For national polls with N in the millions, the correction is negligible.

How to Use This Calculator

The margin of error is the half-width of a confidence interval — how far a sample estimate might reasonably be from the true population value.

1. Choose a confidence level

Pick 80%, 90%, 95%, 98% or 99% from the toggle. The corresponding z-value is set automatically: 1.2816, 1.6449, 1.9600, 2.3263, or 2.5758. You can also type a custom z-value directly.

2. Choose what to solve for

Pick ME (margin of error), n (sample size), z (critical value), or σ (population standard deviation). The calculator rearranges ME = z·σ/√n for whichever quantity you select, greying out that field.

3. Fill in the other values

Use the sliders or type exact values. σ is the population standard deviation, n is the sample size. If you only know the sample standard deviation s and n is large (≥ 30), you can use s as a substitute for σ.

4. Read the result and verdict

The result card shows ME plus the implied confidence level and a colour-coded verdict based on the relative error ME/x̄ — from very high precision (ME within 2% of the mean) to very low precision (ME exceeds 30%).

5. Study the diagrams

The sampling distribution diagram shows the distribution of x̄ with the ±1 ME and ±2 ME bands shaded. The confidence interval bar shows [x̄ − ME, x̄ + ME] as a horizontal error bar with the point estimate at the centre.

6. Switch to Advanced for depth

Advanced mode adds a sampling distribution chart, a sensitivity panel showing how ME reacts to ±10% changes in z, σ, and n, and a full companion statistics table with the standard error, confidence interval, relative precision, and required n for a target ME.

What This Tool Offers

Built around the classic margin of error formula ME = z · (σ/√n) — the half-width of a confidence interval for a population mean.

Four-way solving

Solve for the margin of error, the required sample size n, the critical z-value, or the population standard deviation σ — the calculator rearranges the formula for whichever you choose.

Confidence level presets

One-click buttons for the standard confidence levels (80%, 90%, 95%, 98%, 99%) with their exact z-values, or type a custom z.

Sampling distribution diagram

A large annotated normal curve showing the distribution of the sample mean with ±1 ME, ±2 ME and critical-z bands shaded.

Confidence interval error bar

A horizontal error bar showing [x̄ − ME, x̄ + ME] with the point estimate at the centre and the hypothetical true μ marked for reference.

ME vs sample size chart

The full ME(n) = z·σ/√n hyperbola plotted against n, with the current n highlighted and the standard error curve overlaid.

Reference tables

Common confidence levels and z-values, sample size planning table, and typical ME values by survey type.

Reference Tables & Extra Tools

A sample size planner plus lookup tables for confidence levels and typical margin-of-error values.

Sample size planner

ME
σ
z
n = ⌈(1.9600 × 15 / 3)²⌉ = ⌈96.04⌉ = 97

Confidence Levels and z-Values

Two-tailed critical z-values from the standard normal distribution.

Confidence levelα (two-tailed)z (critical)z²Typical use
80%0.201.28161.6424Quick exploratory polls
90%0.101.64492.7055Standard business reporting
95%0.051.96003.8415Most scientific and social research
98%0.022.32635.4117High-stakes decisions
99%0.012.57586.6349Medical and safety-critical
99.9%0.0013.290510.8275Industrial quality control

Sample Size Planning Table (95% Confidence)

Required n for a target margin of error at z = 1.96.

Target ME (σ = 1)Required nTarget ME (σ = 15)Required n
0.50165.035
0.20972.0217
0.103851.0865
0.051,5370.53,458
0.029,6040.221,609
0.0138,4160.186,436

Typical Margin of Error by Survey Type

For 95% confidence, assuming a proportion-style estimate.

Survey typeTypical nTypical MENotes
Quick online poll100±9.8%Exploratory only
Local newspaper poll400±4.9%Moderate reliability
National political poll1,000±3.1%The industry standard
Major polling average5,000±1.4%Aggregates multiple polls
Large government survey50,000±0.4%High precision
CensusN (everyone)0%No sampling error

Variable Reference

SymbolMeaningTypical rangeNotes
MEMargin of error0.001 – 50Half-width of the confidence interval
zCritical value from N(0,1)1.28 – 3.29Set by the confidence level
σPopulation standard deviation0.0001 – 10,000Use sample s if σ unknown and n large
nSample size1 – 10,000,000Always an integer in practice
σ/√nStandard error of the mean0 – ∞Spread of the sampling distribution
x̄Sample meanany real numberThe point estimate at the interval centre
μTrue population meanany real numberUnknown; the target of estimation
NPopulation size1 – ∞Used for the finite population correction

What Does ME = z · (σ/√n) Measure?

The margin of error is a measure of the precision of an estimate. Given a sample mean x̄ computed from n observations, the true population mean μ is unknown — but if we build the interval [x̄ − ME, x̄ + ME] with ME = z · σ/√n, that interval will contain μ in a fraction of repeated samples equal to the chosen confidence level. A 95% margin of error produces intervals that contain the true mean in 95% of samples drawn from the same population.

Three quantities enter the formula. The z-value comes from the standard normal distribution and is fixed by the confidence level: 1.96 for 95%, 2.576 for 99%. The population standard deviation σ measures the natural spread of the data. The sample size n appears under a square root, so error decreases slowly as the sample grows. The ratio σ/√n is called the standard error of the mean — it is the standard deviation of the sampling distribution of x̄, and the whole formula is just z standard errors.

Margin of Error Formula

The defining formula for a confidence interval for a population mean (σ known) is:

ME = z · σ / √n
CI = x̄ ± ME = [ x̄ − z·σ/√n , x̄ + z·σ/√n ]

Solving for the required sample size to achieve a target margin of error:

n = ⌈ ( z · σ / ME )² ⌉

Solving for the critical value or for σ:

z = ME · √n / σ   ·   σ = ME · √n / z

When σ is unknown and n is small, the z-value is replaced by the t-value from the t-distribution with n − 1 degrees of freedom, and s is used in place of σ:

ME = tα/2, n−1 · s / √n

Margin of Error Variables

SymbolMeaningNotes
MEMargin of errorHalf-width of the confidence interval
zCritical z-valueDetermined by the confidence level
σPopulation standard deviationAssumed known; use s when σ is unknown and n is large
nSample sizeAppears under the square root
σ/√nStandard error of the meanStandard deviation of the sampling distribution
x̄Sample meanThe point estimate; CI is centred on it
μTrue population meanUnknown; what we are trying to estimate
CIConfidence intervalx̄ ± ME

How Each Part Affects the Margin of Error

Because ME is a product and quotient, each input has a different sensitivity. Doubling z doubles the ME — a 99% interval is about 31% wider than a 95% interval. Doubling σ doubles the ME — a more heterogeneous population requires larger samples for the same precision. Quadrupling n halves the ME; reducing n to a quarter doubles it. These three effects combine multiplicatively, so to halve the ME you can either halve z (i.e., drop confidence a lot), halve σ (usually impossible), or quadruple n.

The square-root dependence on n is the source of the diminishing returns that dominate survey design. Going from n = 100 to n = 400 cuts the ME in half, from n = 400 to n = 1,600 halves it again, and from n = 1,600 to n = 6,400 halves it a third time. Each halving requires four times the sample. This is why national polls plateau around n = 1,000–2,000: further gains are expensive and the residual bias from nonresponse usually exceeds the sampling error anyway.

Margin of Error Calculation Examples

Standard poll
z = 1.96 (95%), σ = 15, n = 100
σ/√n = 15 / 10 = 1.5
ME = 1.96 × 1.5 = 2.94
If x̄ = 50, then 95% CI = [47.06 , 52.94]
Solve for required sample size
Target ME = 2, σ = 15, z = 1.96
n = (1.96 × 15 / 2)² = (14.7)² = 216.09
Round up → n = 217
Solve for critical z
ME = 3, σ = 12, n = 64
z = 3 × √64 / 12 = 3 × 8 / 12 = 2.000
Implied confidence level ≈ 95.45%
Solve for σ
ME = 4, z = 1.96, n = 25
σ = 4 × √25 / 1.96 = 4 × 5 / 1.96 = 10.204

Frequently Asked Questions

The margin of error is the half-width of a confidence interval. If you estimate a population mean μ by a sample mean x̄, the margin of error tells you how far x̄ might plausibly be from μ. Formally, ME = z · σ/√n, where z is the critical value for the desired confidence level. A margin of error of 3 at 95% confidence means that across many samples, 95% of the intervals [x̄ − 3, x̄ + 3] would contain the true mean μ.

It does not mean the true mean has a 95% probability of being in this particular interval. It means that if you repeated the sampling procedure many times, 95% of the resulting intervals would contain the true mean. The true mean is fixed; it is the interval that is random. This distinction matters — once you have computed a specific interval, it either contains μ or it doesn't, but the procedure has a 95% long-run success rate.

Because averaging independent observations reduces variance by a factor of n, and the standard error is the square root of the variance. If you average n independent measurements of the same quantity, each contributing variance σ², the variance of the average is σ²/n and its standard deviation is σ/√n. This square-root law is fundamental to statistics — it is why polling accuracy improves slowly and why the Central Limit Theorem works. There is no way around it; information accumulates as √n, not as n.

Use z when the population standard deviation σ is known, or when the sample is large (n ≥ 30) so that the sample standard deviation s is a reliable estimate of σ. Use t when σ is unknown and the sample is small — then the extra uncertainty in estimating σ inflates the critical value, and the t-distribution has heavier tails than the normal. The t-value depends on the degrees of freedom (n − 1) and is always slightly larger than the corresponding z-value, which makes the interval correctly wider.

For a population proportion p, the margin of error uses the standard error √(p̂(1−p̂)/n) instead of σ/√n. The maximum standard error occurs at p̂ = 0.5, giving the familiar worst-case formula ME = z · √(0.25/n) = z / (2√n). For 95% confidence this gives ME = 0.98/√n, so n = 1,000 gives ME ≈ 3.1%. The same square-root law applies: halving the margin of error still requires quadrupling the sample.

When the sample size n is a non-trivial fraction of the population size N (more than about 5%), the standard error should be multiplied by the finite population correction factor √((N − n)/(N − 1)). This factor is less than 1, so the margin of error shrinks. Intuitively, sampling without replacement from a finite population gives you more information per observation than sampling with replacement, because each additional observation removes a distinct member of the population. For large populations (N in the millions), the factor is essentially 1 and can be ignored.

Not mathematically, but practically yes. Sampling error is only one source of error in an estimate. Nonresponse bias, question wording effects, coverage error, and measurement error can all exceed the sampling margin of error — especially for large surveys where ME can be under 1%. A poll with n = 10,000 and ME = ±1% may still be off by 3 or 4 points because of these non-sampling errors. This is why major poll aggregators report uncertainty ranges that are wider than the nominal sampling margin of error alone.

Calculating...

Variables

Symbol Quantity Unit
ME Margin of error
z Z-score for confidence level
σ Standard deviation (or estimate)
n Sample size

What it means

The margin of error is the maximum expected difference between the sample estimate and the true population parameter at a given confidence level. It is the product of the critical value and the standard error. It is commonly reported in opinion polls and surveys. A larger sample size or smaller variability reduces the margin of error. Understanding the margin of error is important for designing studies, interpreting polls, and assessing the precision of sample estimates.

Worked example

Margin of Error – Two Examples

Real‑World
Scenario: A poll of 1000 voters (σ=0.5) at 95% confidence (z=1.96). Find margin of error.
ParameterValue
z1.96
σ0.5
n1000
1ME = 1.96 × (0.5/√1000) = 1.96 × 0.01581 = 0.0310
Result 0.0310 ✓ ±3.1%
Scenario: Sample size 400, σ=0.5, z=1.96. Compute ME.
ParameterValue
z1.96
σ0.5
n400
1ME = 1.96 × (0.5/√400) = 1.96 × 0.025 = 0.049
Result 0.049 ✓ ±4.9%
Insight: Margin of error decreases with larger sample size and lower confidence level. It defines the half‑width of the confidence interval.

Common mistakes

  • Margin of error (ME): The half‑width of the confidence interval.
  • z: Critical value from normal distribution.
  • σ: Population standard deviation – if unknown, use s and t‑distribution.
  • n: Sample size – larger n gives smaller margin of error.
  • Units: ME has the same units as the data.

Applications

The margin of error (ME) is the radius of a confidence interval, indicating the maximum likely difference between the sample estimate and the true population parameter. It is widely used in opinion polls, survey research, and quality control. Engineers use it to determine the required sample size for studies, to assess the precision of measurements, and to set acceptance criteria. By controlling the margin of error, professionals can ensure that estimates are sufficiently accurate for decision‑making. The margin depends on the standard deviation, sample size, and desired confidence level. Understanding ME is crucial for designing studies and interpreting results, as it provides a quantitative measure of the uncertainty inherent in sample‑based estimates.

  • Sample size determination for surveys and experiments
  • Reporting survey results with precision
  • Quality control – setting acceptable error margins
  • Regulatory compliance – demonstrating measurement accuracy
  • Political polling and public opinion research