Compute the confidence interval for a sample mean — with standard error, margin of error, and lower / upper bounds, for any confidence level.
Results update live as you type.
Confidence interval
Standard error
2.739
SE = σ / √n
Critical value
1.960
z* at 95 %
Margin of error
5.37
z* × SE
Width
10.74
upper − lower
| Confidence | z* | Typical use |
|---|---|---|
| 80 % | 1.282 | Exploratory work |
| 90 % | 1.645 | Quick reporting |
| 95 % | 1.960 | Scientific default |
| 99 % | 2.576 | Higher stakes |
| 99.9 % | 3.291 | Critical decisions |
The Method
The confidence interval for a mean is built around the sample mean x̄ by adding and subtracting a margin of error. The margin equals the critical value (z* for the chosen confidence level) times the standard error of the mean — the standard deviation of the sampling distribution. When the population standard deviation σ is unknown and the sample is small, use Student's t distribution instead of the normal z.
Working for the current input
About This Tool
A confidence interval calculator turns a sample mean, a sample standard deviation, and a sample size into the range of plausible values for the true population mean — at the confidence level you pick (typically 90 %, 95 % or 99 %). The interval is symmetric around x̄ and its half-width is called the margin of error.
Confidence intervals are the standard way to report uncertainty in scientific results. Instead of just publishing a single point estimate, a CI tells the reader how precise that estimate is. A narrow interval means your sample is informative; a wide interval means more data is needed before drawing strong conclusions.
This calculator uses the normal (z) approximation, which is exact when the population standard deviation σ is known and very accurate when the sample size is reasonably large (n ≥ 30) by the Central Limit Theorem. For small samples with unknown σ, statisticians substitute Student's t distribution and use t* in place of z*. The formula structure is identical: CI = x̄ ± critical-value × SE.
Use this free confidence interval calculator for coursework, lab reports, A/B-test analysis, survey reporting, or any time you need to attach an uncertainty range to a sample mean. All calculation runs in your browser — no sign-up, no tracking.
Any Confidence Level
80 % through 99.9 % — pick the level your study or paper requires.
Margin of Error
Standard error, critical value, margin, and interval width — all in one view.
Visual Interval
Normal-curve graph with the interval shaded — instant intuition.
Step-by-Step Working
See every term substituted into the formula, just as you would write it.
100% Free & Private
No account, no tracking — every calculation runs locally in your browser.
Reference Table
Common z* critical values for every standard confidence level.
Four inputs, a clean visual, and a publication-ready interval.
Type the average of your sample data into the Sample mean field. This is the point estimate the interval will be built around.
Provide the population σ if known, otherwise the sample s. The standard deviation drives the spread of the sampling distribution.
Type the sample size n or drag the slider. Larger samples shrink the standard error and narrow the interval — precision scales with √n.
Choose 95 % for a scientific default, 99 % for higher-stakes work, or 90 % for quick exploratory reporting.
The summary card shows the lower – upper bound, with standard error, critical value, margin of error and width broken out separately.
The bell-curve graph highlights the shaded 1 − α region. The formula card shows every substitution, ready to paste into a lab report.
Everything you need to know about confidence intervals, margin of error, and how to interpret the result.
A confidence interval (CI) is a range of values, calculated from sample data, that is likely to contain the true population parameter (here, the mean). A 95 % CI means that if you repeated the sampling process many times and built a new interval each time, about 95 % of those intervals would contain the true mean. Note that for any one interval the true value is either inside or outside — the 95 % refers to the procedure, not the single result.
The margin of error equals the critical value times the standard error of the mean: E = z* × σ/√n. At 95 % confidence z* ≈ 1.96. The interval then runs from x̄ − E to x̄ + E. To halve the margin, you must quadruple the sample size — precision improves with √n.
Use the z (normal) distribution when the population standard deviation σ is known, or when the sample size is large (typically n ≥ 30) so that the Central Limit Theorem applies. Use the t distribution when σ is unknown and the sample size is small — t* is slightly larger than z*, which widens the interval to account for the extra uncertainty from estimating σ from the sample.
The standard set in scientific reporting is 90 % (z ≈ 1.645), 95 % (z ≈ 1.96), and 99 % (z ≈ 2.576). 95 % is by far the most common default in academic publishing. Higher confidence levels widen the interval; you cannot get more confidence and a narrower range from the same data — only by collecting more data.
The standard error shrinks like 1/√n. Doubling the sample size reduces the margin by about 1 − 1/√2 ≈ 29 %; quadrupling the sample halves the margin. This is why surveys with thousands of respondents have small margins, while small lab samples often produce uselessly wide intervals.
No — and this is the most common pitfall. In frequentist statistics, the true mean is a fixed (unknown) constant. It is not correct to say "there is a 95 % probability the true mean is in this interval." The right statement is "95 % of intervals built by this procedure will contain the true mean." If you want a literal probability statement about the parameter, that is the Bayesian credible interval, which is mathematically similar but interpreted differently.
A wide CI means the estimate is imprecise — usually because the sample is small, the variability (σ) is large, or both. If you need a more precise estimate, the only options are to collect more data, reduce measurement variability, or accept a lower confidence level.
Yes — for example a CI on a proportion can dip below 0 or above 1, or a CI on a count can go negative when σ is large relative to x̄. This happens because the z-based formula assumes the sampling distribution is symmetric and unbounded. When this happens, prefer a method designed for the data type (Wilson interval for proportions, log transforms for ratios, bootstrap for skewed data).
A confidence interval is for the mean (a parameter). A prediction interval is for a future single observation. Prediction intervals are always wider because they include both the uncertainty about the mean and the natural variability of individual observations.
For a proportion p̂, the standard error becomes √(p̂(1−p̂)/n) and the interval is p̂ ± z* × SE. This is the Wald interval. For small samples or proportions near 0 or 1, prefer the Wilson or Clopper–Pearson intervals — they have better coverage properties.