Confidence Interval Calculator

Statistics Tools

Confidence Interval Calculator

Calculate a confidence interval for a sample mean using the normal (z) approximation.

Confidence interval
— to —
 
Margin of error± 0
Standard error of the mean0
Critical value (z)0
Uses the normal (z) distribution, which is a close approximation to the t-distribution once your sample size is roughly 30 or more.
Disclaimer: This calculator is provided for general informational and educational purposes only and is not statistical, research, or professional advice. It uses the normal (z) distribution approximation rather than the exact Student's t-distribution — for small samples (roughly n < 30), the true interval computed with a t-distribution will typically be slightly wider. For publication-quality or clinical statistics, use dedicated statistical software.

Confidence Interval Calculator: Formula, Worked Examples & Complete Guide

Written by Mathew | Financial Tools & Calculation Specialist · Last updated July 31, 2026

In two sentences: A confidence interval calculator estimates a range that likely contains a true population value, using the formula Margin of Error = Z-score × (Standard Deviation ÷ √Sample Size), then adding and subtracting that margin from your sample mean. This guide breaks down the formula, the z-score table for common confidence levels, and worked examples showing exactly how sample size and confidence level trade off against each other.

What Is a Confidence Interval Calculator?

A confidence interval calculator estimates a range of plausible values for a true population parameter — like a mean or a proportion — based on a sample, along with a stated confidence level (most commonly 95%) reflecting how reliable that range estimate is expected to be.

The Confidence Interval Formula

Standard Error (SE) = Standard Deviation (σ) ÷ √Sample Size (n)
Margin of Error (ME) = Z-score × SE
Confidence Interval = Sample Mean ± ME

Lower Bound = Mean − ME
Upper Bound = Mean + ME

Z-Scores for Common Confidence Levels

Confidence LevelZ-Score
90%1.645
95%1.96
99%2.576

A higher confidence level requires a larger z-score, which widens the margin of error and produces a broader confidence interval — you can be more certain the true value falls within a wider range, but less certain about a narrower one.

Worked Examples

Example 1: A basic 95% confidence interval for a mean

A sample of 100 people has a mean height of 170 cm with a standard deviation of 10 cm.

SE = 10 ÷ √100 = 10 ÷ 10 = 1.0
ME = 1.96 × 1.0 = 1.96
Confidence Interval = 170 ± 1.96 = [168.04, 171.96]

This means you can be 95% confident the true average height of the full population falls between 168.04 cm and 171.96 cm.

Example 2: The same data at a 99% confidence level

Using the identical sample from Example 1, but at 99% confidence instead.

SE = 1.0 (unchanged)
ME = 2.576 × 1.0 = 2.576
Confidence Interval = 170 ± 2.576 = [167.42, 172.58]

Notice the interval widens from [168.04, 171.96] at 95% confidence to [167.42, 172.58] at 99% — higher confidence requires a wider net to be more certain of capturing the true value.

Example 3: How sample size affects the interval width

Using the same mean (170 cm) and standard deviation (10 cm) as Example 1, but comparing a sample size of 30 against a sample size of 400, both at 95% confidence.

n = 30: SE = 10 ÷ √30 ≈ 1.826; ME = 1.96 × 1.826 ≈ 3.58; Interval ≈ [166.42, 173.58]
n = 400: SE = 10 ÷ √400 = 0.5; ME = 1.96 × 0.5 = 0.98; Interval ≈ [169.02, 170.98]

Increasing the sample size from 30 to 400 dramatically narrows the confidence interval — larger samples produce more precise estimates, since the standard error shrinks as sample size grows (specifically, as the square root of sample size).

Example 4: A confidence interval for a proportion (survey result)

A survey of 250 people finds 40% support a particular policy. Calculate the 95% confidence interval for this proportion.

SE = √[p̂(1 − p̂) ÷ n] = √[0.4 × 0.6 ÷ 250] = √0.00096 ≈ 0.031
ME = 1.96 × 0.031 ≈ 0.0608, or about ±6.1%
Confidence Interval = 40% ± 6.1% = [33.9%, 46.1%]

This means you can be 95% confident that the true proportion of the full population supporting the policy falls between approximately 33.9% and 46.1%.

Step-by-Step: How to Use a Confidence Interval Calculator

  1. Determine whether you’re calculating an interval for a mean (using standard deviation) or a proportion (using p̂, the sample proportion).
  2. Gather your sample statistic (mean or proportion), standard deviation (or use 0.5 as a conservative default for proportions if unknown), and sample size.
  3. Choose your confidence level — 95% is the most common default — and find the corresponding z-score.
  4. Calculate the standard error, then multiply by the z-score to find the margin of error.
  5. Add and subtract the margin of error from your sample statistic to get the lower and upper bounds of your confidence interval.

What “95% Confidence” Actually Means

A common misconception is that a 95% confidence interval means there’s a 95% probability the true value falls within that specific calculated range — but that’s not quite right. The correct interpretation is that if you repeated the same sampling process many times, approximately 95% of the resulting confidence intervals would contain the true population value. Any single confidence interval either does or doesn’t contain the true value — the 95% figure describes the reliability of the method across repeated sampling, not the probability for that one specific interval you calculated.

Z-Score vs. T-Score: When to Use Each

A confidence interval calculator uses a z-score when the population standard deviation is known, which is the standard case covered above. When the population standard deviation is unknown and estimated from the sample instead (far more common in real research), a t-score is used instead — the t-distribution accounts for the additional uncertainty from estimating standard deviation, and its critical values depend on degrees of freedom (sample size minus 1). As sample size increases, the t-distribution converges toward the normal distribution, meaning the difference between t-scores and z-scores becomes negligible for large samples but matters more for smaller ones.

Using a Confidence Interval Calculator in Real Research

A confidence interval calculator is most valuable when the resulting range directly informs a decision, rather than being reported as an isolated statistic disconnected from what it actually implies.

Practical ways to apply a confidence interval calculator

  • Check whether a meaningful comparison value falls inside or outside your interval. If you’re comparing a new result against a known benchmark, a confidence interval calculator’s range tells you whether the difference is likely statistically meaningful or could simply reflect normal sampling variation.
  • Use the interval width to judge whether you need a bigger sample. As shown in the earlier worked example, a confidence interval calculator run at your current sample size versus a much larger hypothetical one quickly reveals whether collecting more data would meaningfully sharpen your estimate.
  • Report both the point estimate and the full interval, not just one number. A confidence interval calculator’s entire value comes from communicating the range of plausible true values, so presenting only the sample mean or proportion without its interval discards the most important context.
  • Match your confidence level to the stakes of the decision. A confidence interval calculator run at 90% confidence might be perfectly adequate for low-stakes exploratory analysis, while a medical or safety-related conclusion typically warrants the tighter certainty of a 99% confidence level instead.

Frequently Asked Questions

Why does a larger sample size produce a narrower confidence interval?

Because standard error is calculated by dividing standard deviation by the square root of sample size — as sample size grows, the denominator grows, shrinking the standard error and therefore the margin of error, producing a more precise (narrower) estimate.

Should I use 90%, 95%, or 99% confidence?

95% is the most widely used standard in most research and survey contexts, balancing reasonable precision with reasonable certainty. 90% is sometimes used for exploratory research where a narrower interval is more useful, while 99% is reserved for situations demanding very high certainty, such as some scientific or medical research.

What’s the difference between confidence interval and margin of error?

Margin of error is the “plus or minus” value added to and subtracted from your sample statistic. The confidence interval is the resulting full range (lower bound to upper bound) produced once that margin of error is applied.

Do I need to know the population standard deviation to calculate a confidence interval?

Not necessarily — if it’s unknown, you can estimate it from your sample and use a t-score instead of a z-score, which accounts for the added uncertainty of using an estimated rather than a known standard deviation.

Related Calculators

In summary, a confidence interval calculator turns a sample statistic into a defensible range estimate for the true population value, and understanding both the z-score-based formula and what “95% confidence” actually means statistically helps you interpret and communicate results accurately rather than overstating their certainty.


About the author: Mathew is a Financial Tools & Calculation Specialist focused on building and fact-checking online calculators across statistics and data analysis topics.

Note: This calculator and article are provided for general educational and informational purposes only. Always double-check results for critical academic, scientific, or professional research applications.