Margin of Error Calculator Formula

Understand the math behind the margin of error calculator. Each variable explained with a worked example.

Formulas Used

Margin of Error

moe = z * sigma / sqrt(n)

Standard Error

se = sigma / sqrt(n)

Relative Margin (%)

moe_pct = (z * sigma / sqrt(n)) * 100 / (sigma * sqrt(n) / sqrt(n))

Variables

VariableDescriptionDefault
zZ-Value1.96
sigmaStandard Deviation12
nSample Size100

How It Works

How to Calculate Margin of Error

Formula

E = z * (sigma / sqrt(n))

The margin of error is the half-width of the confidence interval. It depends on three factors: the confidence level (via z), the variability of the data (sigma), and the sample size (n). A smaller margin of error means a more precise estimate.

Worked Example

z = 1.96, SD = 12, n = 100. What is the margin of error?

z = 1.96sigma = 12n = 100
  1. 01Standard Error = 12 / sqrt(100) = 12 / 10 = 1.2
  2. 02Margin of Error = 1.96 * 1.2 = 2.352
  3. 03The sample mean will be within +/- 2.352 of the population mean with 95% confidence.

Ready to run the numbers?

Open Margin of Error Calculator