ThisCalculator

Statistics

Margin of Error Calculator: Formula and Examples

Updated · Standard formula, shown below

Margin of error 3.10 percentage points
Standard error
1.58 percentage points
Result
Sample size
1000 people
You entered
Confidence level
95 %
You entered

Margin of Error Calculator: Formula and Examples

This calculator estimates the margin of error for a population proportion from a sample size and confidence level. Enter the number surveyed and the desired confidence level; it returns the margin of error as a percentage, along with the estimated sample proportion used in the calculation.

Formula

For a sample proportion, the approximate margin of error is the critical z-score multiplied by the standard error:

Margin of error = z × √[p(1 − p) / n]

  • n is the sample size, measured as a count of people or other sampled units.
  • p is the estimated proportion expressed as a decimal between 0 and 1.
  • z is the standard-normal critical value for the chosen confidence level. For 95% confidence, z is approximately 1.96.

The calculator accepts p and the confidence level as percentages. Its headline result converts the proportion-scale margin of error to percentage points by multiplying by 100. The confidence-level input is included for clarity, but the calculation shown uses z = 1.96, so it is specifically a 95% calculation. To calculate another confidence level correctly, use its corresponding z-score in place of 1.96. Common two-sided values are about 1.645 for 90%, 1.96 for 95%, and 2.576 for 99%.

Worked Example

Using the calculator’s default values, the sample size is 1,000, the confidence level is 95%, and the estimated proportion is 50%. Convert the percentage to a decimal: p = 0.50. For 95% confidence, z = 1.96.

First calculate the standard error:

√[0.50 × (1 − 0.50) / 1,000] = √0.00025 ≈ 0.015811

Then multiply by the critical value and convert to percentage points:

1.96 × 0.015811 × 100 ≈ 3.10 percentage points

The estimated standard error is 1.58 percentage points. Under the assumptions of the method, a survey result of 50% would therefore have an approximate 95% confidence interval from 46.90% to 53.10%. The interval is not a guarantee that the true value lies inside it; the confidence level describes how often this method would capture the true value across repeated comparable samples.

What Margin of Error Means

Margin of error describes the sampling uncertainty around an estimate. If a properly conducted poll reports that 40% of respondents support an option with a margin of error of 3 percentage points, a simple interpretation is an approximate interval from 37% to 43%, subject to the survey’s assumptions and other sources of error.

It is a distance, not a percentage of the reported result. A margin of error of 3 percentage points around 40% is different from 3% of 40%, which is 1.2 percentage points. Reports should make clear whether they mean percentage points or relative percent.

When to Use This Calculation

Use this formula for an approximate confidence margin around a proportion from a random sample, such as the share choosing a particular answer. It is not the standard formula for a sample mean, which requires the sample’s standard deviation, or for every kind of survey design.

  • Use a larger sample size when you need a narrower sampling margin, if the sampling method and other conditions remain comparable.
  • Use the expected proportion when available. If it is unknown, 50% is a conservative planning choice for this formula because p(1 − p) is largest at 0.50.
  • Choose the confidence level before interpreting the result, then use its matching critical value.

What Changes the Result

For a fixed confidence level and estimated proportion, the margin shrinks approximately in proportion to 1/√n. This means that making the sample four times as large roughly halves the margin; doubling the sample does not halve it. A higher confidence level requires a larger critical value and therefore a wider interval.

The proportion also matters. At 50%, uncertainty is greatest for a given sample size. Estimates near 0% or 100% have a smaller standard error under the simple formula, although small samples and extreme proportions can make this normal approximation unreliable. For those cases, methods such as Wilson or exact binomial intervals may be more appropriate.

Limits and Common Mistakes

A calculated margin of error accounts for random sampling variability under a simple random-sampling model. It does not automatically account for people who were not reached, nonresponse, question wording, measurement errors, weighting, clustering, or other survey-design effects. A very large, biased sample can be less informative than a smaller, well-designed one.

  • Do not treat the margin as a percentage of the estimate unless it is explicitly reported that way; the usual poll margin is in percentage points.
  • Do not use the 95% z-score for a different confidence level. The calculator’s confidence input does not change its formula.
  • Use the number of independent sampled units, not the number of questions asked or answers collected.
  • Do not assume that a sample taken without replacement has the same uncertainty as an unlimited population when the sample is a large fraction of the population. A finite-population correction may be needed.
  • Round only at the end. Rounded intermediate values can slightly alter the displayed result.

Frequently Asked Questions

How do I calculate margin of error?
For a proportion, multiply the appropriate z-score by √[p(1 − p) / n]. Convert p from a percentage to a decimal first. For the common 95% level, use z ≈ 1.96.

What is the margin of error for a 1,000-person survey?
At 95% confidence, a proportion of 50%, and a simple random sample of 1,000, it is about 3.10 percentage points. The result changes with the estimated proportion, confidence level, and survey design.

Does a 95% confidence level mean the result is 95% accurate?
No. It does not measure overall accuracy or guarantee a particular result. In repeated sampling under the method’s assumptions, about 95% of intervals constructed this way would contain the true population proportion.

Why is 50% used when the proportion is unknown?
Because p(1 − p) reaches its maximum at 0.50, it gives the largest standard error and a cautious sample-size estimate under this formula.

Can I use this formula for an average?
No. This formula is for proportions, such as the share selecting an answer. A mean needs a standard error based on the sample standard deviation and sample size, plus a suitable critical value.

Related

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