Calculators
Margin of Error Calculator
Calculate the margin of error for a proportion or mean from sample size, confidence level, and standard deviation or proportion locally in your browser.
Calculate the margin of error for a proportion or a mean. Choose the type, enter the sample size, and optionally add a finite population size for the correction factor. Calculations run locally in your browser; your values are not uploaded or stored.
Find the margin of error for your survey or experiment.
Choose proportion or mean mode. Enter your sample size, confidence level (90%, 95%, or 99%), and either the expected proportion or sample standard deviation. Optionally add a finite population size to apply the finite population correction. The margin of error is z × SE, where SE = √(p(1−p)/n) for proportions or s/√n for means. Everything runs locally in your browser, so your values are not uploaded or stored.
Frequently Asked Questions
Everything you need to know about this tool, how it works, and privacy.
What is the margin of error?
The margin of error is the half-width of a confidence interval. It tells you how far the sample estimate might be from the true population value, at your chosen confidence level. For a proportion, MOE = z × √(p(1−p)/n); for a mean, MOE = z × (s/√n).
How does the finite population correction work?
When your sample is a large fraction of the total population, the standard error is reduced by a factor of √((N−n)/(N−1)), where N is the population size and n is the sample size. This correction shrinks the margin of error because sampling more of the population gives more information about the whole.
What confidence levels are available?
The calculator uses z = 1.645 for 90%, z = 1.96 for 95%, and z = 2.576 for 99% confidence. Higher confidence levels give wider margins of error.
When should I use proportion mode vs mean mode?
Use proportion mode for yes/no or success/failure outcomes, such as survey responses or defect rates. Use mean mode for continuous measurements, such as height, weight, or test scores, where you have a sample standard deviation.
Does the calculator store my data?
No. All calculations run locally in your browser. CodeASystem does not upload or store the values you enter.