Black FridayUp to 50% off--d--h--m--sSee prices →
tezkeys

Confidence Interval Calculator

Report a confidence interval alongside a mean or a proportion. Calculate the 90%, 95% or 99% confidence interval from the mean, standard deviation and n, or from the number of people in a proportion.

  • Free · no sign-up
  • The calculation runs in your browser; the values you enter are not sent to the server.
Confidence level
Decimal separator

How is it calculated?

What does a confidence interval mean?

The mean or proportion you find in a sample is an estimate of the true value in the population. The confidence interval shows the uncertainty of that estimate. A 95% confidence interval is read like this: if the same study were repeated many times with the same method, about 95% of the intervals calculated would contain the true value. The interval narrows as the sample grows and widens as the confidence level rises.

Confidence interval for a mean

When the population standard deviation is unknown, the t distribution is used: M ± t · s / √n. Here s is the sample standard deviation, s / √n the standard error of the mean, and t the critical value for the chosen confidence level with n − 1 degrees of freedom.

Example: for M = 50, s = 10 and n = 25 the standard error is 2; with 24 degrees of freedom t = 2.064 for 95%, the margin of error is 4.13 and the confidence interval is [45.87, 54.13]. In large samples t approaches 1.96.

Confidence interval for a proportion

The classic (Wald) formula is p̂ ± z · √(p̂(1 − p̂) / n); z is 1.96 for 95%. It is simple but too narrow in small samples and for proportions near 0 or 1; when the proportion is exactly 0 or 1 the interval collapses to a single point.

The Wilson (1927) interval fixes these problems: (p̂ + z²/2n ± z · √(p̂(1 − p̂)/n + z²/4n²)) / (1 + z²/n). Example: for 40 of 100 people the Wald interval is [30.4%, 49.6%] and the Wilson interval is [30.9%, 49.8%]. The calculator gives both; the Wilson interval is the recommended one.

How to report it

APA 7 recommends reporting point estimates with their confidence intervals. The interval goes in square brackets: M = 50.00, 95% CI [45.87, 54.13]. Stating the confidence level once per paragraph is enough. For proportions, say which method (Wilson or Wald) you used.

Frequently asked questions

Why t rather than z for a mean?
The population standard deviation is almost never known; once the sample standard deviation is used in its place, the right distribution is t. In large samples the difference between t and z becomes negligible.
Should I report Wilson or Wald?
The Wilson interval is more accurate in small samples and for extreme proportions and is the general recommendation. The Wald interval is the classic textbook formula; when the sample is large and the proportion is mid-range the two are almost identical. Say which one you used.
What if I have the standard error instead of the standard deviation?
Standard error = standard deviation / √n. To get the standard deviation, multiply the standard error by √n and enter that value.
Is the confidence interval the same as the margin of error?
The margin of error is half the width of the interval: confidence interval = estimate ± margin of error. The Wilson interval is not symmetric around the estimate, so it is not written with a single margin; the lower and upper bounds are given.

Other free calculators