Margin Of Error Calculator - ME for Mean and Proportion

Use this margin of error calculator to find the margin of error for a sample mean or proportion from confidence level, sample size, and standard deviation.

Margin Of Error Calculator

The probability the resulting interval would contain the true population parameter. 95% is the most common choice for survey research.

Use the Z distribution when n is at least 30 or the population standard deviation is known. Use the t distribution for small samples with unknown σ.

Number of observations in the sample. Must be at least 2 to compute a standard error.

Standard deviation of the sample (s) or known population standard deviation (σ). Scales linearly with the margin of error; use 0.5 as the conservative worst-case for a survey proportion.

Optional finite population size. Leave at 0 to skip the finite population correction. Must be greater than the sample size when used.

Results

Margin of Error
0
Critical Value (Z or t) 0
Standard Error 0
Sample Size for ± 0.05 ME 0

What Is Margin Of Error Calculator?

A margin of error calculator is a statistics tool that turns a confidence level, sample size, and standard deviation into the half-width of a confidence interval for a population mean or proportion. It expresses the maximum expected difference between a sample estimate and the true population value at the chosen confidence level, and is the most widely reported number in opinion polling, clinical research, and quality control. Use this calculator to plan a survey, audit a published result, or teach the difference between statistical precision and a point estimate.

  • Survey and opinion polling: report a survey percentage with its margin of error so readers can see the range around the headline number where the true value is expected to fall.
  • Academic and clinical research: compute the margin of error for a sample mean before reporting an effect size, and use the finite population correction when sampling from a known closed cohort.
  • Sample size planning: compare margins of error across sample sizes to find the smallest n that hits a target precision.
  • Quality control and Six Sigma: apply the margin of error to process means to set control limits and decide whether a process shift is statistically meaningful.

Survey organizations such as Pew Research Center and Gallup quote the margin of error alongside every headline percentage. The math behind that sentence is the same math this calculator performs: a critical value times the standard error.

If you also want the lower and upper bounds of the interval instead of just the half-width, our confidence interval calculator is the natural next step, and for problems built around a sample proportion (for example, the percent of voters choosing a candidate), the binomial distribution calculator reports a standard error and tail probability in the same units.

How Margin Of Error Calculator Works

The margin of error calculator multiplies a critical value by the standard error of the estimate. The critical value comes from the standard normal (Z) or the Student's t distribution depending on sample size and whether the population standard deviation is known.

ME = z × (s / √n) for Z distribution ME = t × (s / √n) for t distribution ME_fpc = ME × √((N - n) / (N - 1)) finite population correction
  • confidenceLevel: The probability the resulting interval contains the true population parameter if sampling were repeated. Drives the critical value: 1.2816 at 80%, 1.6449 at 90%, 1.96 at 95%, 2.5758 at 99%.
  • sampleSize (n): Number of observations in the sample. Larger n shrinks the standard error and therefore the margin of error.
  • stdDev (s or σ): Standard deviation of the sample (s) or known population standard deviation (σ). The margin of error scales linearly with this value.
  • distribution: Use the Z distribution when n is at least 30 or σ is known. Use the t distribution for small samples with unknown σ, where the critical value is wider to reflect the extra uncertainty.
  • populationSize (N): Optional finite population size. When supplied and greater than n, applies the finite population correction sqrt((N - n) / (N - 1)) which shrinks the margin of error.

The same arithmetic runs in reverse when you plan a survey: divide the critical value times the standard deviation by your target margin of error and square the result. The result panel reports the sample size needed for a margin of error of 0.05.

According to NIST/SEMATECH, the margin of error for a population mean is the two-sided standard normal critical value times the standard deviation divided by the square root of the sample size.

Poll of 400 voters with 95% confidence

Confidence level = 95%, Sample size = 400, Standard deviation = 0.5 (worst-case 50/50 split), Distribution = Z, Population size = 0

1. z at 95% is 1.96. 2. Standard error = 0.5 / sqrt(400) = 0.025. 3. ME = 1.96 * 0.025 = 0.049.

Margin of error: 0.049 (about ±4.9 percentage points for a survey proportion).

If a poll of 400 voters reports 52% support, the 95% confidence interval runs from roughly 47.1% to 56.9%.

Sample of 100 with standard deviation 15 at 95% confidence

Confidence level = 95%, Sample size = 100, Standard deviation = 15, Distribution = Z, Population size = 0

1. z at 95% is 1.96. 2. Standard error = 15 / sqrt(100) = 1.5. 3. ME = 1.96 * 1.5 = 2.94.

Margin of error: 2.94 on the original scale of the variable.

The point estimate should be reported as the sample mean plus or minus 2.94, the half-width of the 95% confidence interval.

When the question is how many standard errors away from the mean a single observation sits, the Z-score calculator covers that case and shares the same critical value lookup this calculator uses for the 80, 90, 95, and 99 percent confidence levels.

Key Concepts Explained

Four ideas explain everything the result panel of the margin of error calculator shows.

Confidence Level

The probability the interval would contain the true population parameter if the sampling were repeated. 95% means 19 out of 20 intervals would cover the truth; 99% is more conservative and produces a wider interval.

Critical Value (Z or t)

The number of standard errors from the mean that bound the central probability mass. 1.96 for Z at 95%, 2.576 for Z at 99%, and slightly larger values for t at small sample sizes.

Standard Error

The standard deviation of the sample mean, computed as s divided by the square root of n. As n grows, the standard error shrinks, which shrinks the margin of error.

Finite Population Correction

A multiplier of sqrt((N - n) / (N - 1)) that applies when the sample is a meaningful fraction of a known population. Pulls the margin of error down without changing the confidence level.

These definitions also explain why the margin of error and the confidence interval are linked: the margin of error is half the width of the confidence interval, so a 95% confidence interval centered on the sample mean extends one margin of error in each direction. When the design calls for an explicit hypothesis test against a hypothesized mean, the t-test calculator uses the same t critical value lookup and reports the two-tailed p-value alongside the test statistic.

How to Use This Calculator

Five short steps return a trustworthy margin of error for a sample mean or proportion.

  1. 1 Choose a confidence level: Use 95% for typical survey reporting, 99% for higher-stakes research, or 90% when you want a tighter interval.
  2. 2 Pick the distribution: Use Z for n at least 30 or when the population standard deviation is known. Use t for small samples with unknown σ.
  3. 3 Enter the sample size: The number of observations in the sample, denoted n. The result is undefined for n below 2, so the calculator enforces that minimum.
  4. 4 Enter the standard deviation: For a proportion question, use 0.5 as a conservative upper bound on the standard deviation. For a continuous variable, use the sample standard deviation.
  5. 5 Add the population size if you have one: Leave at 0 to skip the finite population correction. If the sample is a meaningful fraction of a known population, supply N.

A survey of n = 1000 with σ = 0.5 (a worst-case 50/50 split) yields a margin of error of 0.031, or about ±3.1 percentage points.

Benefits of Using This Calculator

A purpose-built margin of error calculator saves time, removes arithmetic mistakes, and makes it easy to compare scenarios side by side.

  • Replaces hand-computed z-tables: The calculator uses an inverse normal approximation to pick the critical value, so you do not have to look up 1.96 or 2.576.
  • Supports both Z and t critical values: Switch between the standard normal and the Student's t distribution with a single selector, which matters for small samples.
  • Optional finite population correction: When you know the population size and the sample is a meaningful fraction of it, the calculator multiplies in the sqrt((N - n) / (N - 1)) correction.
  • Shows the underlying critical value and standard error: The result panel surfaces the critical value and the standard error in addition to the margin of error, so the math is auditable.
  • Estimates the sample size for a target precision: The result panel reports the sample size that would produce a margin of error of 0.05 at the same confidence level and standard deviation.

If you are working with categorical outcomes, the binomial distribution calculator handles the proportion version of the same math, and the Z-score calculator is the natural tool when the question is how many standard errors away from the mean a single observation sits.

Factors That Affect Your Results

Three variables drive the size of the margin of error, and three limitations tell you when to double-check the number before publishing it.

Factor

The margin of error shrinks with the square root of the sample size. Quadruple n to halve the margin of error.

Confidence Level

Higher confidence means a wider interval. Moving from 95% to 99% increases the margin of error by roughly 31%.

Standard Deviation

The margin of error is linear in the standard deviation. A variable with twice the spread will have twice the margin of error.

Distribution Choice

For n under 30 with unknown σ, the t critical value is wider than the Z critical value, producing a larger margin of error.

  • The margin of error assumes simple random sampling. Stratified, cluster, or convenience samples usually produce wider intervals in practice because of design effects.
  • The finite population correction assumes the sample is drawn from a known closed population. If the population is changing, the corrected margin of error can be too optimistic.
  • The sample size needed for a 0.05 margin of error assumes the same standard deviation and confidence level you entered. If the variable is more variable than expected, the planning number will be too small.

When the question is how much of the data falls within one, two, or three standard deviations of the mean, the empirical rule calculator applies the 68-95-99.7 rule of thumb that pairs naturally with a margin of error report, and the full two-sided interval sits one margin of error above and below the point estimate. According to AAPOR, the margin of sampling error is a relatively easily calculated component of total survey error, and standardized reporting of that margin is the first step in assessing whether a survey's results can be trusted.

Margin of error calculator interface showing confidence level, sample size, standard deviation, and resulting margin of error, Z score, and standard error
Margin of error calculator interface showing confidence level, sample size, standard deviation, and resulting margin of error, Z score, and standard error

Frequently Asked Questions

Q: What is margin of error?

A: Margin of error is the half-width of a confidence interval. It is the maximum expected difference between a sample estimate (such as a survey percentage) and the true population value at a chosen confidence level. A 95% margin of error of 3 percentage points means the true value is expected to fall within 3 points of the reported result 95% of the time.

Q: How do you calculate margin of error?

A: Multiply the critical value for the chosen confidence level (1.96 for 95% with the Z distribution) by the standard error, which is the standard deviation divided by the square root of the sample size. The result is the margin of error.

Q: What is the formula for margin of error?

A: The standard formula is ME = z * s / sqrt(n), where z is the critical value, s is the standard deviation, and n is the sample size. With the t distribution for small samples the formula becomes ME = t(n-1) * s / sqrt(n). The finite population correction adds a factor of sqrt((N - n) / (N - 1)).

Q: What is a good margin of error for a survey?

A: A margin of error of plus or minus 3 to 5 percentage points at 95% confidence is the most common target for public opinion polls. Smaller surveys can aim for plus or minus 3 points; quick screening polls accept plus or minus 5 to 7 points in exchange for a smaller sample.

Q: How does sample size affect margin of error?

A: The margin of error shrinks with the square root of the sample size. To cut the margin of error in half, you need to quadruple the sample size, which is why survey organizations spend most of their budget on the first few hundred respondents and see diminishing precision gains beyond that.

Q: What is the difference between margin of error and confidence interval?

A: The margin of error is half the width of the confidence interval. The confidence interval is the range above and below the sample estimate (estimate plus or minus the margin of error), while the margin of error is just the plus-or-minus number that gets added and subtracted.