Advertisement

📊 Confidence Interval Calculator

Compute confidence intervals for a mean or proportion with margin of error, z or t critical values, and interpretation.

Confidence Intervals — Range Estimates for Unknown Populations

BrainyCalculators editorial insight — unique to this tool

A 95% CI for a sample mean says: if we repeated sampling, ~95% of constructed intervals would contain the true population mean — not that there is a 95% chance the mean lies in this specific interval. Political pollsters report "48% ± 3%" (n ≈ 1,067); clinical trials publish CI around treatment effect size. Width shrinks with larger n and lower confidence level.

When to use this calculator

Use when you have a sample and need a range for the population parameter. To determine how large n should be before collecting data, use Sample Size.

Reference Value Context
95% CI z* 1.96 Large-sample mean
99% CI z* 2.576 Stricter
Poll MOE ±3% n ≈ 1,067 95% confidence
MOE ∝ 1/√n 4× n → half MOE Sample size leverage

Not what you need? For planning survey n before data collection, use Sample Size. For standardizing one observation, use Z-score.

Planning survey size before collecting data?

This page builds an interval from existing results. For required respondents upfront, use the Sample Size Calculator →

What is a Confidence Interval?

A confidence interval estimates a population parameter from sample data, reporting a range likely to contain the true value at a chosen confidence level.

Use this page after you have sample mean, SD, and n. To decide n before collecting data, use the Sample Size Calculator.

Z-scores standardize one observation; confidence intervals quantify uncertainty about a population parameter.

Confidence Interval Formulas

Mean CI (z-interval)
ME = z × σ / √n
CI = [ x̄ − ME, x̄ + ME ]
Proportion CI
SE = √( p̂(1 − p̂) / n )
ME = z × SE
CI = [ p̂ − ME, p̂ + ME ]

The z-value depends on your chosen confidence level: 90% → 1.645, 95% → 1.96, 99% → 2.576. A wider interval gives more confidence but less precision.

How to Calculate a Confidence Interval

  1. 1
    Choose the Type
    Select "Mean" if you are estimating a population mean using a known or sample standard deviation. Select "Proportion" for a success rate or percentage.
  2. 2
    Enter Your Sample Stats
    Provide your sample mean (or proportion), standard deviation, and sample size. For proportions you can type "42/200" and the calculator will parse it.
  3. 3
    Choose Confidence Level
    Common choices are 95% (science/business) and 99% (medical/safety). Higher confidence widens the interval.
  4. 4
    Read the Interval
    The result shows your lower bound, upper bound, margin of error, and a plain-English interpretation.

Worked Example

A sample of n = 40 students has a mean test score of x̄ = 72 with a standard deviation of σ = 10. Find the 95% CI.

z = 1.96 (for 95% CI)
ME = 1.96 × 10 / √40 = 1.96 × 1.581 = 3.10
Lower = 72 − 3.10 = 68.90
Upper = 72 + 3.10 = 75.10
We are 95% confident the true mean lies between 68.90 and 75.10.

How the Confidence Interval Calculator Works

Formula, assumptions, and calculation steps for this statistics tool.

Methodology

Statistics calculators organize sample data, apply the selected descriptive or inferential formula, and report the statistic with interpretation.

Calculation Steps

  1. Enter raw values or summary statistics.
  2. Clean separators and count the sample size.
  3. Apply the relevant statistic, probability, or confidence formula.
  4. Display the result with context such as degrees of freedom, percentile, or strength.

Assumptions and Limits

  • Samples should be representative of the population being studied.
  • Normality or independence assumptions apply only where the selected method requires them.
  • Rounded results may differ slightly from spreadsheet software.

Frequently Asked Questions

A confidence interval is a range of values that is likely to contain the true population parameter (mean or proportion) with a specified level of confidence. For example, a 95% CI means that if you repeated the study 100 times, about 95 of the resulting intervals would contain the true value.

It means the procedure used to construct the interval captures the true parameter 95% of the time. It does NOT mean there is a 95% probability the true value is inside this specific interval — the true value is either in or out, but you cannot know which without the full population.

A confidence interval estimates where the population mean lies. A prediction interval estimates where a single future observation will fall. Prediction intervals are always wider than confidence intervals because they account for individual variability in addition to estimation uncertainty.

Increase your sample size n (ME shrinks as √n grows), decrease the confidence level (e.g. 90% instead of 99%), or reduce variability in your measurements. Quadrupling the sample size cuts the margin of error in half.

Real-World Applications

🔬
Clinical Trials & Medical Research
Drug efficacy studies report 95% CIs for the treatment effect — e.g. "the drug reduced systolic blood pressure by 8 mmHg (95% CI: 5–11 mmHg)." A CI that excludes zero confirms statistical significance; one including zero does not.
📊
Election Polling
Political polls report margins of error that are directly the half-width of a 95% confidence interval for a proportion. "Candidate leads 52% ± 3%" means the 95% CI is [49%, 55%] — the race is within the margin of error.
🏭
Quality Control & Manufacturing
Manufacturers use CIs to determine whether a production process is consistently producing parts within specification tolerances — sampling finished goods and computing CIs for dimensions, weight, or tensile strength.
💹
Financial Risk Modelling
Value-at-Risk (VaR) and expected shortfall in finance are closely related to confidence intervals on portfolio returns — expressing the range of losses that will not be exceeded with 95% or 99% confidence over a given horizon.
🛒
A/B Testing & Conversion Optimisation
CRO platforms report CI-based significance intervals for conversion rate differences — ensuring that an observed uplift of 0.3% in a test group is not within the confidence interval that would make it statistically indistinguishable from zero.
🌍
Epidemiology & Public Health
Epidemiologists report odds ratios and relative risks with 95% CIs for disease exposure associations — e.g. "smoking increases lung cancer risk OR 15.0 (95% CI: 10.2–22.1)" — where a CI excluding 1.0 confirms statistical significance.

Common Mistakes

1
Saying "95% probability the true value is in this interval"
The true population parameter is fixed — it is either inside or outside any given computed interval. The 95% refers to the long-run frequency: 95% of all intervals constructed by this procedure would contain the true value. The correct statement is "we are 95% confident the true mean lies between X and Y."
2
Not Checking Normality Assumptions for Small Samples
The z-interval formula assumes the sampling distribution of the mean is approximately normal. For n ≥ 30, the Central Limit Theorem justifies this. For n < 30, either verify the underlying population is approximately normal, or use a t-distribution instead of z.
3
Using Population σ When Only Sample s Is Known
The z-interval uses the known population standard deviation σ. In practice, σ is almost never known — you have sample s instead. For small samples, this matters significantly: substitute z with the t-value for (n−1) degrees of freedom. For n > 30, t ≈ z and the distinction is minor.
4
Conflating Confidence Level with Statistical Significance
A 95% CI and a two-sided hypothesis test at α = 0.05 are mathematically equivalent — if the CI excludes the null hypothesis value, the test rejects at α = 0.05. But a 99% CI corresponds to α = 0.01. Mixing confidence levels and significance levels leads to inconsistent interpretations.
5
Ignoring the Margin of Error When Comparing Groups
Overlapping confidence intervals do NOT necessarily indicate non-significance — two CIs can overlap and the difference can still be statistically significant. The correct test is whether the CI for the difference between groups excludes zero, not whether individual CIs overlap.

Confidence Level to z-value Reference

Confidence Level z-value α (two-sided) Typical Use
80% 1.282 0.20 Exploratory / pilot studies
90% 1.645 0.10 Survey research, quality control
95% 1.960 0.05 Standard in most scientific literature
99% 2.576 0.01 Medical / safety applications
99.9% 3.291 0.001 High-stakes regulatory decisions

References

  1. Neyman, J. Outline of a Theory of Statistical Estimation Based on the Classical Theory of Probability. Philosophical Transactions, 1937.
  2. Cumming, G. Understanding the New Statistics: Effect Sizes, Confidence Intervals, and Meta-Analysis. Routledge, 2012.
  3. Agresti, A. & Coull, B. A. Approximate Is Better than "Exact" for Interval Estimation of Binomial Proportions. The American Statistician, 1998.
  4. Morey, R. D. et al. The Fallacy of Placing Confidence in Confidence Intervals. Psychonomic Bulletin & Review, 2016.
  5. National Institute of Standards and Technology. NIST/SEMATECH e-Handbook of Statistical Methods. itl.nist.gov.