ThisCalculator

Statistics

Margin of Error Formula Calculator

Updated · Standard formula, shown below

Margin of error 4.38 %
Standard error
0.0224
Result
Confidence interval
4.38 %
Result
Sample size
500 people
You entered

Margin of Error Formula Calculator

This calculator works out the margin of error for a survey or poll result using the standard formula: you enter the sample size, the proportion (as a decimal or percentage), and the confidence level, and you get back the margin of error as a percentage. It also shows the standard error and the confidence interval width so you can see how the parts fit together. The result tells you how much the true population value could differ from your sample’s result, given the sample size and chosen confidence level.

Formula

The margin of error (MOE) for a proportion is calculated as:

MOE = z × √(p̂(1 − p̂) / n)

Where:

  • z = z-score corresponding to the confidence level (1.645 for 90%, 1.96 for 95%, 2.576 for 99%)
  • pÌ‚ = sample proportion (the fraction of respondents with a certain answer, between 0 and 1)
  • n = sample size (number of respondents)
  • MOE = margin of error, expressed as a decimal; multiply by 100 to get a percentage

The formula assumes a simple random sample and that the sample proportion is not too close to 0 or 1. It is the standard formula used in polling and survey analysis.

Worked Example

Using the defaults: sample size n = 500, proportion p̂ = 0.5, confidence level = 95% (z = 1.96).

  1. Calculate the variance term: p̂(1 − p̂) = 0.5 × 0.5 = 0.25
  2. Divide by sample size: 0.25 / 500 = 0.0005
  3. Take the square root: √0.0005 ≈ 0.02236 (this is the standard error)
  4. Multiply by z: 1.96 × 0.02236 ≈ 0.0438
  5. Convert to percentage: 0.0438 × 100 = 4.38%

So with 500 respondents and a 50/50 split, the margin of error is ±4.38% at the 95% confidence level. The calculator shows the same result: 4.38%.

When to Use the Margin of Error

Use the margin of error whenever you are reporting a percentage from a sample and want to express how precisely that percentage estimates the true population value. Common situations include:

  • Political polls and election surveys
  • Customer satisfaction surveys
  • Market research studies
  • Quality control sampling
  • Any time you see “± 3%â€� in a news report

The margin of error is not a complete measure of accuracy—it only accounts for random sampling error, not bias, non-response, or poor question wording. But it is the standard way to communicate sampling uncertainty.

How to Read the Result

The margin of error gives you a range around your sample percentage. If the margin of error is ±4.38% and your sample shows 50% support, the true population value is likely between 45.62% and 54.38% at the 95% confidence level. That “95% confidence� means that if you repeated the survey many times, 95 out of 100 of those intervals would contain the true value.

Key points to remember:

  • A larger sample size gives a smaller margin of error, but the relationship is not linear—to halve the MOE, you need to quadruple the sample size.
  • A proportion of 0.5 (50%) gives the largest margin of error for a given sample size. If the proportion is closer to 0 or 1, the MOE is smaller.
  • The confidence level is a trade-off: higher confidence (e.g., 99%) gives a larger MOE, while lower confidence (e.g., 90%) gives a smaller MOE.

Common Mistakes and Misconceptions

One frequent error is confusing the margin of error with the standard error. The standard error is the standard deviation of the sample proportion, while the margin of error is the standard error multiplied by the z-score. The calculator shows both so you can see the difference.

Another mistake is using the wrong z-score. For 95% confidence, the correct z-score is 1.96, not 2. Some people use 2 as a rough approximation, but that gives a slightly larger MOE. For 90% use 1.645, for 99% use 2.576.

Also, the formula assumes a simple random sample. If your sample is stratified or clustered, the margin of error may be different. And if the population is small (say, under a few thousand), you should apply a finite population correction, but the calculator does not include that—it assumes a large or infinite population.

Limitations of the Formula

The margin of error formula is only valid when the sample proportion is not too close to 0 or 1. If p̂ is less than about 0.1 or greater than 0.9, the normal approximation breaks down and you should use a different method, such as the Wilson score interval. The calculator still gives an approximate answer, but it may not be accurate.

Additionally, the formula does not account for non-sampling errors like measurement error, coverage error (missing parts of the population), or non-response bias. The margin of error is purely about sampling variability.

If you are comparing two percentages (e.g., candidate A vs. candidate B), the margin of error for each is not the same as the margin of error of the difference. The difference has a larger margin of error, roughly the square root of the sum of the squares of the individual MOEs.

Frequently Asked Questions

What is the formula for margin of error without sample size?

You cannot calculate the margin of error without the sample size. The sample size is a critical part of the formula. If you don’t have it, you can’t compute the MOE. You could estimate it if you know the desired MOE and confidence level, but that is a sample size calculation, not a margin of error calculation.

Why is the margin of error larger for a 99% confidence level?

Because a higher confidence level means you want to be more certain that the true value falls within the interval. To be more certain, you need a wider interval, which corresponds to a larger z-score (2.576 for 99% vs. 1.96 for 95%). The wider interval has a larger margin of error.

What is the margin of error for a sample size of 100?

For a sample size of 100 with a proportion of 0.5 and 95% confidence, the margin of error is about 9.8%. That’s calculated as 1.96 × √(0.5 × 0.5 / 100) = 1.96 × 0.05 = 0.098, or 9.8%. This is why polls usually use sample sizes of at least 1,000 to keep the MOE under ±3%.

Can the margin of error be more than 100%?

No, the margin of error is always less than 100% for proportions. The maximum possible MOE occurs when p̂ = 0.5 and n is very small. For n = 1, the MOE would be 1.96 × 0.5 = 0.98, or 98%, which is still under 100%. For n = 2, it’s about 69%. So the margin of error never exceeds 100%.

How do I choose the proportion if I don’t know it?

If you don’t know the proportion, use 0.5 (50%). That gives the largest possible margin of error for a given sample size, so it is the most conservative choice. It’s the standard approach when designing a survey before you have results.

What is the difference between margin of error and standard error?

The standard error measures the variability of the sample proportion around the true population proportion. The margin of error is the standard error multiplied by the z-score for your chosen confidence level. In other words, the margin of error is the “radius� of the confidence interval, while the standard error is the “spread� of the sampling distribution.

Related

Formula used
in n | Sample size | people | 500 | 1
in p | Proportion (0 to 1) | - | 0.5 | 0
in cl | Confidence level | 90%=1.645, 95%=1.96, 99%=2.576 | 1.96 | 0
out moe | Margin of error | % | 100 * cl * sqrt(p * (1 - p) / n) | 2
out se | Standard error | - | sqrt(p * (1 - p) / n) | 4
out ci | Confidence interval | % | 100 * cl * sqrt(p * (1 - p) / n) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.