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.
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
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.20 | 1.2816 | 1.6424 | Quick exploratory polls |
| 90% | 0.10 | 1.6449 | 2.7055 | Standard business reporting |
| 95% | 0.05 | 1.9600 | 3.8415 | Most scientific and social research |
| 98% | 0.02 | 2.3263 | 5.4117 | High-stakes decisions |
| 99% | 0.01 | 2.5758 | 6.6349 | Medical and safety-critical |
| 99.9% | 0.001 | 3.2905 | 10.8275 | Industrial quality control |
Sample Size Planning Table (95% Confidence)
Required n for a target margin of error at z = 1.96.
| Target ME (σ = 1) | Required n | Target ME (σ = 15) | Required n |
|---|---|---|---|
| 0.50 | 16 | 5.0 | 35 |
| 0.20 | 97 | 2.0 | 217 |
| 0.10 | 385 | 1.0 | 865 |
| 0.05 | 1,537 | 0.5 | 3,458 |
| 0.02 | 9,604 | 0.2 | 21,609 |
| 0.01 | 38,416 | 0.1 | 86,436 |
Typical Margin of Error by Survey Type
For 95% confidence, assuming a proportion-style estimate.
| Survey type | Typical n | Typical ME | Notes |
|---|---|---|---|
| Quick online poll | 100 | ±9.8% | Exploratory only |
| Local newspaper poll | 400 | ±4.9% | Moderate reliability |
| National political poll | 1,000 | ±3.1% | The industry standard |
| Major polling average | 5,000 | ±1.4% | Aggregates multiple polls |
| Large government survey | 50,000 | ±0.4% | High precision |
| Census | N (everyone) | 0% | No sampling error |
Variable Reference
| Symbol | Meaning | Typical range | Notes |
|---|---|---|---|
| ME | Margin of error | 0.001 – 50 | Half-width of the confidence interval |
| z | Critical value from N(0,1) | 1.28 – 3.29 | Set by the confidence level |
| σ | Population standard deviation | 0.0001 – 10,000 | Use sample s if σ unknown and n large |
| n | Sample size | 1 – 10,000,000 | Always an integer in practice |
| σ/√n | Standard error of the mean | 0 – ∞ | Spread of the sampling distribution |
| x̄ | Sample mean | any real number | The point estimate at the interval centre |
| μ | True population mean | any real number | Unknown; the target of estimation |
| N | Population size | 1 – ∞ | 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:
CI = x̄ ± ME = [ x̄ − z·σ/√n , x̄ + z·σ/√n ]
Solving for the required sample size to achieve a target margin of error:
Solving for the critical value or for σ:
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 σ:
Margin of Error Variables
| Symbol | Meaning | Notes |
|---|---|---|
| ME | Margin of error | Half-width of the confidence interval |
| z | Critical z-value | Determined by the confidence level |
| σ | Population standard deviation | Assumed known; use s when σ is unknown and n is large |
| n | Sample size | Appears under the square root |
| σ/√n | Standard error of the mean | Standard deviation of the sampling distribution |
| x̄ | Sample mean | The point estimate; CI is centred on it |
| μ | True population mean | Unknown; what we are trying to estimate |
| CI | Confidence interval | x̄ ± 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
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]
Target ME = 2, σ = 15, z = 1.96
n = (1.96 × 15 / 2)² = (14.7)² = 216.09
Round up → n = 217
ME = 3, σ = 12, n = 64
z = 3 × √64 / 12 = 3 × 8 / 12 = 2.000
Implied confidence level ≈ 95.45%
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.
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| Parameter | Value |
|---|---|
| z | 1.96 |
| σ | 0.5 |
| n | 1000 |
| Parameter | Value |
|---|---|
| z | 1.96 |
| σ | 0.5 |
| n | 400 |
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
Related calculators · Probability Distributions
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.