Margin of Error Calculator
Quickly compute the statistical margin of error for a sample estimate using the formula Margin of Error = z × (σ / √n). Useful for students, researchers, and anyone running surveys or experiments.
Common presets: 90% (1.645), 95% (1.96), 99% (2.576).
If provided, the calculator will show the confidence interval: mean ± margin of error.
You may also like:
How the Margin of Error Calculator Works
The margin of error is a fundamental concept in statistics, widely used in surveys, experiments, hypothesis testing, and academic research. It quantifies the amount of random sampling error in a statistic — commonly the sample mean or proportion — and tells you how far your estimate may be from the true population value. This Margin of Error Calculator uses the standard formula: Margin of Error = z × (σ / √n) , where z is the z-score for your chosen confidence level (for example, 1.96 for 95% confidence), σ is the population standard deviation (or a sample-based estimate), and n is the sample size.
In practice researchers often select a confidence level such as 90%, 95%, or 99% depending on how certain they want to be. This calculator provides convenient presets for those levels, mapping to z-scores of 1.645, 1.96, and 2.576 respectively. The standard error — σ divided by the square root of n — decreases as sample size increases, which is why larger samples produce smaller margins of error and tighter confidence intervals. If you provide a sample mean, the tool will also compute a two-sided confidence interval around that mean: mean ± margin of error.
This tool is designed for students, academics, market researchers, product teams conducting A/B tests, and anyone running surveys who needs a fast and accurate margin of error calculation. It runs entirely in your browser so your data stays private. Use the calculator to plan sample sizes (by trying different n values), to interpret published results, or to report confidence intervals along with survey findings. Remember that the formula assumes random sampling and (for the z-based approach) either a known population standard deviation or sufficiently large sample sizes where the sample standard deviation approximates the population value.
Additional considerations: for proportions (binary outcomes) you can adapt the standard deviation as sqrt(p(1−p)), and for small samples or unknown variance you may prefer a t-distribution instead of a z-score. This calculator focuses on the z-score formula for simplicity and broad applicability. If you need a version for proportions or one using the t-distribution, I can build that as well.
Frequently Asked Questions
What is the margin of error?
The margin of error quantifies sampling variability and shows how far an estimate may be from the true population parameter.
Which z-score should I use?
Common choices: 90% → 1.645, 95% → 1.96, 99% → 2.576. Pick the confidence level that matches how certain you want to be.
Does this calculator store my data?
No. All calculations run locally on your device and nothing is transmitted or stored.