Statistics / Estimates

Confidence Interval Calculator (Mean and Proportion)

Work out a confidence interval for a mean, from the mean, SD, and sample size or from raw data, or for a proportion with the Wilson score method, at 80%, 90%, 95%, or 99% confidence, with the margin of error.

Confidence Interval Calculator (Mean and Proportion): For a mean, the interval is mean ± t × SD ÷ √n, with t from Student's distribution on n − 1 degrees of freedom: for a mean of 72.5, SD 8.2, and n = 40 at 95%, that is 69.88 to 75.12, ± 2.62. For a proportion, the Wilson score interval stays inside 0–100% and works for small samples: 42 out of 100 gives 32.8% to 51.8%. The plain Wald interval is shown alongside. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use
Confidence interval calculatorLocal processing

Runs entirely in your browser

Interval69.8775 – 75.1225
Margin of error± 2.6225
Critical t2.022739 degrees of freedom

For a mean, the interval is mean ± t × SD ÷ √n, with t from Student's distribution. For a proportion, the Wilson score interval is shown first because it behaves well near 0% and 100% and for small samples; the simple Wald interval, p ± z√(p(1 − p) ÷ n), is shown for comparison. A 95% interval is built by a method that captures the true value in 95% of samples; it is not a 95% chance for this particular interval.

Worked examples

Average delivery time of 72.5 minutes, SD 8.2, from 40 orders: the 95% interval is 69.9 to 75.1 minutes. A survey where 42 of 100 said yes: 42%, with a 95% Wilson interval of 32.8% to 51.8%.

To plan how many responses you need for a target margin, use the sample size calculator.

Zero successes

With 0 successes in 20 tries, the Wald interval collapses to 0%–0%, which is clearly wrong; the Wilson interval is 0% to 16.1%, a sensible upper bound.

To compare two means instead, use the t-test calculator.

How to use it

  1. Choose a mean from summary figures, a mean from data, or a proportion.
  2. Enter the figures and pick the confidence level.
  3. Read the interval and the margin of error.

Privacy & limitations

Your data stay in your browser.

Related tools

Frequently asked questions

What does 95% confidence mean?

If you repeated the sampling many times, 95% of the intervals built this way would contain the true value. It does not mean a 95% probability that this particular interval does.

Why is the Wilson interval preferred?

The simple Wald interval can extend below 0% or above 100% and is too narrow for small samples or proportions near the ends; Wilson's avoids both.

How do I make the interval narrower?

Collect more data: the margin shrinks with √n, so halving it needs four times the sample. Lower confidence also narrows it, at the cost of more misses.

Free tool · runs in your browser · no account required