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.

ConfidenceTail area α/2Critical z*
0.11.2816
0.0751.4395
0.051.6449
0.0251.96
0.012.3263
0.0052.5758
0.00053.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

1

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.

2

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.

3

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.

4

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.

5

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.

6

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 &lt; 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. 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. 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. 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. 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. 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. 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

A confidence interval is a range of values, computed from a sample, that is likely to contain the true population mean. Rather than reporting a single best-guess number, a confidence interval reports a band wide enough to absorb the random sampling error inherent in working with a finite sample, and labels that band with a probability — typically 95% — that describes how often the procedure captures the true mean over many repeated samples.

It means that if you repeated the same sampling procedure many times, about 95% of the intervals you constructed would contain the true population mean. The 95% does not say there is a 95% probability that the specific interval you computed contains the mean — the true mean is fixed (we just don't know it), so the only thing that varies across resamples is the interval itself. The 95% is a long-run frequency of the method, not a probability for the single interval.

The margin of error is the critical Z value multiplied by the standard error of the mean: ME = z* · (s ÷ √n). The critical Z value is 1.960 for 95% confidence, 2.576 for 99%, and 1.645 for 90%. The standard error itself is the sample standard deviation divided by the square root of the sample size, so quadrupling n cuts the margin of error in half.

The standard error of the mean is the standard deviation of the sampling distribution of the sample mean — the typical distance from your computed sample mean to the true population mean if you re-ran the sampling procedure under the same conditions. It is computed as the sample standard deviation divided by the square root of the sample size, so larger samples shrink the standard error and tighten the confidence interval.

Because the standard error scales as 1 ÷ √n, the margin of error shrinks with the square root of the sample size. Doubling n shrinks the margin of error by about 29%; quadrupling n halves it; multiplying n by 100 makes it 10× smaller. This square-root scaling is why political polls with n = 1,000 already report margins of error of about ±3 percentage points, while doubling the budget for n = 2,000 only brings it down to about ±2.2 points.

95% is the standard research default and the right answer for almost any business or academic context. 99% is used in regulated settings like pharmaceutical trials and engineering tolerances where the cost of missing the true value is severe. 90% is common in early-stage research and exploratory work where a narrower interval is more useful than maximum certainty. Pick the level before you collect data — never after — to avoid result-shopping.

The Z-score here is the critical value z* — the number of standard errors on either side of the sample mean that capture the chosen confidence level under the standard normal curve. For a 95% interval that is 1.960; for 99% it is 2.576; for 90% it is 1.645. The Z-score reference table on this page lists all seven standard values along with their two-sided tail probabilities α/2 = (1 − confidence) / 2.

No. A confidence interval brackets the population mean — the average of the underlying distribution — not any individual future observation. The range that contains 95% of individual values is called a prediction interval and is much wider, because it has to absorb both the uncertainty in the mean and the variability of individual observations around that mean.

Holding the confidence level and the standard deviation fixed, increasing the sample size shrinks both the standard error and the margin of error, producing a narrower confidence interval. The relationship is ME ∝ 1 ÷ √n, so the gains are large at small n and diminish at large n. The Sample-size impact chart on this page lets you see the curve for your specific data.

Because the standard error of the mean is s ÷ √n. As n grows, the denominator grows with it, and the standard error shrinks. Intuitively, larger samples average out more of the random noise that pulls any one observation away from the true mean, so the sample mean ends up closer to the true mean and the band of plausible values around it gets tighter.

Use a t-distribution interval when the sample size is small (typically n < 30) and the population standard deviation σ is unknown. The t-interval is slightly wider than the Z-interval at small n because it accounts for the extra uncertainty in estimating the standard deviation from the same small sample. For n ≥ 30 the two intervals are nearly identical and the Z formula returned by this calculator is the right tool. For very small samples or skewed data, a bootstrap interval is often more robust.