Margin of error calculator

This margin of error calculator tells you how far a survey percentage or a sample mean could be from the true value, at the confidence level you choose. Enter the sample size; add the population size when the sample is a large share of it.

The numbers are calculated in your browser. Nothing you enter is sent or stored.

Margin of error calculatorOr describe it in Studio →

Leave the percentage at 50 for the largest, most cautious margin. The population size only matters when the sample is a sizeable share of it.

Margin of error, 95% confidence

± 3.1%

Interval
46.9% to 53.1%
z
1.96
Standard error
1.581%

To report

Margin of error ±3.1 percentage points at 95% confidence (n = 1000)

Check your result: the margin shrinks with the square root of the sample: four times the responses halve it (± 4.90% at 400, ± 2.45% at 1,600). At 95% confidence and p = 50%, 1 ÷ √n is a quick estimate: 1 ÷ √1000 = 3.2%, close to the exact 3.10%.
for 1,000 responses at 95%
± 3.10%
for 1,000 responses at 95%
confidence levels, 70% to 99%
7
confidence levels, 70% to 99%
the sample to halve the margin
4×
the sample to halve the margin
kinds of estimate: a percentage or a mean
2
kinds of estimate: a percentage or a mean
  • Survey percentages and means
  • Confidence 70% to 99%
  • Finite population correction
  • Shows z and the standard error
  • Runs in your browser, free

01

Margin of error formula

margin of error = z × √(p × (1 − p) ÷ n)

for a mean: margin of error = z × SD ÷ √n

z is 1.645 for 90%, 1.960 for 95% and 2.576 for 99% confidence. p is the sample proportion; 0.5 gives the widest margin and is the usual choice when you quote one figure for a whole survey. For a population of N, multiply by √((N − n) ÷ (N − 1)).

Sources: NIST/SEMATECH e-Handbook, §7.2.4.1 (the proportion formula, which it calls the most frequently used; it recommends the Wilson interval, whose lower limit, unlike this formula’s, cannot be negative); §7.2.2.2 (the margin for a mean when σ is known, z × σ ÷ √n; with an SD from a small sample, the t value replaces z).

−1.960+1.962.5%2.5%95%test statistic (z or t)
What a two-tailed p value measures. The curve is what the test statistic would look like if there were no real effect. The p value is the shaded area: the chance of a result at least as far from the centre as yours, in either direction. Here the cut-offs sit at ±1.96, which leaves 5% in the two tails together.

02

Margin of error by sample size

Sample sizeMargin of error (95%, p = 50%)
100± 9.80%
400± 4.90%
1,000± 3.10%
2,000± 2.19%
5,000± 1.39%

Halving the margin takes four times the sample. With 400 responses from a population of 2,000, the correction brings ± 4.90% down to ± 4.38%.

03

What the margin does not cover

The margin of error only measures random sampling error. It assumes a random sample; it says nothing about people who did not respond, leading questions or a sample that leaves out part of the population. For percentages near 0% or 100% and small samples, the simple formula is inaccurate and a Wilson interval is better.

04

Common mistakes with the margin of error

  • Quoting the whole survey’s margin for a subgroup. 1,000 responses give ± 3.10%; the 250 people in one subgroup give ± 6.20%.
  • Using it for the gap between two answers. With 52% against 48% among 1,000 people, the 4-point lead has a margin of ± 6.19 points, not ± 3.1.
  • Applying the simple formula to small samples and extreme percentages. For 3% of 30 people the margin is ± 6.10 points, so the lower limit comes out below zero; use a Wilson interval instead.

Trust

How this page is checked

  • The calculation runs on code with automated tests against worked reference values. Every number in the examples on this page was produced by that same code, not typed by hand.
  • The formulas and conventions used are stated on the page, so you can reproduce the result yourself or compare it with your own software.
  • Last reviewed by the Sciloom team, Zebra Nine Studio Inc. It is a tool for research and teaching, not a substitute for a statistician, a validated lab method or medical advice.

Cite this page

Sciloom. (2026). Margin of error calculator. Zebra Nine Studio Inc. https://sciloom.si/margin-of-error-calculator

Read the full methodology · Who makes Sciloom

Frequently asked questions

How do I calculate the margin of error?

Multiply the z value for your confidence level by the standard error. For a survey of 1,000 at 95% confidence: 1.96 × √(0.5 × 0.5 ÷ 1000) = 0.031, or about ± 3.1 percentage points.

What is a good margin of error?

National polls usually aim for about ± 3 percentage points, which takes roughly 1,000 responses. Smaller studies often accept ± 5 points, about 400 responses.

Does population size matter?

Hardly, unless the sample is more than about 5% of the population. A sample of 1,000 gives nearly the same margin for a city as for a country.

Is the margin of error the same as a confidence interval?

The margin is half the width of the interval. A result of 40% with a margin of ± 3 points corresponds to a confidence interval of 37% to 43%.

Planning a study? The sample size calculator works backwards from the margin you want.
Free to start, no sign-up.
Back to the tool ↑

More research tools