Calculator Hero

Confidence Interval Calculator

Calculates the confidence interval, margin of error, and standard error for a population mean at 90%, 95%, or 99% confidence.

Last updated: June 11, 2026

Confidence Interval Calculator

z = 1.96

Enter sample mean, standard deviation, and sample size to calculate

How to Use the Confidence Interval Calculator

This confidence interval calculator finds the interval, margin of error, and standard error for any population mean — select your desired confidence level (90%, 95%, or 99%), then enter the sample mean (x̄), sample standard deviation (s), and sample size (n). The calculator instantly displays the confidence interval bounds, margin of error, and standard error. For a custom z-value — for example, for 99.9% confidence — select "Custom z" and enter the critical value directly.

The output includes a plain-language interpretation: "We are 95% confident the true population mean falls between [lower] and [upper]." For questions about the spread of your data before calculating a confidence interval, use our standard deviation calculator.

The Confidence Interval Formula

For a population mean, the confidence interval is built from the sample mean, the critical z-value for the chosen confidence level, and the standard error:

CI = x̄ ± z × (s / √n)

  • — sample mean
  • z — critical z-value: 1.645 (90%), 1.96 (95%), 2.576 (99%)
  • s — sample standard deviation
  • n — sample size
  • s / √n — standard error of the mean (SEM)

Worked Example

A researcher measures blood pressure in 50 patients: x̄ = 120 mmHg, s = 10 mmHg. Find the 95% confidence interval.

  1. Standard error: SE = 10 / √50 = 10 / 7.071 = 1.414
  2. Margin of error: E = 1.96 × 1.414 = 2.77
  3. Lower bound: 120 − 2.77 = 117.23
  4. Upper bound: 120 + 2.77 = 122.77
  5. 95% CI: [117.23, 122.77]

Interpretation: We are 95% confident the true mean blood pressure in the population lies between 117.23 and 122.77 mmHg.

AdvertisementResponsive Ad

Choosing the Right Confidence Level

The three most common confidence levels each represent a trade-off between precision and reliability:

  • 90% (z = 1.645): Narrower interval, less certain. Used when a tighter estimate is more useful than high reliability — for example, in internal business analyses where decisions can be adjusted quickly.
  • 95% (z = 1.96): The scientific and statistical default. Required by most academic journals, clinical trials, and public health studies. Balances precision and reliability.
  • 99% (z = 2.576): Wider interval, very reliable. Used when the cost of being wrong is high — for example, in pharmaceutical drug approvals, engineering safety margins, and financial stress tests.

Increasing confidence level always widens the interval. There is no free lunch: higher confidence means you must accept less precision (a wider range of plausible values) for the same sample size.

Standard Error vs. Standard Deviation

The confidence interval uses the standard error (SE = s / √n), not the standard deviation. These measure different things:

  • Standard deviation (s): Measures how much individual data points vary from the sample mean. It describes the spread of the data itself.
  • Standard error (SE = s / √n): Measures how much the sample mean would vary if you repeated the study with different samples. It describes the precision of the mean estimate, not the spread of the data.

Standard error is always smaller than standard deviation (because SE = s / √n and √n > 1 for n > 1). As n increases, SE decreases, which narrows the confidence interval. For more detail on standard error, see our standard error calculator.

AdvertisementResponsive Ad

Sample Size Planning

You can work backwards from a desired margin of error to determine the required sample size. Rearranging the formula:

n = (z × s / E)²

Where E is the desired margin of error. For example, to achieve a margin of error of ±2 with s = 10 at 95% confidence:

n = (1.96 × 10 / 2)² = 9.8² = 96.04 → round up to n = 97

Always round up (never down) when calculating required sample size. In survey research, an additional 10–20% buffer is common to account for non-response and data quality issues.

Real-World Uses of Confidence Intervals

Confidence intervals are ubiquitous in science, medicine, business, and public policy. In clinical trials, a drug is approved when its confidence interval for the treatment effect excludes zero — for example, “reduces systolic blood pressure by 4 to 8 mmHg (95% CI)” clearly shows a real benefit. Political polls report margins of error (typically ±3 percentage points for national samples of ~1,000) to convey polling uncertainty. In A/B testing for websites, engineers use CIs to decide whether a new feature lifts conversion rates enough to justify a rollout. Quality engineers use CIs on manufacturing measurements to confirm that products meet tolerance specifications. Virtually every peer-reviewed scientific result now reports a confidence interval alongside the p-value — because a CI conveys both statistical significance and the practical magnitude of the effect.

Sources & References

  1. Confidence IntervalsNIST/SEMATECH e-Handbook of Statistical Methods
  2. Confidence Intervals — Khan AcademyKhan Academy

Frequently Asked Questions

Related Calculators

Advertisement

320 × 50 — Mobile Anchor