Skip to content

How-to guide

How to Calculate Margin of Error: Formula, Steps & Examples

Learn how to calculate Margin of Error — the formula explained step by step, with worked examples and a free calculator to check your answer.

By Vikram Iyer, M.Sc Mathematics · Updated Jun 2026 · 2 min read

Calculating your margin of error is straightforward once you know the Margin of Error formula and what each input means. This guide explains the method in plain language, walks through a manual calculation, and gives worked examples you can follow — then you can do it instantly with the Margin of Error Calculator.

What is Margin of Error?

The Margin of Error calculation tells you your margin of error from a few simple inputs. The figure you are solving for here is the margin of error, expressed in percent.

The Margin of Error formula

The core formula is:

Margin of error = Confidence level × √(Proportion × (1 - Proportion) ÷ Sample size) × 100

Here is what each input means:

  • Sample size — a number. Example: 1,000.
  • Proportion — a number. Example: 0.5.
  • Confidence level — one of: 90% (z = 1.645), 95% (z = 1.96), 99% (z = 2.576). Example: 95% (z = 1.96).

How to calculate it step by step

  • Write down the sample size (for example, 1,000).
  • Write down the proportion (for example, 0.5).
  • Choose the confidence level (for example, 95% (z = 1.96)).
  • Apply the formula above to get your margin of error.
  • Double-check the result with the Margin of Error Calculator.

Worked examples

Example 1

Input / OutputValue
Sample size1,000
Proportion0.5
Confidence level95% (z = 1.96)
Margin of error3.10%

With sample size of 1,000, proportion of 0.5 and confidence level of 95% (z = 1.96), the margin of error works out to 3.10%.

Example 2

With sample size of 2,000, proportion of 0.5 and confidence level of 95% (z = 1.96), the margin of error works out to 2.19%.

ResultValue
Margin of error2.19%

Example 3

With sample size of 500, proportion of 0.5 and confidence level of 95% (z = 1.96), the margin of error works out to 4.38%.

ResultValue
Margin of error4.38%

Tips for an accurate result

  • Keep your units consistent — mixing, say, months with years or grams with kilograms is the most common source of error.
  • Round only at the very end. Rounding inputs early can shift the final answer noticeably.
  • Re-run the numbers whenever an input changes, rather than estimating from an old result.

Prefer not to do the maths by hand? — the Margin of Error Calculator does it instantly, for free, with the formula and a worked example built in.

Continue exploring math calculators with these tools: Sample Size Calculator, Confidence Interval Calculator, Coefficient of Variation Calculator, Regular Heptagon Area Calculator, Odds to Probability Calculator.

Calculators in this guide

Frequently asked questions

The formula is: Margin of error = Confidence level × √(Proportion × (1 - Proportion) ÷ Sample size) × 100. With sample size of 1,000, proportion of 0.5 and confidence level of 95% (z = 1.96), the margin of error works out to 3.10%.

Gather each input, apply the formula step by step keeping your units consistent, and round only at the end. You can verify your answer instantly with the Margin of Error Calculator.

It uses the standard formula with exact arithmetic, so the result is correct for the inputs you enter. Bear in mind that real-world outcomes can still differ when underlying assumptions change.

The margin of error is expressed in percent. Make sure your inputs use matching units so the result is correct.

Vikram Iyer · M.Sc Mathematics

Vikram Iyer is a mathematics educator with over fifteen years of teaching experience, specialising in making quantitative concepts clear and practical for everyday use.