Confidence Interval Calculator

95 % (or any level) confidence interval for a mean from raw data or summary statistics using t or z, and for a proportion using the Wilson score and Wald methods.

The Confidence Interval Calculator computes x̄ ± t·s/√n (or z when σ is known) for a mean and the Wilson score interval for a proportion, reporting the standard error, critical value and margin of error.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Choose mean or proportion.
  2. Enter summary values or paste data.
  3. Set the confidence level.
  4. Read the interval.

What you enter

What you get

Formula

CI = x̄ ± t(1−α/2, n−1) · s/√n   |   Wilson: (p̂ + z²/2n ± z√[p̂(1−p̂)/n + z²/4n²]) / (1 + z²/n)

A 95 % CI is the range that would contain the true parameter in 95 % of repeated samples. The t distribution is used when σ is estimated from the sample; Wilson is preferred over Wald for proportions, especially near 0 or 1 or with small n.

Worked example

Input: mean 52.3, SD 8.1, n 30, 95 %

Result: SE 1.479 · t(29) 2.045 · CI 49.28 to 55.32

Margin of error 3.02 either side of the mean.

Questions

What does a 95 % confidence interval mean?

If you repeated the study many times, 95 % of the intervals calculated this way would contain the true population value. It is not a 95 % probability that this specific interval contains it.

t or z?

Use t whenever the population SD is unknown (nearly always). For n above ~100 the two are practically identical.

Limitations

References

Related reading

More Statistics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.