Confidence Interval Calculator

Calculate the confidence interval for a mean or proportion from sample statistics and confidence level, with margin of error and bounds.

Share this calculator

Type
Confidence level

48.04

Lower bound

51.96

Upper bound

±1.96

Margin of error

Confidence interval(48.04, 51.96)
Sample mean50
Sample size100
Critical z-value1.96

Also in Statistics

Statistical Inference

Confidence interval — estimating population parameters from sample data

A confidence interval gives a range of plausible values for an unknown population parameter, based on sample data and a chosen level of certainty. Rather than reporting a single point estimate, confidence intervals communicate both the best estimate and the precision of that estimate — making them one of the most important concepts in inferential statistics.

What a confidence interval means

A 95% confidence interval does not mean there is a 95% probability the true value lies within that specific range. Once an interval is calculated, the true parameter is either inside it or it is not. The correct interpretation is procedural: if you repeated the study many times using the same method, approximately 95% of the resulting intervals would contain the true population parameter.

This distinction matters in practice. Saying "we are 95% confident the mean lies between 48 and 52" is shorthand for a sampling guarantee — the procedure produces correct intervals 95% of the time.

CI for a mean (large-sample z-interval)

For a sample mean, the confidence interval is the sample mean plus or minus the margin of error: x̄ ± z × (σ / √n). The term σ / √n is the standard error — how much sample means vary around the true population mean.

This calculator uses the z-distribution (standard normal), which is appropriate when the sample size is large (typically n ≥ 30) or the population standard deviation is known. For small samples with unknown population standard deviation, a t-distribution should be used instead.

CI = x̄ ± z × (σ / √n)

x̄ is the sample mean, σ is the standard deviation, n is the sample size, z is the critical value.

CI for a proportion (Wald interval)

For a proportion, the standard error is √(p̂(1 − p̂)/n), where p̂ is the observed proportion. This gives CI = p̂ ± z × √(p̂(1 − p̂)/n). The result is expressed as a percentage range around the observed rate.

The Wald interval works well when n is large and p̂ is not too close to 0 or 1. For small samples or extreme proportions, the Wilson score interval is more accurate, but the Wald interval is the standard introductory form.

CI = p̂ ± z × √(p̂(1 − p̂) / n)

p̂ is the sample proportion (successes / n), z is the critical value for the chosen confidence level.

Factors that affect interval width

Three things control the width of a confidence interval: confidence level, sample size, and variability. Higher confidence (e.g. 99% vs 95%) produces wider intervals. Larger samples produce narrower intervals — doubling sample size reduces margin of error by a factor of √2 ≈ 1.41. Greater variability (higher σ or more extreme p̂) also widens the interval.

Narrower intervals are not always better — a very narrow interval at 80% confidence may be less useful than a wider one at 99% confidence, depending on the decision at stake.

Frequently asked questions

When should I use a t-interval instead of a z-interval?

Use a t-interval when estimating a mean with a small sample (n < 30) and the population standard deviation is unknown. The t-distribution has heavier tails than the normal distribution, producing wider intervals to account for additional uncertainty. As n grows, the t-distribution approaches the z-distribution, so for large samples the difference is negligible.

What does "95% confidence" actually mean?

95% confidence refers to the long-run reliability of the procedure: if you collected 100 independent samples and computed a 95% CI for each, about 95 of those intervals would contain the true population parameter. It does not mean the true value has a 95% chance of being inside any specific calculated interval.

Can a confidence interval contain negative values for a proportion?

Mathematically, the Wald formula can produce bounds below 0% or above 100% for extreme proportions or small samples. This calculator clamps results to [0%, 100%] to keep them interpretable, but the clamping is a sign that the Wald interval is not ideal for those inputs. The Wilson score interval handles extreme cases more gracefully.

How is margin of error related to confidence interval?

The margin of error is half the width of the confidence interval. If a poll reports 60% ± 3%, the confidence interval is (57%, 63%) and the margin of error is 3 percentage points. Margin of error and confidence interval are two ways of expressing the same information.

Related

More from nearby categories

These related calculators come from the same leaf category, nearby sibling categories, or the same top-level topic.