Math calculator

Free confidence interval calculator

Calculate confidence intervals for a population mean or proportion — enter your sample data to see the interval and margin of error, updated live, as you type.

InputsLive
Confidence level
Mean (x̄)
Standard deviation (σ)
Sample size (n)
Number of observations in the sample.
Result
Confidence interval
[94.63 , 105.37]
Margin of error: ±5.37
Mean100
Std deviation15
Sample size (n)30
Margin of error±5.3677
Lower bound94.6323
Upper bound105.3677

CI for a mean. Uses z-scores: 1.645/1.96/2.576. Assumes normal distribution.

Results are estimates. Consult a professional.

How it's calculated

How the confidence interval calculator works

A confidence interval (CI) gives a range of plausible values for an unknown population parameter based on sample data. A 95% CI means that if you repeated the study many times, 95% of the intervals you construct would contain the true population value. This calculator computes CI for a population mean using a known or estimated standard deviation.

CI = x̄ ± z* ×÷ √n)
Margin of error (E) = z* ×÷ √n)
Width = 2 × E
where x̄ = sample mean, σ = std deviation, n = sample size, z* = critical z-value
NIST/SEMATECH e-Handbook — Confidence Intervals
Example

Worked example: estimating average test score

Example: mean 50, σ = 10, n = 100

A school samples 100 students. The sample mean score is 50 with a known standard deviation of 10. Construct a 95% confidence interval for the true mean score.

Standard error = σ ÷ √n = 10 ÷ √100 = 10 ÷ 10 = 1
Margin of error = 1.96 × 1 = 1.96
95% CI = 50 ± 1.96 = (48.04, 51.96)
(48.04, 51.96)
We are 95% confident the true population mean score lies between 48.04 and 51.96. Increasing sample size shrinks this interval.
Quick reference

Critical z-values by confidence level

The critical z-value (z*) is the multiplier that sets how wide your interval is. Higher confidence requires a wider interval, captured by a larger z*.

Confidence levelz* (critical value)Interpretation
80%1.2821 in 5 intervals miss the true value
90%1.6451 in 10 intervals miss the true value
95%1.9601 in 20 intervals miss the true value
99%2.5761 in 100 intervals miss the true value
99.9%3.2911 in 1000 intervals miss the true value

Source: Standard normal distribution. Use t-critical values instead when σ is unknown and n < 30.

Practical tips

Tips for working with confidence intervals

Confidence intervals are more informative than a single point estimate because they communicate both the value and the uncertainty around it.

  • Increase n to shrink the interval — the margin of error shrinks with √n; quadrupling your sample size halves the width of the CI.
  • Higher confidence = wider interval — moving from 95% to 99% confidence makes the interval wider; there is a trade-off between certainty and precision.
  • Non-overlapping CIs suggest significance — if two confidence intervals for independent groups do not overlap, the difference is almost certainly statistically significant.
  • Use t-distribution for small samples — when n < 30 and σ is unknown, use the t critical value at n−1 degrees of freedom rather than z = 1.96.
  • CI is not a probability about a fixed parameter — once constructed, the interval either contains the true value or it doesn't; the 95% refers to the long-run procedure, not this specific interval.
Accuracy & limits

Accuracy and limitations

This calculator assumes the sample mean is approximately normally distributed, which holds when n ≥ 30 by the central limit theorem, or when the population is itself normal. The formula also requires that observations are independent and drawn at random from the population. For proportions, use the Wilson score interval rather than the normal approximation when p is near 0 or 1, or n is small. Cluster sampling, stratified designs, and weighted surveys require modified formulas not covered here.

Glossary

Key terms

A range of values estimated from sample data that is likely to contain the true population parameter, with a stated level of confidence.
The percentage of CIs (from repeated sampling) that would contain the true value. Common choices are 90%, 95%, and 99%.
Half the width of the CI — z* × (σ ÷ √n). Represents the maximum expected error in the estimate.
The standard deviation of the sampling distribution of the mean — σ ÷ √n. Measures how much the sample mean varies across repeated samples.
The z-score corresponding to the desired confidence level. For 95% CI, z* = 1.96.
A single value used to estimate the population parameter — typically the sample mean x̄.
About

About this calculator

Part of our math calculators suite — explore all calculators.

Questions

Frequently asked questions about the free confidence interval calculator

A confidence interval calculator is a free online tool that helps you calculate confidence interval for a sample mean. Standard error × z-critical. It runs entirely in your browser with instant results and no sign-up.
JavaScript double-precision floating-point — accurate to about 15-17 significant digits. For arbitrary precision, use the Big Number calculator.
The statistics calculator computes population variance (divides by n). For sample variance, multiply variance by n/(n-1).

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.