Country & language

Sets the currency, units and country-specific rules (tax, VAT, salary) in calculators. General tools stay the same.

Pages that are not translated yet open in English.

↑ ↓ to move · Enter to open · Esc to close

Confidence Interval Calculator

Enter a sample mean and standard deviation, or a count of successes, and get the interval, the margin of error and the critical value behind it.

Quick answer: For a sample mean of 50 with s = 8 and n = 25, the 95% confidence interval is 50 ± 2.0639 × 8 ÷ √25 = 50 ± 3.3022, i.e. 46.6978 to 53.3022.

Updated · Free · No sign-up

Confidence Interval Calculator inputs

Result

95% confidence interval for the mean

46.6978 to 53.3022

50 ± 3.3022

Margin of error
±3.3022
Critical value t* (df = 24)
2.0639
Standard error
1.6

Step by step

  1. Critical value for 95% confidence: t* (df = 24) = 2.0639
  2. Standard error: s ÷ √n = 8 ÷ √25 = 1.6
  3. Margin of error: 2.0639 × 1.6 = 3.302238
  4. Interval: 50 ± 3.3022 = 46.6978 to 53.3022

We are 95% confident that the true population mean lies between 46.6978 and 53.3022.

The same data at other confidence levels

ConfidenceCritical valueMargin of errorInterval
80%1.3178±2.108547.8915 to 52.1085
85%1.4871±2.379447.6206 to 52.3794
90%1.7109±2.737447.2626 to 52.7374
95%2.0639±3.302246.6978 to 53.3022
98%2.4922±3.987546.0125 to 53.9875
99%2.7969±4.475145.5249 to 54.4751
99.9%3.7454±5.992644.0074 to 55.9926

Confidence interval formulas

Mean: x̄ ± t* × s ÷ √n  ·  x̄ ± z* × σ ÷ √n  ·  Proportion: p̂ ± z* × √(p̂(1 − p̂) ÷ n)

The part after ± is the margin of error: the critical value times the standard error.

Worked example

A sample of 25 has a mean of 50 and a standard deviation of 8. Find the 95% interval for the population mean.

  1. σ is unknown, so use t with 25 − 1 = 24 degrees of freedom: t* = 2.0639.
  2. Standard error = 8 ÷ √25 = 1.6.
  3. Margin of error = 2.0639 × 1.6 = 3.3022.
  4. Interval = 50 ± 3.3022 = 46.6978 to 53.3022.

With z instead of t (1.96 × 1.6 = 3.136) the interval would be slightly narrower – which is why using z with a small sample overstates your precision.

Critical values

Confidencez*t* (df = 10)t* (df = 30)
80%1.28161.37221.3104
90%1.64491.81251.6973
95%1.96002.22812.0423
98%2.32632.76382.4573
99%2.57583.16932.7500

How to use the calculator

Choose whether you are estimating a mean or a proportion. For a mean, enter the sample mean, the standard deviation and the sample size; for a proportion, enter the number of successes and the sample size. Pick the confidence level and the interval, margin of error and working appear instantly.

Assumptions

  • The sample is random and the observations are independent.
  • For a mean: the data is roughly normal, or n is large enough (about 30+) for the central limit theorem.
  • For a proportion: the Wald interval needs at least about 10 successes and 10 failures; otherwise rely on the Wilson interval.

Frequently asked questions

Should I use z or t?

Use t whenever you estimate the spread from the sample itself (the usual case) – it widens the interval to allow for the extra uncertainty, with n − 1 degrees of freedom. Use z only when the population standard deviation σ is genuinely known. For large samples the two are almost identical.

What does a 95% confidence interval mean?

If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population value. It does not mean there is a 95% probability that this particular interval contains it.

Wald or Wilson for a proportion?

The Wald interval p̂ ± z√(p̂(1−p̂)/n) is the textbook formula but performs poorly for small samples or proportions near 0% or 100% – it can even go below 0. The Wilson score interval has much better coverage and is recommended in those cases.

How can I make the interval narrower?

Increase the sample size (the margin shrinks with √n, so quadrupling n halves it), accept a lower confidence level, or reduce variability in the measurements.