Sampling Error Calculator - Margin of Error

Calculate sampling error and margin of error for proportions and means. Supports finite population correction and multiple confidence levels.

Choose whether you are working with proportions or means, enter your sample data, select a confidence level, and click Calculate to get the standard error and margin of error.

Sampling Error Calculator - Margin of Error
Calculate sampling error and margin of error for proportions and means. Supports finite population correction and multiple confidence levels.

Use for categorical outcomes such as yes/no answers, pass/fail rates, or the percentage of respondents who prefer a specific option.

About the Sampling Error Calculator

Sampling error is an inevitable consequence of studying a subset (a sample) rather than the entire population. Because each sample is only a fraction of the whole, the statistics computed from it — such as the mean or proportion — will differ slightly from the true population values. The sampling error quantifies this uncertainty. This calculator computes two closely related quantities: the Standard Error (SE) and the Margin of Error (MoE). The Standard Error is the standard deviation of the sampling distribution, measuring how much sample statistics vary from sample to sample. The Margin of Error extends this by multiplying the SE by the Z-score corresponding to your chosen confidence level, giving a range that is likely to contain the true population parameter. For proportions, the standard error is SE = √[p(1–p)/n], where p is the observed sample proportion and n is the sample size. For means, the standard error is SE = s/√n, where s is the sample standard deviation and n is the sample size. In both cases, the SE decreases as sample size increases, reflecting the fact that larger samples produce more precise estimates. When the sample size exceeds 5% of the total population size N, the Finite Population Correction (FPC) factor should be applied: SE_adj = SE × √[(N–n)/(N–1)]. This correction reduces the SE because a large fraction of the population is directly measured. If the population is very large or unknown, the FPC has negligible effect and can be safely ignored. The Margin of Error (MoE) = Z × SE_adj, where Z is the Z-score for the chosen confidence level (1.282 for 80%, 1.645 for 90%, 1.960 for 95%, 2.576 for 99%). The MoE gives the half-width of the confidence interval: if your sample proportion is 55% and the MoE is ±3%, you can be confident (at the specified level) that the true population proportion lies between 52% and 58%. Sampling error is distinct from non-sampling errors such as measurement error, response bias, coverage bias, and data entry mistakes. Non-sampling errors arise from flaws in how the data are collected or processed, rather than from the random nature of selecting a sample. While sampling error can be reduced by increasing sample size, non-sampling errors require improvements in study design, question wording, and data quality procedures. This calculator is useful for survey researchers, pollsters, quality-control engineers, and anyone who needs to communicate the uncertainty in their sample-based estimates in a clear, quantitative way.

Sampling error calculation examples

Three scenarios illustrating proportion and mean calculations with and without finite population correction.

ParametersSE / Margin of ErrorNotes
Proportion: p=0.55, n=400, 95% CL, infinite popSE=0.0249, MoE=±0.0488A poll finding 55% support has a margin of error of about ±4.9%, so the true proportion is between 50.1% and 59.9% at 95% confidence.
Mean: x̄=82, s=15, n=100, 95% CL, infinite popSE=1.500, MoE=±2.940Average test score of 82 with SD=15 from 100 students. The true class mean is between 79.06 and 84.94 at 95% confidence.
Proportion: p=0.3, n=200, 95% CL, N=500SE≈0.0287, MoE≈±0.0562FPC reduces the SE because n/N=40%, which exceeds the 5% threshold. Without correction, SE would be 0.0324.

How to use the sampling error calculator

  1. Select the calculation type: Proportion for categorical data (e.g. yes/no surveys) or Mean for continuous numerical data (e.g. test scores, measurements).
  2. Enter the required inputs for your mode — Sample Proportion for proportion mode, or Sample Mean and Sample Standard Deviation for mean mode.
  3. Enter the Sample Size (n). A larger sample size produces a smaller standard error and narrower margin of error.
  4. Optionally enter the Population Size if your population is finite and your sample is more than 5% of the total. Leave blank to assume an infinite population.
  5. Select the Confidence Level and click Calculate. The results show the Standard Error and Margin of Error. Click Reset to clear all fields.

Sampling error calculator FAQ

What is the difference between sampling error and margin of error?
The Standard Error (sampling error) measures the typical deviation of sample statistics from the true population value, expressed in the original units. The Margin of Error multiplies this by a Z-score to create a confidence interval — a range likely to contain the true population value at a specified probability level.
How does sample size affect the margin of error?
Margin of error is proportional to 1/√n, so quadrupling the sample size halves the margin of error. For example, increasing a sample from 100 to 400 reduces the standard error from 0.05 to 0.025, cutting the margin of error in half. This is the most direct way to improve the precision of your estimate.
When should I apply the finite population correction?
Apply the FPC when your sample size exceeds approximately 5% of the total population. For instance, if you survey 200 of 800 employees (25% of the population), the FPC meaningfully reduces the standard error and produces a more accurate, tighter confidence interval.
What is the difference between sampling error and non-sampling error?
Sampling error arises from random chance in which individuals are selected, and it can be quantified and reduced by increasing sample size. Non-sampling errors (e.g., biased survey questions, measurement mistakes, non-response bias) arise from flaws in data collection or processing, are harder to detect, and cannot be corrected simply by taking a larger sample.
Why does this calculator use different Z-scores for each confidence level?
The Z-score translates a confidence level into the number of standard errors needed to capture that fraction of a normal distribution. A 95% confidence level uses Z=1.96 because 95% of a standard normal distribution falls within ±1.96 standard deviations of the mean. Higher confidence levels require larger Z-scores, which produce wider confidence intervals.
Can I use this calculator for A/B test results?
Yes, for basic margin-of-error interpretation. If your A/B test measures a proportion (e.g., conversion rate), enter the observed proportion, the number of observations in that group, and your desired confidence level. The margin of error tells you the uncertainty around the observed rate. For a full significance test comparing two groups, use a dedicated two-proportion z-test calculator.