Confidence Interval Calculator
Bracket the true population mean with a margin of error from your sample size, mean, and standard deviation.
Sample inputs
Z-score reference (two-sided)
The critical Z value is the number of standard errors covered by the interval. Tap any row to load that confidence level into the calculator.
| Confidence | Tail area α/2 | Critical z* |
|---|---|---|
| 0.1 | 1.2816 | |
| 0.075 | 1.4395 | |
| 0.05 | 1.6449 | |
| 0.025 | 1.96 | |
| 0.01 | 2.3263 | |
| 0.005 | 2.5758 | |
| 0.0005 | 3.2905 |
The three formulas behind the interval
Standard error
SE = s ÷ √n
Standard deviation of the sampling distribution of the mean. Halves when n quadruples.
Margin of error
ME = z* · SE
Half-width of the interval — the critical Z multiplied by the standard error.
Confidence interval
CI = x̄ ± ME
The sample mean bracketed by ± the margin of error. Wider intervals mean higher confidence.
What each input means
Sample size (n)
The number of observations in your sample. Larger samples produce narrower intervals — the standard error shrinks with the square root of n.
Sample mean (x̄)
The arithmetic average of your sample values. This is the centre of the confidence interval — your best single estimate of the population mean.
Standard deviation (s)
How spread out your sample values are around the mean. Use the population σ if you somehow know it; otherwise use the sample standard deviation s.
Confidence level
The long-run percentage of repeated samples whose intervals would capture the true mean. 95% is the research default — higher levels are wider, lower levels are narrower.
What Is a Confidence Interval?
A confidence interval is a range of values, calculated from a sample, that is likely to contain the true population mean. Where the sample mean by itself is a single best guess, a confidence interval acknowledges that the guess has uncertainty and reports a band wide enough to absorb that uncertainty at a chosen probability level. A 95% interval, for example, means that if you repeated the same sampling procedure many times, about 95% of the intervals you constructed would contain the true population mean.
This calculator constructs the Z-based confidence interval for the population mean from four numbers — sample size n, sample mean x̄, standard deviation s, and a chosen confidence level — and returns the interval, the margin of error, the standard error, the critical Z, the lower and upper bound, and a step-by-step derivation. It pairs naturally with the sample size calculator, the standard deviation calculator, and the z-score calculator.
How a Confidence Interval Is Built
Pick a confidence level
Decide how often you want your method to capture the true mean in the long run. 95% is the research default; 99% is used in regulated settings; 90% is common in early-stage research where a narrower interval is more useful than maximum certainty.
Compute the standard error
Divide the standard deviation by the square root of the sample size. The standard error is the typical distance from the sample mean to the true mean if you re-ran the sampling procedure under the same conditions.
Look up the critical Z
The critical Z value is the number of standard errors that capture the chosen confidence level under the standard normal curve. For 95% it is 1.960; for 99% it is 2.576; the table on the calculator page lists all seven standard values.
Add the margin of error
Multiply the critical Z by the standard error to get the margin of error, then add and subtract it from the sample mean. The interval x̄ ± ME bounds the population mean at the chosen confidence.
6 Ways to Use This Confidence Interval Calculator
Bracket a survey mean
Drop your survey average and standard deviation in to report the result as a 95% confidence interval rather than a point estimate.
Plan a clinical study
See how the interval narrows when you increase n; choose the smallest sample size that still meets your target margin of error.
Quality control
Confirm that a process mean falls inside engineering tolerances by comparing the entire interval — not just the point estimate — to the spec limits.
A/B test reporting
Report each variant's lift as a CI so stakeholders can see whether the true effect could be zero — much more honest than a bare p-value.
Teach inference
Walk students through the step-by-step derivation, then change the confidence level and watch the bound numbers move with no other input.
Sanity-check published claims
Re-derive an interval from a paper's reported mean, SD, and n. If the published interval doesn't match the formula, the methodology deserves a closer look.
Best Practices for Confidence Intervals
Always report the confidence interval alongside the point estimate. A sample mean of 42.8 communicates far less than "42.8 with a 95% CI of 41.4 to 44.3"; the latter tells the reader the precision of the estimate and the units it lives in. Pick the confidence level before you collect the data and stick with it; flipping from 95% to 90% after the fact in order to claim a narrower band is a form of result-shopping that erodes trust in your conclusions.
For small samples (n < 30) the Z-based interval is an approximation; the strictly correct interval uses the Student t-distribution with n − 1 degrees of freedom, which produces a slightly wider band that accounts for the extra uncertainty in estimating the standard deviation. For survey-sized samples (n ≥ 30) the Z and t intervals are nearly indistinguishable and the Z formula returned by this calculator is the right tool.
Use the comparison table to communicate trade-offs. Telling a stakeholder that a 95% interval is [41.4, 44.3] but the 99% interval is [40.9, 44.7] makes the cost of additional confidence explicit. In most business and research settings, 95% strikes the standard balance between narrow and trustworthy.
Why Confidence Intervals Matter
Business decisions
Quoting a single number hides the uncertainty in any estimate built from a sample. A confidence interval surfaces that uncertainty so executives weigh evidence rather than chasing noisy point estimates.
Clinical research
Regulators expect every estimated effect — drug efficacy, side-effect rate, lab measurement — to be reported with a confidence interval. Without the band, a reader cannot judge whether the effect could plausibly be zero.
Data science & ML
Bootstrap and analytic confidence intervals quantify the variability of any model metric — AUC, RMSE, conversion lift. Production rollouts increasingly require a CI rather than a point estimate.
Education & polling
Election polls and customer satisfaction surveys live or die on their margin of error. Reporting only the point estimate misrepresents how much the result could shift from one sample to the next.
Where Confidence Intervals Get Tricky
Small samples
With n < 30 the standard deviation itself is a noisy estimate. Switch to a t-distribution interval, which is slightly wider, to keep the stated coverage probability honest.
Skewed distributions
The Z-interval assumes the sample mean is approximately normal. For badly skewed data with small n, a bootstrap percentile interval is more reliable than the analytic formula.
Non-random sampling
A 95% interval only means anything if the sample was drawn from the target population. Sampling bias (selection effects, opt-in surveys, panel drop-off) can leave the true mean entirely outside the reported interval — at any sample size.
Proportion vs mean
The formula on this page is for the population mean. Confidence intervals for proportions use a different standard error (√[p(1 − p)/n]) and a different recipe — use the sample-size calculator's proportion tools instead.
The Core Confidence Interval Formulas
Standard error of mean
SE = s ÷ √n
Standard deviation of the sampling distribution of the mean.
Margin of error
ME = z* · SE
Half the width of the interval, in the same units as the data.
Confidence interval
CI = x̄ ± z* · (s ÷ √n)
Bound the population mean at the chosen confidence level.
Lower bound
Lower = x̄ − ME
Bottom of the interval — values below this are unlikely under repeated sampling.
Upper bound
Upper = x̄ + ME
Top of the interval — values above this are unlikely under repeated sampling.
Interval width
Width = 2 · ME = Upper − Lower
The full span of plausible population means at the chosen confidence.
Relative margin
ME / |x̄| × 100%
Margin of error expressed as a percentage of the sample mean.
Tail probability
α = 1 − confidence level
Total probability mass in the two tails outside the interval.
Sample-size scaling
ME ∝ 1 / √n
Quadruple n to halve the margin of error at fixed confidence.
Common Confidence Interval Mistakes
- 1
Confusing confidence with probability
A 95% interval does not say there is a 95% chance the true mean is in this specific interval. The true mean is fixed (we just don't know it); the 95% applies to the long-run frequency with which the method captures the true mean across many resampled intervals.
- 2
Interpreting it as a prediction range
A confidence interval brackets the population mean — not the next individual observation. The range that contains 95% of individual values is a prediction interval and is much wider.
- 3
Forgetting bias
A 95% interval assumes random sampling from the target population. Self-selected respondents, opt-in panels, and non-response can leave the true mean outside the interval at any sample size — additional data will not fix the bias.
- 4
Reporting too many digits
If the margin of error is ±1.45, reporting the bounds as 41.347 and 44.247 is false precision. Round bounds to one more decimal place than the margin of error, no further.
- 5
Using s when σ is known
If the population standard deviation σ is truly known (which is rare), use it in place of the sample s — the interval is then exact rather than approximate. Most real-world studies use s and rely on the Z approximation for n ≥ 30 or switch to t for smaller samples.
- 6
Cherry-picking the confidence level
Choosing 90% confidence after the calculation in order to obtain a narrower interval is a form of result-shopping. Decide the confidence level before you collect data and report it transparently.
Real-Life Uses of Confidence Intervals
Election polling
Every reputable poll publishes a margin of error — that is the half-width of a 95% confidence interval. A candidate leading by less than the margin of error is statistically within the noise band, not provably ahead.
Manufacturing QC
Process means are monitored with statistical control charts that draw confidence intervals around the expected mean. Sample means landing outside the interval flag the line for investigation.
Academic research
Journal style guides increasingly require effect sizes with 95% confidence intervals alongside (or instead of) p-values. The interval communicates both the size and the precision of the finding in one number.
Product analytics
A/B test winners are reported with confidence intervals around the lift. If the interval crosses zero the experiment cannot rule out no effect, regardless of how impressive the point estimate looks.
Methodology you can verify
Every interval on this page is computed live from your inputs using the standard formulas — SE = s ÷ √n, ME = z* · SE, CI = x̄ ± ME — with critical Z values from the standard normal distribution. Unusual confidence percents are derived through the Wichura AS241 inverse-normal algorithm. Read more on the methodology and editorial policy pages.
Frequently Asked Questions
Related Statistics Calculators
Pair the confidence interval calculator with related statistics and probability tools.
- Sample Size CalculatorRequired sample size, margin of error, confidence interval, confidence level, and finite population correction — five survey tools with charts.
- Z-Score CalculatorZ-score, percentile rank, tail probabilities, Z ↔ probability conversion, and probability between any two Z-scores with bell-curve visualisation.
- Mean Median Mode Range CalculatorFull descriptive statistics — mean, median, mode, range, quartiles, variance, standard deviation, percentiles, skewness, outliers — with charts and step-by-step working.
- Statistics CalculatorMean, median, mode, SD, quartiles, percentiles, outliers, skewness, kurtosis, CIs, and Z-score probabilities — six analysis modes with histogram and box plot.
- Probability CalculatorTwo-event probabilities, unions, intersections, complements, normal distribution, confidence intervals, and step-by-step solutions across five integrated tools.