Confidence Interval Calculator

Build a confidence interval for a mean or a proportion.

Confidence Interval Calculator tool

Estimate
—
Confidence interval
—
Margin of error
—
Critical value
—
Standard error
—
Wilson score interval

About the Confidence Interval Calculator

An estimate from a sample is more useful with a range around it showing its precision. This confidence interval calculator builds intervals for a mean, using the t or z distribution, and for a proportion with the Wald and Wilson methods: a sample of 25 with a mean of 50 and a standard deviation of 10 gives a 95 percent interval of about 45.87 to 54.13.

For a mean, the interval is x̄ ± critical value × s ÷ √n. When the population standard deviation is unknown, which is almost always, the critical value comes from the t distribution with n − 1 degrees of freedom; when σ is known, the normal z value is used instead. For a proportion p̂ = x ÷ n, the simple Wald interval is p̂ ± z√(p̂(1 − p̂) ÷ n), and the calculator also gives the Wilson score interval, which behaves much better for small samples or proportions near 0% or 100%.

Example: a sample of 25 with mean 50 and standard deviation 10 has a standard error of 2. With t = 2.063899 for 24 degrees of freedom at 95%, the margin of error is about 4.1278, so the interval runs from 45.8722 to 54.1278. If 45 of 100 people say yes, the 95% Wald interval is 35.25% to 54.75%, and the Wilson interval is 35.61% to 54.76%.

A 95% confidence level means that intervals built this way capture the true value in 95% of repeated samples. Plan the sample in advance with the sample size calculator, see the margin of error alone with the margin of error calculator, and test hypotheses with the t-test calculator.

How to use the Confidence Interval Calculator

  1. Choose what you are estimatingA mean from summary statistics, a mean from raw data, or a proportion.
  2. Enter your sampleMean, standard deviation and size; or the data; or successes and sample size.
  3. Pick the confidence level95% is standard; choose from 80% to 99.9%.
  4. Read the intervalSee the lower and upper bounds, the margin of error and the critical value used.

Confidence Interval Calculator features

  • Intervals for a mean and for a proportion
  • t critical values computed for any degrees of freedom
  • z interval when σ is known
  • Wald and Wilson score intervals for proportions
  • Works from raw data or summary statistics
  • Margin of error and standard error shown
  • Confidence levels from 80% to 99.9%

Common uses

  • Reporting survey and poll results
  • Lab and clinical study summaries
  • A/B test conversion rates
  • Statistics coursework
  • Quality and process measurements

Confidence intervals in practice: what they mean, how to read them and common traps

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

A confidence interval gives a range of plausible values for something you have estimated from a sample, such as an average delivery time or the share of customers who are satisfied. It is more honest than a single number, because it shows how much uncertainty the estimate carries. This guide explains what a 95% confidence interval really means, works through a delivery-time example, shows what makes intervals wider or narrower and highlights the mistakes people make when comparing them.

What a 95% interval means

A 95% confidence interval comes from a method that, if repeated on many random samples, would capture the true value about 95% of the time. For a single interval already calculated, the true value is either inside it or not; the 95% describes the reliability of the method, not a probability about this particular interval. In everyday reporting, saying "we are 95% confident the true average lies between these values" is an accepted shorthand.

A worked example: delivery times

A courier company times 40 randomly chosen deliveries and finds a mean of 32 minutes with a standard deviation of 6 minutes. With 39 degrees of freedom, the t-value for 95% confidence is about 2.02, so the margin is 2.02 × 6 ÷ √40, about 1.9 minutes. The 95% confidence interval is roughly 30.1 to 33.9 minutes.

The company can promise customers an average delivery time of "about 32 minutes", knowing the true average is very likely between 30 and 34. Individual deliveries vary much more, which is a separate question answered by a prediction interval.

What makes an interval wider or narrower

Three things set the width. More variation in the data widens the interval. A larger sample narrows it, but only with the square root of the sample size, so quadrupling the sample halves the width. A higher confidence level, such as 99% instead of 95%, widens it, because you are asking for more certainty. Planning a study means balancing these against time and cost.

Confidence intervals and prediction intervals

A confidence interval describes the uncertainty in an average or a proportion. A prediction interval describes where a single new observation is likely to fall, and it is much wider. In the delivery example, the average is very likely between 30 and 34 minutes, but an individual delivery might well take 20 or 45 minutes. Confusing the two leads to promises that individual customers find are often broken.

Proportions and opinion polls

Opinion polls report a percentage with a margin of error, which is half the width of a confidence interval. A poll showing 52% support with a margin of 3 points gives an interval of 49% to 55%. If two candidates are within each other's margins, the poll cannot reliably say who is ahead, which is why careful reporting describes such results as too close to call.

Comparing two groups

People often compare two groups by checking whether their confidence intervals overlap. Non-overlapping intervals do suggest a real difference, but overlapping intervals do not prove there is none; the difference can still be statistically significant. The better approach is to calculate a confidence interval for the difference itself, or to use a test designed for comparing groups.

Reporting intervals well

Report the estimate, the interval and the confidence level together, such as "mean 32 minutes, 95% CI 30.1 to 33.9". State the sample size, and mention how the sample was chosen, since an interval from a biased sample can be precise but wrong. Rounding the interval to a sensible precision keeps the message clear.

Common mistakes

  • Saying there is a 95% probability that the true value is in a particular interval, in formal contexts.
  • Confusing confidence intervals with prediction intervals.
  • Treating overlapping intervals as proof of no difference.
  • Ignoring bias, which no interval width can reveal.

Related tools

For survey precision, use Margin of Error Calculator. For the standard error behind the interval, try Standard Error Calculator, and for comparing means, T-Test Calculator.

Confidence intervals in spreadsheets

Spreadsheets can calculate the margin for a confidence interval directly. In Excel, =CONFIDENCE.T(0.05, standard_deviation, sample_size) returns the margin for a 95% interval using the t-distribution, and =CONFIDENCE.NORM uses the normal distribution for large samples. Subtract the margin from the mean for the lower limit and add it for the upper limit. Keeping the calculation in a spreadsheet makes it easy to see how the interval changes as more data arrives.

Bootstrap intervals

When data is skewed or the quantity of interest is unusual, such as a median or a ratio, the bootstrap offers an alternative. A computer repeatedly resamples the data with replacement, recalculates the statistic thousands of times and uses the middle 95% of those results as the interval. Bootstrap methods need no formula for the standard error, which makes them popular in modern data analysis.

Limits

Intervals assume random sampling and, for small samples, roughly normal data; results are approximate when those conditions are not met.

Frequently asked questions

What is a confidence interval?

A range calculated from sample data that is likely to contain the true population value. A 95% confidence interval comes from a method that captures the true value in 95% of samples.

How do I calculate a 95% confidence interval for a mean?

Compute the standard error s ÷ √n, multiply it by the t critical value for n − 1 degrees of freedom (about 1.96 for large samples), and add and subtract the result from the sample mean.

When should I use t instead of z?

Use t whenever you estimate the standard deviation from the sample, which is the usual case. Use z only when the population standard deviation is genuinely known. For large samples the two give almost the same interval.

What is the Wilson interval?

A confidence interval for a proportion that stays inside 0% to 100% and keeps close to the stated confidence even for small samples or extreme proportions, where the simple Wald interval performs badly.

Does a 95% interval mean a 95% chance the true value is inside?

Strictly, no. The true value is fixed; the 95% describes the method. If you repeated the study many times, about 95% of the intervals would contain the true value.

How can I make a confidence interval narrower?

Increase the sample size, since the width shrinks with √n, or accept a lower confidence level. Quadrupling the sample size halves the width of the interval.

What is the margin of error?

Half the width of the confidence interval: the critical value times the standard error. A poll result of 48% ± 3% has a margin of error of 3 percentage points.