How many people to survey

Margin of error calculator

Enter your sample size, confidence level and, if you know it, the population size. Get the ± margin around any percentage from your survey.

  • Checked against reference values
  • Free, no sign-up
  • Nothing leaves your browser

Parameters

Number of respondents who completed the survey

Total size of the target audience. Leave empty if unknown or very large

Share of intervals built this way that contain the true value over repeated surveys

If unknown, use 50%: it gives the largest (conservative) margin of error

50%

Assumptions and limitations

  • The formula is for a proportion (a percentage), not for a mean.
  • p = 50% gives the largest (conservative) margin of error.
  • Treat the result with caution for small samples (n < 30) or results close to 0% or 100%.
  • The finite population correction is applied when you enter the population size.
Margin of error
—
Enter data

Collect real answers in a SurveyNinja survey and see them in charts in the report.

Use this template See the questions first

Data is not stored — calculation runs in your browser.

Ready-made template

Do it with your own respondents

The “Market research survey” template already has the questions. Put in your company name, share the link and watch the answers come in.

  1. Copy the template: the questions are written
  2. Share it by link, QR code or a widget on your site
  3. Read the results in the report with charts

New accounts get 14 days of Premium features, no credit card.

What is the margin of error in a survey?

The margin of error is the half-width of the confidence interval around a survey percentage: a result of 60% with a margin of ±5% at 95% confidence gives the interval 55–65%. It equals z × √(p(1−p)/n), shrinks as the sample grows and covers random sampling error only, not bias from wording or from who chose to respond.

How margin of error is calculated

  • Margin of error formula

    MOE = z × √(p(1−p)/n) × FPC, where z is the critical value for the confidence level, p is the proportion, n is the sample size and FPC is the finite population correction.

  • Z-values and confidence level

    90% confidence → z = 1.645. 95% confidence → z = 1.96 (standard). 99% confidence → z = 2.576. Higher confidence means a wider interval and a larger margin of error: with 400 responses the margin is ±4.1%, ±4.9% and ±6.4%.

  • Finite population correction

    FPC = √((N−n)/(N−1)). It matters when the sample is a noticeable part of the population (more than about 5%) and lowers the margin of error: 400 responses from 10,000 people give ±4.8% instead of ±4.9%, from 1,000 people ±3.8%. When the whole population is surveyed (n = N), there is no sampling error.

  • Why p = 50%

    At p = 50% the product p(1−p) is at its maximum (0.25), giving the largest margin of error. If the true proportion is further from 50%, the actual margin of error is smaller: with 400 responses, a result of 20% or 80% has a margin of ±3.9%.

  • Margin of error vs confidence interval

    They describe the same range. The confidence interval is the range itself (55–65%); the margin of error is the distance from the result to either end (±5 points). The confidence level says how often intervals built this way contain the true value.

  • Why it applies to proportions

    p(1−p) is the variance of a yes/no answer, so the formula fits any share: the percent who chose an option, the share of 4s and 5s in CSAT, the share of promoters. A mean, such as an average rating, needs its standard deviation instead.

Margin of error examples

  1. Customer survey, large population

    • n = 400, population unknown, 95% confidence, result 50%

    MOE = 1.96 × √(0.5 × 0.5 / 400) = 1.96 × 0.025 = ±4.9 points. The interval is 45.1–54.9%.

  2. Employee survey with finite population correction

    • 400 answers from a company of 1,000 employees, 95% confidence, p = 50%

    Without the correction the margin is ±4.9%. FPC = √((1,000 − 400) / (1,000 − 1)) ≈ 0.775, so MOE ≈ 4.9 × 0.775 ≈ ±3.8 points.

  3. A result far from 50%

    • n = 400, 95% confidence, 80% answered "yes"

    MOE = 1.96 × √(0.8 × 0.2 / 400) ≈ ±3.9 points, so the interval is 76.1–83.9%. Calculating at 50% would overstate the margin (±4.9).

  4. A subgroup inside the sample

    • 1,000 respondents, 150 of them new customers
    • 60% chose the same option in both groups

    For all 1,000 respondents the margin at 95% is ±3.0 points. For the 150 new customers it is ±7.8 points. Report subgroup results with their own margin.

Margin of error by sample size

* At p = 50% and a very large population (no finite population correction), with z = 1.645, 1.96 and 2.576

Sample size MOE (90%) MOE (95%) MOE (99%)
50 ±11.6% ±13.9% ±18.2%
100 ±8.2% ±9.8% ±12.9%
200 ±5.8% ±6.9% ±9.1%
300 ±4.7% ±5.7% ±7.4%
400 ±4.1% ±4.9% ±6.4%
500 ±3.7% ±4.4% ±5.8%
1,000 ±2.6% ±3.1% ±4.1%
1,500 ±2.1% ±2.5% ±3.3%
2,000 ±1.8% ±2.2% ±2.9%

What to avoid

  1. Comparing two results by their own margins

    The margin of a difference is larger than the margin of each result. For two independent groups of equal size it is about 1.4 times (√2) larger; for two answers to the same question in one sample it approaches twice the margin. Test a difference with a significance test.

  2. Using the full-sample margin for a subgroup

    A subgroup has fewer respondents and a wider margin. Calculate it with the subgroup's own n.

  3. Treating the margin as the total error

    It covers sampling error only. Coverage gaps, nonresponse and question wording add error the formula does not see, and weighting widens the real margin (the design effect).

  4. Applying it to averages

    The p(1−p) formula is for percentages. The margin of an average rating depends on the spread of the answers, measured by the standard deviation.

The SurveyNinja ninja with survey templates

Next step

Read the answers in a report, not a spreadsheet

Charts are built for you from every answer. Share the report by link or export the answers to Excel, CSV or SPSS.

  • Ready questions or AI from a description
  • A link for your email or chat, a QR code or a widget on your site
  • Charts in the report, export to Excel, CSV and SPSS

Frequently asked questions about margin of error

What is margin of error?

It is the half-width of the confidence interval around your result. With a margin of ±5% at 95% confidence and a result of 60%, the confidence interval is 55–65%: intervals built this way contain the true value in about 95% of repeated surveys.

What formula is used for margin of error?

MOE = Z × √(p(1−p)/n). For a finite population N it is multiplied by √((N−n)/(N−1)). Z comes from the confidence level (95% → 1.96).

What margin of error is acceptable?

There is no universal standard. A common rule of thumb in market research is ±5% at 95% confidence; for decisions that hinge on a few percentage points people aim for ±3% or less, and ±10% is often enough for a pilot. The badges in the calculator follow this rule of thumb.

How to reduce margin of error?

Increase the sample size. The margin of error is inversely proportional to √n: to halve it you need four times the sample.

What is the finite population correction?

It lowers the margin of error when the sample is a noticeable part of the population. Above roughly 5% of the population it has a visible effect; for a very large population it is close to 1 and changes nothing.

Why is the margin of error largest at p = 50%?

Because p(1−p) is at its maximum at p = 0.5 (it equals 0.25). If the true proportion is further from 50% (for example 80% or 20%), the actual margin of error is smaller than the one calculated at 50%.

How are margin of error and sample size related?

Inversely: a larger sample gives a smaller margin of error. Use the sample size calculator to find the n you need for a target margin.

Does the margin of error apply to an opt-in sample?

The formula assumes a random sample from the population. For an opt-in sample, such as a link shared on social media, treat it as a rough guide to precision and say how the respondents were recruited.

Why use a margin of error calculator after a survey?

To understand how precise the results are. If the margin of error is wide, avoid strong conclusions about small differences, or collect more responses.

Learn the method

Read how the method works and where its numbers come from.

Agent skills

Do this with your AI assistant

Free agent skills for Claude Code, Codex, Cursor and Gemini CLI that do this job in your SurveyNinja account.

All agent skills
The SurveyNinja ninja takes off on a rocket

Turn the numbers into a survey

Start from the “Market research survey” template: the questions are ready.