Home · Statistics · Inference & Tests · Confidence Interval Calculator

Confidence Interval Calculator

A confidence interval for a mean or a proportion: the estimate plus or minus a margin of error set by the confidence level, spread and sample size. The headline result is the margin of error.

Your figures

Example result — edit the figures to make it yours

4.8999

Interval95.10009 to 104.89991
Critical value z1.959964
Standard error2.5

What this calculator does

A confidence interval for a mean or a proportion: the estimate plus or minus a margin of error set by the confidence level, spread and sample size. The headline result is the margin of error. Every figure on this page is computed from the standard definition stated below — the same definition used in textbooks and reference tables — with no hidden rounding steps, and the method notes name the exact convention where more than one exists.

The formula and method

Margin = critical value × standard error; mean (z): z*·s/√n; mean (t): t*·s/√n; proportion: z*·√(p̂(1−p̂)/n)

Three modes: mean with a z critical value (σ known or large n), mean with a t critical value on n − 1 degrees of freedom (σ estimated), and a single proportion with p̂ = x/n.

The critical value comes from the chosen confidence level: 1.645, 1.960 or 2.576 for z at 90%, 95% and 99%.

The interval is estimate ± margin. The headline output is the margin of error; the interval endpoints are the estimate plus and minus it.

Worked example

With the example inputs this page opens with (sample mean 100, standard deviation 15, sample size n 36, successes x (proportion mode) 45), the result is 4.8999. Change any figure and the result updates with the same formula.

Quick reference

Quick reference — varying sample mean
Sample meanResult
504.8999
804.8999
1004.8999
1254.8999
1504.8999
2004.8999

Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.

Common questions

What does a 95% confidence interval actually mean?

The procedure captures the true value in 95% of repeated samples. It is not a 95% probability that this particular interval contains the value — the value is fixed and the interval is what varies.

When should I pick the t mode over the z mode?

Whenever σ is estimated from the sample and n is not large — the t critical value on n − 1 degrees of freedom is wider and honestly reflects the extra uncertainty. With n above roughly 100 the two nearly agree.

How does the Confidence Interval Calculator work?

A confidence interval for a mean or a proportion: the estimate plus or minus a margin of error set by the confidence level, spread and sample size. The headline result is the margin of error. Mode · Mean · SD · n · Successes x · Confidence level → Margin of error. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.

What inputs does the Confidence Interval Calculator need?

Mode · Mean · SD · n · Successes x · Confidence level → Margin of error. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.