BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Free Confidence Interval Calculator

Calculate confidence intervals for means and proportions instantly. Choose between Z-interval (known σ) and T-interval (unknown σ), enter your data, and get the confidence interval bounds, margin of error, critical value, standard error, and a full step-by-step solution — all in your browser with no signup required.

Confidence Interval Calculator

Formula CI = x̄ ± z* × (σ / √n) Use when σ is known
Formula CI = x̄ ± t* × (s / √n) Use when σ is unknown
Formula CI = p̂ ± z* × √(p̂(1−p̂) / n) Use for Polls, surveys, rates
Number of successes in sample

Run a calculation in any of the three tabs first, then return here to see the full step-by-step solution.

No data yet — enter values in the Mean (Z), Mean (T), or Proportion tab first.

What Is a Confidence Interval?

A confidence interval is a range of values, calculated from sample data, that is likely to contain the true value of an unknown population parameter at a specified level of certainty. For example, a 95% confidence interval means that if the same study were repeated 100 times under identical conditions, approximately 95 of the resulting intervals would capture the true population value. The interval is defined by a lower bound and an upper bound, separated by the margin of error.

Confidence intervals appear throughout statistics because they communicate both the estimated value and the precision of that estimate in a single, compact expression. A narrow interval signals a precise estimate; a wide interval signals uncertainty. According to the NIST Engineering Statistics Handbook, confidence intervals are the standard method for conveying the uncertainty of a measured or estimated quantity in applied science and engineering.

Confidence Interval Formulas

There are three core confidence interval formulas — one for a mean when σ is known (Z-interval), one for a mean when σ is unknown (T-interval), and one for a proportion (Z-interval). The choice depends on whether you know the population standard deviation and whether your data is continuous or binary.

Mean CI — Z-Interval (Known σ)

CI = x̄ ± z* × (σ / √n) Where: x̄ = sample mean z* = critical value (e.g. 1.96 for 95%) σ = population standard deviation n = sample size

Mean CI — T-Interval (Unknown σ)

CI = x̄ ± t* × (s / √n) Where: t* = critical value from t-distribution with df = n − 1 s = sample standard deviation n = sample size

Proportion CI — Z-Interval

CI = p̂ ± z* × √(p̂(1−p̂) / n) Where: p̂ = sample proportion (x / n) z* = critical value (e.g. 1.96 for 95%) n = sample size

Standard Error Formulas

Mean (known σ): SE = σ / √n Mean (unknown σ): SE = s / √n Proportion: SE = √(p̂(1−p̂)/n) Margin of Error: ME = z* × SE  (Z-interval) ME = t* × SE  (T-interval)

In plain English: the confidence interval is your sample estimate plus or minus the margin of error. A larger sample or a smaller standard deviation produces a narrower interval (a more precise estimate). A higher confidence level produces a wider interval because you need to cast a wider net to be more certain the true value is captured. Penn State’s STAT 415 Introduction to Mathematical Statistics treats these formulas as the foundational tools of interval estimation.

Common Confidence Levels and Critical Values

The most commonly used confidence level is 95%, corresponding to a critical z-value of 1.96. Higher confidence levels produce wider intervals because they require a larger critical value to capture the true parameter with greater certainty.

Table: Confidence Levels, Alpha, and Critical Values (Z and T at df=30)

Confidence LevelAlpha (α)z* Critical Valuet* (df=30)Common Use
80%0.201.2821.310Exploratory research
85%0.151.4401.476Business analytics
90%0.101.6451.697Social sciences, surveys
95%0.051.9602.042Standard across most fields
99%0.012.5762.750Clinical trials, safety testing
99.9%0.0013.2913.385High-stakes aerospace, pharma
90%
z* = 1.645
α = 0.10
95%
z* = 1.960
α = 0.05 (standard)
99%
z* = 2.576
α = 0.01

How to Calculate a Confidence Interval — Step by Step

To calculate a 95% confidence interval for a mean: collect your sample, find the mean and standard deviation, compute the standard error, multiply it by the critical value to get the margin of error, then add and subtract the margin of error from the sample mean. Here is the complete method with a worked example.

1
Collect your sample data

Determine the sample size (n), sample mean (x̄), and standard deviation (s or σ). For example: a researcher measures resting heart rate in n = 36 adults; x̄ = 72 bpm; population SD σ = 12 bpm (known).

2
Choose your confidence level and find the critical value

Select 95% confidence. The corresponding critical z-value is z* = 1.96. If using a t-interval, look up t* with df = n−1 in the t-distribution table.

3
Calculate the standard error (SE)

SE = σ / √n = 12 / √36 = 12 / 6 = 2. The standard error measures the precision of the sample mean as an estimate of the true population mean.

4
Calculate the margin of error (ME)

ME = z* × SE = 1.96 × 2 = 3.92. The margin of error is half the width of the confidence interval.

5
Build the confidence interval

Lower bound = x̄ − ME = 72 − 3.92 = 68.08. Upper bound = x̄ + ME = 72 + 3.92 = 75.92. So CI = (68.08, 75.92).

6
Interpret the result

State: “We are 95% confident the true mean resting heart rate in this population lies between 68.08 bpm and 75.92 bpm.” Note: this does not mean there is a 95% probability the true value is in this specific interval — see the FAQ below for the correct interpretation.

Result: x̄ = 72 bpm, SE = 2, ME = 3.92, CI = (68.08, 75.92) at 95% confidence. You can verify this result using the Z-interval tab of the calculator above.

🧠 The CLEAR Framework: Understanding Confidence Intervals Without Heavy Math

The CLEAR Framework is a structured memory device for the five elements of any confidence interval. It is designed for students, journalists, and non-statisticians who need to use or communicate confidence intervals correctly.

C
Confidence Level
How sure you want to be. 95% is the standard. A higher confidence level means a wider interval.
L
Lower Bound
The smallest plausible value for the true population parameter. Everything below this is outside your estimate.
E
Estimation
Your best point estimate — the sample mean or sample proportion. The interval is centered on this value.
A
Accuracy
The margin of error determines how accurate the interval is. A narrower interval = a more accurate estimate.
R
Range
The full interval from lower to upper bound — where the true value most likely lives.
Intuitive Analogy: Think of a confidence interval like a weather forecast range. “The high temperature tomorrow will be between 72°F and 78°F” — the forecaster is not giving you a single answer; they are giving you an honest range based on available data. The confidence level is how often this type of forecast proves correct historically.

📊 Worked Case Studies

Case Study 1 — Election Polling

Scenario: A political poll surveys 1,000 voters. 52% support Candidate A. Calculate the 95% confidence interval for the true proportion.
Given values

p̂ = 0.52, n = 1,000, z* = 1.96

Standard error

SE = √(0.52 × 0.48 / 1000) = √(0.0002496) = 0.01580

Margin of error

ME = 1.96 × 0.01580 = 0.031 (3.1 percentage points)

Confidence interval

CI = (48.9%, 55.1%)

Interpretation: The poll shows Candidate A leads, but the 3.1-percentage-point margin of error means the race is within statistical reach of either candidate. This is how polling organizations report results.

Case Study 2 — Clinical Drug Trial

Scenario: A clinical trial tests a new blood pressure drug on 64 patients. Mean reduction = 8.5 mmHg, sample SD s = 6.4 mmHg. Calculate a 99% CI using a t-interval.
Degrees of freedom

df = n − 1 = 64 − 1 = 63

Critical t* value

t* at 99% with df = 63 ≈ 2.656

Standard error

SE = 6.4 / √64 = 6.4 / 8 = 0.80

Margin of error & interval

ME = 2.656 × 0.80 = 2.12  |  CI = (6.38, 10.62) mmHg

Interpretation: Researchers are 99% confident the drug reduces blood pressure by between 6.38 and 10.62 mmHg on average. This type of t-interval is standard in clinical research methodology per the WHO guidelines on reference intervals.

Case Study 3 — Website A/B Testing (Conversion Rates)

Scenario: Version A converts 180 of 600 visitors (30%). Version B converts 210 of 600 (35%). Calculate 95% CIs for each.

Version A: p̂ = 0.30, SE = √(0.30 × 0.70 / 600) = 0.01871, ME = 1.96 × 0.01871 = 0.0367. CI = (26.3%, 33.7%).

Version B: p̂ = 0.35, SE = √(0.35 × 0.65 / 600) = 0.01948, ME = 1.96 × 0.01948 = 0.0382. CI = (31.2%, 38.8%).

The intervals barely overlap, suggesting Version B is likely the better converter. However, since the intervals do overlap slightly, collecting more data would confirm statistical significance. This is standard practice in digital experimentation.

Case Study 4 — Manufacturing Quality Control

Scenario: A factory tests 49 cereal boxes. Mean weight = 500.2g, s = 3.5g. Calculate a 95% CI using a t-interval.

SE = 3.5 / √49 = 3.5 / 7 = 0.5  |  t* (df=48) ≈ 2.011  |  ME = 2.011 × 0.5 = 1.01  |  CI = (499.19g, 501.21g).

Interpretation: Quality control can confirm with 95% confidence that the true mean box weight falls between 499.19g and 501.21g — within the 500g specification. This application of confidence intervals is central to Six Sigma quality methodology.

📊 How Sample Size Affects Confidence Interval Width — Benchmark Dataset

One of the most practically important relationships in statistics is how sample size controls the width of a confidence interval. The table below shows how CI width at 90%, 95%, and 99% changes as sample size increases, holding σ = 10 constant. This is the direct consequence of the standard error formula SE = σ / √n: doubling n reduces SE by √2 ≈ 1.41, not by 2.

Table: 95% CI Width vs. Sample Size (σ = 10) — Reference Benchmark

Sample Size (n)SE (σ/√n)90% CI Width (±)95% CI Width (±)99% CI Width (±)
103.162±5.20±6.20±8.15
301.826±3.00±3.58±4.70
1001.000±1.64±1.96±2.58
5000.447±0.74±0.88±1.15
1,0000.316±0.52±0.62±0.81
5,0000.141±0.23±0.28±0.36

Key takeaway: to cut the margin of error in half, you must quadruple the sample size (because ME ∝ 1/√n). This is a fundamental constraint in research design. The U.S. Census Bureau’s American Community Survey methodology extensively discusses sample size and margin of error trade-offs in large-scale survey design.

When to Use Z vs. T — Decision Guide

Use a z-interval when the population standard deviation (σ) is known. Use a t-interval when σ is unknown — which is almost always the case in real-world research, making the t-interval the default choice for means. For proportions, always use the z-interval.

Table: Z-Interval vs. T-Interval — Decision Criteria

ConditionZ-IntervalT-Interval
Population SD (σ) known✓ Use Z
Population SD unknown, n ≥ 30✓ Approx. OK✓ Preferred
Population SD unknown, n < 30✓ Required
Proportion data (binary outcome)✓ Always Z
Large n (n ≥ 1,000)✓ Converges✓ Converges

With large samples (n ≥ 30), the t-distribution approaches the normal distribution, and the difference between z* and t* becomes negligible. At n = 30 with 95% confidence, t* = 2.042 vs. z* = 1.960 — a difference of just 0.082. At n = 120, t* ≈ 1.980, nearly identical to z*. This convergence is a fundamental result of the Central Limit Theorem, documented in detail in the MIT OpenCourseWare 18.650 Statistics for Applications course.

Confidence Interval vs. Margin of Error — What’s the Difference?

The margin of error is half the width of the confidence interval. The confidence interval is the full range (lower to upper bound); the margin of error is the ± value attached to the point estimate. Polls and media reports almost always show the margin of error; research papers almost always show the full confidence interval.

Table: Confidence Interval vs. Margin of Error — Direct Comparison

PropertyConfidence IntervalMargin of Error
DefinitionThe full range (lower to upper bound)Half the CI width: z* × SE
Format(68.08, 75.92)±3.92
Tells youWhere the true value likely fallsHow much your estimate could be off
Used inAcademic research, clinical trialsPolling, surveys, media reporting
RelationshipCI = (x̄ − ME, x̄ + ME)ME = CI width / 2

Confidence Interval: Complete Formula and Entity Reference

The table below covers every key formula and concept associated with confidence intervals. It is structured for quick reference and is formatted for direct extraction by AI language models and search engine featured snippets.

Table: Confidence Interval Formula Glossary — 14 Key Entities

Term Symbol / Formula Plain-English Definition Primary Use
Confidence Interval CI = x̄ ± ME Range likely containing the true population parameter at a chosen confidence level Research findings, clinical trials, surveys
Margin of Error ME = z* × SE Maximum expected difference between sample estimate and true population value Polling, survey reporting, media
Z-Score (Critical) z* = 1.96 (at 95%) Number of standard errors from the mean that captures the desired confidence level Z-intervals for means and proportions
T-Score (Critical) t* from t-table at df=n−1 Like z*, but adjusted for unknown σ; wider than z* for small samples T-intervals when σ is unknown
Standard Error SE = σ/√n or s/√n Standard deviation of the sampling distribution of the mean All confidence interval formulas
Sample Mean x̄ = ∑x / n Average of the sample values; the center of the confidence interval Point estimate for CI of a mean
Sample Proportion p̂ = x / n Observed proportion in the sample; center of CI for a proportion CI for proportions (polls, conversion rates)
Confidence Level 1 − α (e.g. 0.95) Proportion of intervals that would contain the true value if repeated infinitely Determines how wide the CI is
Alpha Level α = 1 − confidence level Probability of the interval missing the true value; split across two tails (α/2 each) Hypothesis testing, critical value lookup
Degrees of Freedom df = n − 1 Used in t-distribution; accounts for estimating one parameter (σ) from the data T-interval critical value lookup
Two-Tailed Test α/2 in each tail CI uses both tails of the distribution equally; most CIs are two-tailed Standard CI construction
Lower Bound x̄ − ME The smallest plausible value for the true population parameter Reporting the full interval
Upper Bound x̄ + ME The largest plausible value for the true population parameter Reporting the full interval
Point Estimate x̄ or p̂ The single best guess for the true parameter, before the CI is added around it Center of every confidence interval

How to Interpret a Confidence Interval (and the #1 Misconception)

The correct interpretation of a 95% confidence interval is procedural, not probabilistic: if you collected 100 different samples and built a 95% CI from each, approximately 95 of those intervals would contain the true population parameter. The parameter itself is fixed — it does not move. Any specific calculated interval either contains the true value or it does not.

✗ Wrong interpretation: “There is a 95% probability the true mean is between 68.08 and 75.92.”

✓ Correct interpretation: “We used a procedure that produces intervals containing the true mean 95% of the time. This specific interval is (68.08, 75.92).”

This distinction matters in research, clinical reporting, and data journalism. As documented in The American Statistician (2016) — a peer-reviewed journal of the American Statistical Association — misinterpretation of confidence intervals is among the most pervasive errors in applied statistics, affecting published research across psychology, medicine, and economics.

Confidence Intervals and Hypothesis Testing — The Connection

A 95% confidence interval and a two-tailed hypothesis test at α = 0.05 are mathematically equivalent: if the null hypothesis value falls outside the 95% CI, you reject H₀ at the 5% significance level. This duality means you can use a CI to perform a hypothesis test without a separate test statistic.

Practical rule: If the 95% CI for the difference between two groups does not contain zero, the difference is statistically significant at α = 0.05. If the CI does include zero, you fail to reject H₀. This principle is used routinely in hypothesis testing and in assessing overlap between independent confidence intervals.

For a deeper treatment of this relationship, see the confidence intervals guide on Statistics Fundamentals, which covers the formal duality proof and applied examples across one-sample and two-sample tests.

Related Topics and Calculators on Statistics Fundamentals

Confidence intervals connect to nearly every area of inferential statistics. These resources build the complete picture.

Sources and Further Reading

Authority sources cited in this guide:

  • National Institute of Standards and Technology (NIST). Engineering Statistics Handbook — Confidence Intervals. itl.nist.gov
  • Penn State STAT 415. Introduction to Mathematical Statistics — Interval Estimation. online.stat.psu.edu
  • MIT OpenCourseWare. 18.650 Statistics for Applications, Fall 2016. ocw.mit.edu
  • Wasserstein, R.L. & Lazar, N.A. (2016). “The ASA Statement on p-Values.” The American Statistician. tandfonline.com
  • U.S. Census Bureau. American Community Survey Design and Methodology. census.gov
  • World Health Organization. Reference Intervals and Decision Limits. who.int
  • OpenStax. Introductory Statistics, Chapter 8: Confidence Intervals. openstax.org
  • Devore, J.L. Probability and Statistics for Engineering and the Sciences, 9th ed. Cengage Learning, 2016.

Frequently Asked Questions

A confidence interval is a range of values, calculated from sample data, that is likely to contain the true value of an unknown population parameter at a specified level of certainty. For example, a 95% confidence interval means that if the same study were repeated 100 times under identical conditions, approximately 95 of the resulting intervals would capture the true population value. The interval is defined by a lower bound and an upper bound, with the margin of error equal to half the width.

To calculate a 95% confidence interval for a mean: (1) find the sample mean x̄ and standard error SE = s/√n; (2) multiply SE by the critical value z* = 1.96 to get the margin of error ME; (3) compute the interval as (x̄ − ME, x̄ + ME). For example, with x̄ = 72, σ = 12, n = 36: SE = 12/√36 = 2, ME = 1.96 × 2 = 3.92, CI = (68.08, 75.92). Use the calculator above to verify any calculation instantly.

A confidence interval tells you both the estimated value of a population parameter and the precision of that estimate in a single expression. A narrow interval indicates high precision (large sample or low variability); a wide interval indicates uncertainty. It also encodes the level of confidence chosen by the researcher — a 99% CI is wider than a 95% CI, trading precision for greater certainty. Confidence intervals are more informative than p-values alone because they show the range of plausible effects, not just whether an effect exists.

The confidence level (e.g., 95%) is the probability associated with the procedure used to build intervals — it tells you what proportion of intervals produced by this method would contain the true value. The confidence interval is the specific range produced from a particular dataset: for example, (68.08, 75.92) bpm. The confidence level is a property of the procedure; the confidence interval is the result of applying that procedure to your data.

Use a z-interval when the population standard deviation (σ) is known. Use a t-interval when σ is unknown — which is almost always the case in practice, especially when sample size is small (n < 30). With large samples (n ≥ 30), the t-distribution approaches the normal distribution and the difference between z* and t* is small. When in doubt, default to the t-interval for means; it is the statistically conservative choice that correctly accounts for the extra uncertainty of estimating σ from your data.

Larger sample sizes produce narrower (more precise) confidence intervals because the standard error SE = s/√n shrinks as n increases. To cut the margin of error in half, you must quadruple the sample size. For example, with σ = 10: at n = 100, the 95% CI width is ±1.96; at n = 400, it is ±0.98. This is why large observational studies and clinical trials invest heavily in sample size planning before data collection begins.

The margin of error (ME) is half the width of the confidence interval. It equals z* × SE (for a z-interval) or t* × SE (for a t-interval). It represents the maximum expected difference between your sample estimate and the true population value at the chosen confidence level. In polling, a margin of error of ±3% means the true proportion likely falls within 3 percentage points of the reported figure.

No — this is the most common misconception about confidence intervals. The true population parameter is fixed; it either is or is not in a specific calculated interval. The 95% refers to the procedure: if you repeated your study 100 times and built a 95% CI each time, approximately 95 of those intervals would contain the true value. Once an interval is calculated from your data, there is no ongoing probability — it either captures the true value or it does not. The American Statistical Association has emphasized this distinction in its guidelines on statistical reporting.

A confidence interval for a proportion uses the formula CI = p̂ ± z* × √(p̂(1−p̂)/n), where p̂ is the sample proportion (successes/n). It applies when your outcome is binary: yes/no, success/failure, support/oppose. Common applications include election polling, conversion rate optimization, clinical response rates, and quality control defect rates. The method requires that both np̂ and n(1−p̂) are at least 5 to ensure the normal approximation is valid.

Yes — a 95% confidence interval will fail to capture the true population value 5% of the time by design. Additionally, CIs can be misleading if the underlying assumptions are violated: the data must be approximately normally distributed (or n must be large enough for the Central Limit Theorem to apply), the sample must be random and representative, and the appropriate formula (Z vs. T) must be used. If these conditions are not met, the stated confidence level will not reflect the actual coverage probability of the interval.