ThisCalculator

Statistics

Margin of Error Calculator: Formula & How to Use It

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

Margin of Error Calculator: Formula & How to Use It

A margin of error calculator works out the range within which a survey or poll’s true value likely falls, based on your sample size, population size, and confidence level. You enter the sample size, the proportion answering a certain way, and your chosen confidence level, and it returns the margin of error as a percentage (e.g., ±3.2%). This number tells you how much the results from a sample might differ from what you would get if you asked everyone in the population.

Formula

The margin of error (MOE) is calculated using the standard error of a proportion, multiplied by a z-score that corresponds to your chosen confidence level. The most common formula, used when the population is large and the sample is a small fraction of it, is:

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

Where:

  • z = z-score for the confidence level (1.96 for 95%, 2.576 for 99%, 1.645 for 90%)
  • pÌ‚ = the proportion of respondents who chose a particular answer (as a decimal, so 50% becomes 0.5)
  • n = the sample size (number of people surveyed)

When the sample is a significant fraction of the total population (more than about 5%), a finite population correction (FPC) is applied:

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

Where N is the population size. The FPC shrinks the margin of error when you survey a large share of a small population. For most national polls (population in the millions, sample in the thousands), the FPC is so close to 1 that it makes almost no difference.

Worked Example

Using the calculator’s default values: sample size = 1000, response proportion = 50%, confidence level = 95%, population size = 1,000,000.

  1. Convert the proportion to a decimal: p̂ = 0.50
  2. Find the z-score for 95% confidence: z = 1.96
  3. Calculate the standard error: √(0.50 × 0.50 / 1000) = √(0.25 / 1000) = √0.00025 = 0.01581
  4. Multiply by z: 1.96 × 0.01581 = 0.03099
  5. Convert to a percentage: 0.03099 × 100 = 3.10%
  6. Apply the finite population correction: √((1,000,000 − 1000) / (1,000,000 − 1)) = √(999,000 / 999,999) ≈ 0.9995
  7. Final MOE: 3.10% × 0.9995 ≈ 3.10%

So with 1000 respondents and a 50/50 split, the margin of error is ±3.10% at 95% confidence. If 55% of respondents said “yes,� you would report the true population value as 55% ± 3.1%, meaning it likely falls between 51.9% and 58.1%.

When to Use a Margin of Error Calculator

Use this calculator any time you are working with sample data and want to know how precisely it reflects the whole population. Common situations include:

  • Political polls: estimating support for a candidate or ballot measure
  • Market research: gauging customer satisfaction or brand awareness
  • Academic surveys: measuring attitudes, behaviors, or demographics
  • Quality control: checking defect rates in a production batch
  • User experience testing: measuring task success rates or satisfaction scores

The margin of error only applies to random samples. If your sample is not randomly selected (e.g., convenience sampling, self-selected online polls), the margin of error is meaningless because bias can be far larger than sampling error.

How to Read the Result

The margin of error is always reported with a confidence level. A 95% confidence level means that if you repeated the survey 100 times with the same method, the true population value would fall within the margin of error about 95 of those times. It does not mean there is a 95% chance the true value is in that range for a single survey — the true value is fixed; the interval either contains it or not.

The margin of error also applies to the whole survey, not to differences between subgroups. If a poll says “Candidate A leads by 4 points, MOE ±3%,� the lead is not necessarily significant because the margin of error for the difference is larger (roughly double the individual MOE).

Also note that the margin of error is largest when p̂ = 50%. If one option has 90% support, the margin of error is smaller. Many calculators default to 50% because it gives the most conservative (largest) estimate.

Common Mistakes and Misconceptions

  • Using the wrong z-score: 95% confidence uses 1.96, not 1.65 or 2.58. Mixing these up changes the result by about 30%.
  • Confusing margin of error with standard deviation: The standard deviation describes variability in the data; the margin of error describes uncertainty in the estimate.
  • Ignoring the finite population correction: For small populations (e.g., 500 employees), the FPC matters. For populations over 100,000, it is negligible.
  • Applying MOE to non-random samples: If your sample is biased, the MOE is irrelevant. The formula only accounts for random sampling error.
  • Reporting MOE without the confidence level: “±3%â€� is meaningless without saying “at 95% confidence.â€�
  • Assuming MOE scales linearly with sample size: To halve the MOE, you need to quadruple the sample size, because the formula uses the square root of n.

Limitations of the Formula

The standard margin of error formula assumes a simple random sample, which is rare in practice. Most real surveys use stratified or cluster sampling, which can have a larger or smaller actual error. The formula also assumes the proportion is not extremely close to 0% or 100%; for very rare events (like a 1% defect rate), the normal approximation breaks down and exact binomial methods are more accurate.

Another limitation: the margin of error only covers sampling error. It does not include non-response bias, question wording effects, interviewer bias, or data processing errors. A well-conducted survey with a ±2% MOE can still be wildly wrong if the sample was not representative.

Finally, the margin of error is a single number for the whole survey, but the actual error varies by subgroup. Subgroup analyses (e.g., “women aged 18–29�) have much larger margins of error because the sample size within that group is smaller.

Comparing Different Confidence Levels

Higher confidence levels produce larger margins of error. Here are the z-scores for common confidence levels:

  • 90% → z = 1.645
  • 95% → z = 1.96
  • 99% → z = 2.576

For example, with n = 1000 and p̂ = 50%:

  • 90% confidence → MOE ≈ ±2.60%
  • 95% confidence → MOE ≈ ±3.10%
  • 99% confidence → MOE ≈ ±4.07%

Most researchers use 95% as the standard. Use 99% when the stakes are high (e.g., medical decisions) and 90% for exploratory research.

Frequently Asked Questions

What is a good margin of error?

There is no universal “good� value. For national polls, ±3% is typical. For academic research, ±5% is often acceptable. For quality control where defects are costly, you might want ±1% or less. The acceptable MOE depends on how precise you need the estimate to be and how much you can afford to spend on surveying more people.

How do I reduce the margin of error?

Increase your sample size — but remember it takes four times as many respondents to halve the MOE. You can also lower the confidence level (e.g., from 95% to 90%), which narrows the interval. For small populations, the finite population correction helps, but once your population exceeds 100,000, adding more respondents is the only way.

What if my response proportion is unknown?

Use 50% (0.5). This gives the largest possible margin of error, so it is the safest conservative estimate. If you have a rough idea from prior studies, use that, but be aware the MOE will be slightly smaller than the worst-case scenario.

Does the margin of error apply to the whole survey or each question?

It applies to each question separately, but it is usually reported as a single number for the survey. In practice, the MOE varies by question because the response proportion differs. The reported MOE is typically the maximum across all questions (i.e., the one for p̂ = 50%).

Why does my sample size need to be larger for a small population?

It doesn’t always. For a population of 10,000, a sample of 1,000 gives a MOE of about ±3.1% (with FPC ≈ ±2.9%). To get the same MOE with a population of 1,000,000, you need roughly the same sample size. The population size matters only when your sample is a large fraction of the population. For most practical purposes, a sample of 1,000 is enough for a city, a country, or a planet.

Can I use this calculator for non-percentage data, like averages?

No. This calculator is specifically for proportions (percentages). For averages (means), you need the standard deviation of the population, which is rarely known. The margin of error for a mean uses a t-distribution or z-distribution with the standard deviation, not the proportion formula.

Related

Formula used
in n | Sample size | people | 1000 | 1
in p | Response proportion | % | 50 | 0
in cl | Confidence level | % | 95 | 50
in N | Population size | people | 1000000 | 1
out moe | Margin of error | ±% | ( ( sqrt( (p/100) * (1 - p/100) / n ) * (1.96) ) * 100 ) * sqrt( (N - n) / (N - 1) ) | 2
out se | Standard error | % | ( sqrt( (p/100) * (1 - p/100) / n ) ) * 100 | 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.