Confidence Interval Calculator
A confidence interval quantifies the uncertainty around an estimate of the population mean based on sample data. This calculator computes the margin of error and the lower and upper bounds of the confidence interval. Enter your sample mean, standard deviation, sample size, and desired confidence level (90%, 95%, or 99%). The calculator uses z-scores for normally distributed data and large samples. Confidence intervals are fundamental to inferential statistics, enabling you to make statements about population parameters based on sample data.
Confidence interval formula
MOE = z * (s / sqrt(n))
Lower Bound = mean - MOE
Upper Bound = mean + MOE
z-values: 90% = 1.645, 95% = 1.96, 99% = 2.576
Understanding the results
- Margin of Error (MOE): The ± value around your sample mean. Smaller MOE indicates more precision.
- Lower and Upper Bounds: The interval endpoints. Your estimate of the population mean lies within this range with the specified confidence level.
- Larger samples reduce the margin of error: MOE decreases with sqrt(n), so doubling the sample size reduces MOE by about 30%.
- Higher confidence level increases the interval width: A 99% CI is wider than a 95% CI because it must cover more area.
Confidence interval: frequently asked questions
What is a confidence interval?
A confidence interval is a range of values around a sample estimate that is likely to contain the true population parameter. A 95% confidence interval means that if you repeated your sampling many times, about 95% of the intervals would contain the true population mean.
How do you interpret a 95% confidence interval?
A 95% CI around your sample mean means: we are 95% confident that the true population mean lies within this interval. It does NOT mean there is a 95% probability the parameter is in the interval (once calculated, it either is or isn't).
What is the margin of error?
The margin of error (MOE) is half the width of the confidence interval. MOE = z * (s / sqrt(n)), where z is the critical value, s is the standard deviation, and n is the sample size. Larger samples reduce the MOE.
How do I choose the confidence level?
90% CI: wider interval, more precise sample size planning. 95% CI: standard choice in most fields. 99% CI: very conservative, requires larger samples. The choice depends on your risk tolerance and practical considerations.
When should I use population vs. sample standard deviation?
If you know the population standard deviation (rare), use it. If you only have the sample standard deviation, use it. For large samples (> 30), the difference is negligible.
Official sources
- NIST/SEMATECH e-Handbook of Statistical Methods: NIST Handbook.
- National Institute of Standards and Technology: NIST.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.