Math Financial Fitness & Health Conversion Other

Confidence Interval Calculator

Use this calculator to compute the confidence interval or margin of error, assuming the sample mean most likely follows a normal distribution. Use the Standard Deviation Calculator if you have raw data only.

Sample size (amount), n
Sample Mean (average), X̄
Standard Deviation, σ or s
Confidence Level


What is the confidence interval?

In statistics, a confidence interval is a range of values that is determined through the use of observed data, calculated at a desired confidence level that may contain the true value of the parameter being studied. The confidence level, for example, a 95% confidence level, relates to how reliable the estimation procedure is, not the degree of certainty that the computed confidence interval contains the true value of the parameter being studied. The desired confidence level is chosen prior to the computation of the confidence interval and indicates the proportion of confidence intervals, that when constructed given the chosen confidence level over an infinite number of independent trials, will contain the true value of the parameter.

Confidence intervals are typically written as (some value) ± (a range). The range can be written as an actual value or a percentage. It can also be written as simply the range of values. For example, the following are all equivalent confidence intervals:

20.6 ±0.887


20.6 ±4.3%


[19.713 – 21.487]

Calculating confidence intervals:

Calculating a confidence interval involves determining the sample mean, X̄, and the population standard deviation, σ, if possible. If the population standard deviation cannot be used, then the sample standard deviation, s, can be used when the sample size is greater than 30. For a sample size greater than 30, the population standard deviation and the sample standard deviation will be similar. Depending on which standard deviation is known, the equation used to calculate the confidence interval differs. For the purposes of this calculator, it is assumed that the population standard deviation is known or the sample size is larger enough therefore the population standard deviation and sample standard deviation is similar. Only the equation for a known standard deviation is shown.

X̄ ± ZĂ—Ïƒ

Where Z is the Z-value for the chosen confidence level, X̄ is the sample mean, σ is the standard deviation, and n is the sample size. Assuming the following with a confidence level of 95%:

X = 22.8

Z = 1.960

σ = 2.7

n = 100

The confidence interval is:
22.8 ±1.960×2.7

22.8 ±0.5292

Z-values for Confidence Intervals

Confidence LevelZ Value