How Do You Find the Margin of Error? Formula & Examples

By culbreath Editorial · 2026-10-10 · 7 min read

Calculating a margin of error tells you how precisely a sample survey or experiment reflects the larger population it came from. The most common formula is MoE = z × (σ / √n), where z is the critical value from the normal distribution (1.96 for 95% confidence), σ is the population standard deviation, and n is the sample size. If you’re working with a proportion instead of a mean, you substitute the standard error of the proportion, √[p(1−p)/n]. So when someone asks how do you find the margin of error, the short answer is: pick your confidence level, find z, divide your standard deviation by the square root of your sample size, and multiply.

The Core Formula and What Each Piece Means

The margin of error quantifies the random sampling uncertainty around an estimate. A poll reporting “45% ± 3%” has a margin of error of 3 percentage points, meaning the true value likely sits within that band at the stated confidence level.

Two versions show up depending on what you’re measuring:

  • Means: MoE = z × (σ / √n)
  • Proportions: MoE = z × √[p(1−p) / n]

Both share the same logic. The term you multiply by z is the standard error — the typical distance between a sample statistic and the true population value. Larger samples shrink the standard error, which shrinks the margin of error. This inverse square-root relationship is a core result covered in Statistics LibreTexts.

Choosing the z-value

The z-value is tied to your confidence level. For a two-tailed interval, the common values are consistent and well established:

Confidence level z-value
90% 1.645
95% 1.96
99% 2.576

These come from the standard normal distribution: 95% confidence leaves 5% in the tails, split into 2.5% on each side, and the z-score cutting off that top 2.5% is 1.96. Higher confidence always widens the margin — you pay for certainty with precision.

Working Through an Example

Suppose a researcher measures the average height of a random sample of 100 adult men. The population standard deviation is known to be about 3 inches, and we want 95% confidence.

Step 1: Identify the inputs. σ = 3, n = 100, z = 1.96.

Step 2: Compute the standard error. σ / √n = 3 / √100 = 3 / 10 = 0.3 inches.

Step 3: Multiply by z. MoE = 1.96 × 0.3 = 0.588 inches.

So if the sample mean height came out to 69 inches, you’d report 69 ± 0.59 inches. The margin of error is under 0.6 inches.

Now flip it to a proportion. A survey of 400 respondents finds that 52% support a policy. Plug in p = 0.52:

  • √[0.52 × 0.48 / 400] = √[0.2496 / 400] = √0.000624 ≈ 0.025
  • MoE = 1.96 × 0.025 ≈ 0.049, or about 4.9 percentage points

That estimate is 52% ± 4.9%, roughly 47% to 57%. Notice the margin here is much larger — proportion estimates near 50% produce the widest intervals, which is why pollsters often report a worst-case figure based on p = 0.5.

The shortcut for proportions at 95%

When no prior estimate of p exists, researchers use p = 0.5 because it maximizes p(1−p) and gives the most conservative (largest) margin. That simplifies the 95% formula to roughly:

MoE ≈ 1 / √n

For n = 400, that’s 1/20 = 0.05, or 5 percentage points — matching the example above. For n = 1,000, it drops to about 3.2 percentage points. This is why you constantly see “±3 points” on national polls with around a thousand respondents, a figure Pew Research Center regularly references when describing survey methodology and sampling error.

Common Mistakes and Practical Notes

The formula is straightforward, but a few traps catch people repeatedly.

Dividing by n instead of √n. The standard error uses the square root of the sample size. Quadrupling your sample only halves the margin of error — precision gets expensive fast.

Confusing standard deviation with standard error. Standard deviation describes individual data points; the standard error describes the sample statistic’s own variability. You divide by √n to get from one to the other.

Using the wrong z for the wrong confidence level. A 90% interval uses 1.645, not 1.96. Mixing these quietly shifts your reported range.

Forgetting finite population corrections. If your sample is a large fraction of a small population — say, more than about 5% of it — the standard formula overstates the margin slightly, and you apply a correction factor of √[(N−n)/(N−1)].

Treating MoE as the only error source. Sampling error is just one piece. Nonresponse bias, question wording, and coverage gaps can matter more than the calculated margin, a point survey researchers emphasize repeatedly. The margin of error assumes a genuine random sample — it says nothing about whether your sample was actually random or your questions were fair.

For health, medical, or financial contexts, margin of error and confidence intervals are general statistical tools, but interpreting results that affect decisions should involve a qualified statistician or the relevant professional, since misapplied methods can lead to costly conclusions.

How Sample Size Changes the Margin of Error

The single biggest lever you control is n, and it behaves in a way that surprises many people. Because the standard error sits under a square root, doubling your sample does not halve the margin — it only shrinks it by a factor of √2, about 29%. To cut the margin in half, you need four times the sample.

A quick table makes the pattern concrete, using the 95% shortcut MoE ≈ 1/√n:

Sample size (n) Approx. margin of error
100 ±10.0 points
400 ±5.0 points
1,000 ±3.2 points
2,500 ±2.0 points
10,000 ±1.0 points

Going from 100 to 400 respondents tightens the estimate from ±10 to ±5 points — a real improvement. But pushing from 2,500 to 10,000, a fourfold jump in cost and effort, only moves you from ±2.0 to ±1.0. This diminishing return is why national polls rarely exceed a few thousand respondents.

Working backward from a target

You can invert the formula to decide how many people you need. Suppose you want a margin of error no larger than 3 percentage points at 95% confidence, using the conservative p = 0.5 assumption.

Start with MoE = z × √[p(1−p)/n]. Set MoE = 0.03, z = 1.96, p = 0.5:

  • 0.03 = 1.96 × √(0.25/n)
  • Square both sides: 0.0009 = 3.8416 × (0.25/n)
  • Solve for n: n = 3.8416 × 0.25 / 0.0009 ≈ 1,067

So you’d need about 1,067 completed responses — round up to 1,100 to be safe. This backward calculation is exactly how researchers budget a study before collecting a single data point.

Confidence intervals versus margin of error

The two terms get used interchangeably, but they’re distinct. The margin of error is a single number — the plus-or-minus half-width. The confidence interval is the full range: the estimate minus the margin to the estimate plus the margin. For a sample mean of 69 inches with a margin of 0.59, the confidence interval is 68.41 to 69.59 inches. The interval gives you the actual bounds you’d quote; the margin is the radius that defines it.

A margin of error is only meaningful alongside the confidence level and the estimate itself. “43% support, ±3 points at 95% confidence” is complete; “43% ± 3” alone hides the crucial qualifier. Round sensibly — report ±3.1 points, not ±3.1428 — and watch for subgroup margins, which grow fast for smaller groups.

Key Takeaways

  • The general formula is MoE = z × (standard error), where the standard error is σ/√n for a mean or √[p(1−p)/n] for a proportion.
  • Use z = 1.645 for 90%, 1.96 for 95%, and 2.576 for 99% confidence.
  • For proportions at 95% confidence, the quick estimate is MoE ≈ 1/√n — about ±5 points for n = 400 and ±3.2 points for n = 1,000.
  • Margin of error shrinks with the square root of sample size, so cutting it in half requires four times the data.
  • It captures only random sampling error; bias from poor sampling or question design is separate and often larger.
  • Always match your z-value to your stated confidence level, and remember that p = 0.5 gives the most conservative estimate.

Frequently Asked Questions

What is the formula for margin of error?
The margin of error is calculated as MOE = z × (σ / √n), where z is the critical value for your confidence level (like 1.96 for 95%), σ is the standard deviation, and n is the sample size. For proportions, use MOE = z × √[p(1-p)/n].
How do you find the margin of error with a 95 confidence interval?
For a 95% confidence level, use z = 1.96 in the margin of error formula. Multiply 1.96 by the standard error (standard deviation divided by the square root of the sample size). For example, with σ = 10 and n = 100, MOE = 1.96 × (10/10) = 1.96.
How do you calculate margin of error without standard deviation?
If you're working with a proportion and don't know the population standard deviation, use the sample proportion p̂ in the formula MOE = z × √[p̂(1-p̂)/n]. If no estimate is available, use p = 0.5, which gives the most conservative (largest) margin of error.
What sample size do you need to get a margin of error?
You can rearrange the margin of error formula to solve for sample size: n = (z × σ / MOE)² for means, or n = z² × p(1-p) / MOE² for proportions. For example, to get a 3% margin of error at 95% confidence with p = 0.5, you need n = (1.96² × 0.25) / 0.03² ≈ 1,067.
How do you find the margin of error with mean and standard deviation?
Use the formula MOE = z × (s / √n), where s is the sample standard deviation and n is the sample size. If the population standard deviation is unknown and n is small, replace z with the t-value from the t-distribution for n − 1 degrees of freedom.
margin of errorstatisticsconfidence intervalstandard errorsample size

References

← Back to home