Margin of Error

Margin of Error measures how far your sample statistic might differ from the true population value, used when estimating populations from sample data.

E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}

Solve a problem with Margin of Error

Type the problem. The solver will use Margin of Error where Margin of Error is the right tool, and tell you when it is not.

Drag one in or paste from the clipboard. JPEG, PNG or WebP. You get the transcription to check before anything is solved.

How to get a better answer
  • Paste the whole problem, including the instruction word — "simplify", "solve for x" and "factor" lead to three different answers.
  • Say what you have already tried. "I got x = 4 and the book says 2" turns a solution into a diagnosis.
  • Set the level in the settings button. A calculus shortcut is not a better answer if you have not met derivatives yet.
  • For a photo, get the whole problem in frame and hold the page flat — you get the transcription to fix before anything is solved.

What each symbol means

What Margin of Error takes
EE
zz^{*}
σ\sigma
nn
Margin of Error
SymbolMeaning
EEThe margin of error itself, measured in the same units as the data; it represents the maximum expected distance between your sample statistic and the true population parameter.
zz^{*}The critical value from the standard normal distribution corresponding to your desired confidence level, with no units; common values are 1.645 for 90%, 1.96 for 95%, and 2.576 for 99% confidence.
σ\sigmaThe population standard deviation, measured in the same units as your data; it measures how spread out the population values are, and if confused with sample standard deviation ss, your margin of error will be wrong.
nnThe sample size, or number of observations you collected; it must be a positive whole number, and larger values of nn make the margin of error smaller.

When to use it

Use margin of error when you have taken a sample and want to know the range in which the true population parameter likely falls.

Level

Usually taught in: Statistics · Appears on: AP Statistics

Worked examples

1. Calculate margin of error with integer values

Problem

A researcher wants to estimate the average height of students at a school. From a sample of 36 students, the sample mean is 68 inches and the population standard deviation is known to be 3 inches. If using a 95% confidence level with z=1.96z^{*} = 1.96, what is the margin of error?
  1. E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}

    Write the margin of error formula with the critical value zz^{*}, population standard deviation σ\sigma, and sample size nn.

  2. E=1.96336E = 1.96 \cdot \frac{3}{\sqrt{36}}

    Substitute the given values: z=1.96z^{*} = 1.96, σ=3\sigma = 3 inches, and n=36n = 36.

  3. E=1.9636E = 1.96 \cdot \frac{3}{6}

    Evaluate the square root: 36=6\sqrt{36} = 6.

  4. E=1.960.5E = 1.96 \cdot 0.5

    Simplify the fraction: 3÷6=0.53 \div 6 = 0.5.

  5. E=0.98E = 0.98

    Multiply the values: 1.96×0.5=0.981.96 \times 0.5 = 0.98 inches.

Answer: E=0.98 inchesE = 0.98 \text{ inches}

We use this formula because we want to know how far our sample mean might be from the true population mean. With a 95% confidence level, we can be 95% confident that the true average height falls within 0.98 inches of our sample mean of 68 inches. This works because sample means follow a normal distribution when samples are large enough.

2. Find margin of error with larger sample and higher confidence

Problem

A quality control team tests 64 light bulbs from a production batch. The sample mean lifespan is 1,000 hours with population standard deviation 40 hours. At 99% confidence level where z=2.576z^{*} = 2.576, what is the margin of error?
  1. E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}

    Start with the margin of error formula.

  2. E=2.5764064E = 2.576 \cdot \frac{40}{\sqrt{64}}

    Substitute: z=2.576z^{*} = 2.576 for 99% confidence, σ=40\sigma = 40 hours, and n=64n = 64 bulbs.

  3. E=2.576408E = 2.576 \cdot \frac{40}{8}

    Calculate the square root: 64=8\sqrt{64} = 8.

  4. E=2.5765E = 2.576 \cdot 5

    Divide: 40÷8=540 \div 8 = 5.

  5. E=12.88E = 12.88

    Multiply: 2.576×5=12.882.576 \times 5 = 12.88 hours.

Answer: E=12.88 hoursE = 12.88 \text{ hours}

Larger sample sizes make the margin of error smaller because we have more information about the population. At 99% confidence, we're more confident in our estimate but pay for it with a larger margin of error than we would have at 95% confidence. The critical value z=2.576z^{*} = 2.576 reflects this higher confidence demand compared to the 1.96 used for 95% confidence.

3. Margin of error for fuel efficiency across two road trip legs

Problem

During a cross-country road trip, Marcus drove 500 miles in the first leg. On the second leg of 300 miles, he tracks fuel consumption across 100 fill-ups. Historical data shows the population standard deviation for his car's fuel consumption is 0.6 miles per gallon. Using a 95% confidence level where z=1.96z^{*} = 1.96, what is the margin of error for his fuel efficiency estimate on the second leg?
  1. E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}

    Write the margin of error formula.

  2. E=1.960.6100E = 1.96 \cdot \frac{0.6}{\sqrt{100}}

    Substitute values for the second leg: z=1.96z^{*} = 1.96, σ=0.6\sigma = 0.6 miles per gallon, and n=100n = 100 fill-ups.

  3. E=1.960.610E = 1.96 \cdot \frac{0.6}{10}

    Evaluate: 100=10\sqrt{100} = 10.

  4. E=1.960.06E = 1.96 \cdot 0.06

    Divide: 0.6÷10=0.060.6 \div 10 = 0.06 miles per gallon.

  5. E=0.1176E = 0.1176

    Multiply: 1.96×0.06=0.11761.96 \times 0.06 = 0.1176 miles per gallon.

Answer: E0.12 miles per gallonE \approx 0.12 \text{ miles per gallon}

The margin of error applies to the second leg independently because it is based on the sample size and variability for that leg's measurements. Even though Marcus drove different distances on each leg, the fuel consumption variability measured by σ\sigma is what determines the precision of his estimate. The larger sample size of 100 fill-ups gives him a small margin of error for his fuel efficiency estimate.

Common mistakes

Where Margin of Error usually goes wrong
Answer came out wrong
Using the sample standard deviation ss instead of the population standard deviation σ\sigma in the formula.
If only the sample standard deviation ss is available, use a tt-distribution with the formula E=tsnE = t^{*}\frac{s}{\sqrt{n}} instead, not this zz-formula.
Writing E=zσnE = z^{*}\frac{\sqrt{\sigma}}{\sqrt{n}} or applying the square root to σ\sigma instead of just nn.
The standard error is σn\frac{\sigma}{\sqrt{n}} with the square root applied only to nn in the denominator, not to σ\sigma. Write it exactly as E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}.
Calculating σn\frac{\sigma}{\sqrt{n}} and calling that the margin of error, forgetting to multiply by zz^{*}.
The margin of error must include the critical value: E=zstandard errorE = z^{*} \cdot \text{standard error}. For a 95% confidence level, multiply by z=1.96z^{*} = 1.96; ignoring this multiplier gives a margin of error that is too small.
The mistakeWhy it is wrongThe fix
Using the sample standard deviation ss instead of the population standard deviation σ\sigma in the formula.The formula E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}} is specifically for when you know the population standard deviation; using sample standard deviation ss gives an underestimate of the margin of error.If only the sample standard deviation ss is available, use a tt-distribution with the formula E=tsnE = t^{*}\frac{s}{\sqrt{n}} instead, not this zz-formula.
Writing E=zσnE = z^{*}\frac{\sqrt{\sigma}}{\sqrt{n}} or applying the square root to σ\sigma instead of just nn.This violates the order of operations and changes the relationship between the standard deviation and margin of error.The standard error is σn\frac{\sigma}{\sqrt{n}} with the square root applied only to nn in the denominator, not to σ\sigma. Write it exactly as E=zσnE = z^{*}\frac{\sigma}{\sqrt{n}}.
Calculating σn\frac{\sigma}{\sqrt{n}} and calling that the margin of error, forgetting to multiply by zz^{*}.The value σn\frac{\sigma}{\sqrt{n}} is called the standard error, not the margin of error; it is missing the critical value zz^{*} that corresponds to your confidence level.The margin of error must include the critical value: E=zstandard errorE = z^{*} \cdot \text{standard error}. For a 95% confidence level, multiply by z=1.96z^{*} = 1.96; ignoring this multiplier gives a margin of error that is too small.

Tips and when to use something else

  • The margin of error increases with higher confidence levels (larger zz^{*}) and decreases with larger sample sizes (larger nn), since nn appears under a square root.
  • To reduce your margin of error by half, you must increase your sample size by a factor of 4, because doubling nn only reduces the error by 21.41\sqrt{2} \approx 1.41.
  • If you do not know the population standard deviation σ\sigma, do not use this formula; instead use the tt-distribution with sample standard deviation ss, because the sample standard deviation has different variability properties than the population standard deviation.
  • The margin of error is always positive and symmetric: it defines a confidence interval from (sample statistic - EE) to (sample statistic ++ EE), giving the range where you expect the true population parameter to lie.

Frequently asked questions

What does margin of error actually mean in simple terms?
The margin of error is the maximum expected difference between your sample statistic and the true population parameter. If you calculate a 95% confidence margin of error of 3 points, it means you are 95% confident the true population value falls within 3 points of your sample result—either 3 points above or 3 points below.
What should I do if I do not know the population standard deviation?
If you do not know σ\sigma, you cannot use this formula. Instead, estimate it using the sample standard deviation ss and use a tt-distribution: E=tsnE = t^{*}\frac{s}{\sqrt{n}}. The tt-distribution accounts for the extra uncertainty when you are estimating the standard deviation from the sample.
How do I choose which confidence level to use?
Common confidence levels are 90% (z=1.645z^{*} = 1.645), 95% (z=1.96z^{*} = 1.96), and 99% (z=2.576z^{*} = 2.576). Higher confidence means a larger margin of error. Choose based on how much precision you need and how much risk you can tolerate: 95% is the standard choice in most studies.
Does a smaller margin of error always mean a better study?
Not always. A smaller margin of error requires a much larger sample size, which costs more time and money. A good study balances accuracy with practical constraints. Sometimes a margin of error of 5% is acceptable if it saves significant resources, while other studies demand 1% precision.

Need a different method?

The full solver is not scoped to one formula — type any problem and it will pick the method.

Open the math solver

Reviewed 2026-09-18