# What Is a Confidence Interval and How Do You Calculate It?

![Confidence Interval](https://www.investopedia.com/thmb/69Qg9jeh5WyfK5NQgyksnNhK6JM=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/Confidence-Interval-088dc77f639a4f71a9f00297d0db5a10.jpg)

*— Investopedia / Julie Bang*

> **Definition**
>
> A confidence interval is the probability that a population parameter will fall between a set of values, expressed using a percentage of certainty.

## What Is a Confidence Interval?

In statistics, a confidence interval is a range of values likely to contain a population parameter that is unknown. Analysts often use confidence level values of 95% or 99% when calculating confidence intervals. Thus, if a point estimate is generated from a statistically significant population with a mean of 10.00 using a 95% confidence interval of 9.50 to 10.50, it means one is 95% confident that the true value from the population falls within that range.

Statisticians and other analysts use confidence intervals to understand whether their sample estimations, inferences, or predictions match the actual populations. If a confidence interval contains the value of zero (or some other null hypothesis), then one cannot satisfactorily claim that a result from data generated by testing or experimentation is to be attributable to a specific cause rather than chance.

### Key Takeaways

*   A confidence interval is the probability that a parameter will fall between a pair of values.
*   Confidence intervals measure the degree of uncertainty or certainty in a sampling method.
*   They are also used in hypothesis testing and regression analysis.  
    
*   They are most often constructed using confidence levels of 95% or 99%.

## Understanding Confidence Intervals

Confidence intervals measure the degree of uncertainty or certainty in a sampling method. Most commonly, analysts use a 95% or 99% confidence level.

A confidence interval is a range of values, bounded above and below the statistic's mean, that likely would contain an unknown population parameter. [Confidence level](https://www.investopedia.com/ask/answers/041615/whats-difference-between-confidence-level-and-confidence-interval-value-risk-var.asp) is the probability (percent of certainty) that the confidence interval would contain the true population parameter when you draw a random sample many times.

In a report, the analysts would make a statement similar to "we are 99% certain (confidence level) that the true population mean falls between 88 and 92 (confidence intervals)."

> **Important**
>
> Confidence interval and confidence level are interrelated but are not exactly the same.

## Calculating Confidence Intervals in Excel

Microsoft Excel makes it simple to calculate confidence intervals using its STDEVA and CONFIDENCE.T functions.

First, ensure your data is entered in your sheet. Next, click on a cell and type "=STDEVA(Beginning Cell:Ending Cell)." Next, assuming you want a confidence level of 95% (typed as 0.95) and have a sample size of 50, and a standard deviation of 26.319, click on a cell and type "=CONFIDENCE.T (0.95,26.319,50), which equals 0.2346.

![Confidence interval in Excel](https://www.investopedia.com/thmb/M_N93TOohwS_EcFBoj1ln5o6QuY=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/CIExample-1f99c7fdc1ca4558b235024efbd0b98a.jpg)

**

## Confidence Interval Formulas

Calculating a confidence interval by hand is slightly more complex. To determine a confidence interval, you'll need your sample's mean and margin of error:

*   Confidence Interval = Sample Mean ± Margin of Error
*   Margin of Error = z\* x (Population Standard Deviation ÷ Square Root of n)
*   Sample Mean = Average of Your Sample

Where:

*   z\* = Critical Value, or Z Score
*   n = Size of the Population

To find your z-score, determine your confidence level. For example, assume you want a 95% confidence level. You'd use that in the formula:

> α = 1 - ( C/100 )

Where:

*   C = Confidence Level (95%)

The result, your significance level, 0.05, is used in the following formula to get your z-score:

> zα/2

*   z = 0.05 ÷ 2
*   z = 0.025

On a [z-score table](https://www.investopedia.com/terms/z/zscore.asp), you'd find that 0.025 corresponds to -1.9 (left) and .06 (top). You combine the values (don't add them) to get a value of 1.96, ignoring the negative sign, as it denotes the area where the z falls on a normal distribution curve.

![z-table sample](https://www.investopedia.com/thmb/LNdreMzogUDXtcfOgGAxGMvCeMk=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/z-scoretable-7d72faa4ce5643ea97d2bce645afb0c6.jpg)

*Z-Table. — University of West Georgia*

Nearly done—divide the population's standard deviation by the square root of the total number of your population and multiply the result by your z-score. This is your margin of error.

Finally, add and subtract the margin of error from your sample's mean, resulting in a range of values with which you can state you're 95% confident that the population mean falls somewhere in the range of values you just determined.  

## Confidence Interval Uses

Confidence intervals are conducted using statistical methods, such as a [t-test](https://www.investopedia.com/terms/t/t-test.asp). A t-test is a type of inferential statistic used to determine if there is a significant difference between the means of two groups, which may be related to certain features. Calculating a t-test requires three key data values. They include the difference between the mean values from each data set (called the mean difference), the standard deviation of each group, and the number of data values of each group.

Statisticians use confidence intervals to measure uncertainty in an estimate of a population parameter based on a sample. For example, a researcher selects different samples randomly from the same population and computes a confidence interval for each sample to see how it may represent the true value of the population variable. The resulting datasets are all different; some intervals include the true population parameter and others do not.

## Explain Like I'm Five

Confidence intervals indicate how well the sample you've chosen represents the population you're analyzing. In data analysis, a population is the entire number of objects being studied. It is impossible to gather information on millions of subjects, so a random population sample is gathered and analyzed.

When the data is sorted and categorized, an analyst may want to determine how close the samples' average is to the entire population, so the confidence interval is calculated to determine how closely the sample's mean resembles the population's mean.  

## What Does a Confidence Interval Mean?

The confidence interval is a measurement of how accurate your sample's mean is in relation to the population's mean.

## What Is a Good Confidence Interval?

A 95% confidence interval is most often used because it narrows the width of the interval, and you have a 5% chance of being wrong. A 99% confidence interval gives you a 1% chance of being wrong, but your range would be much wider.

## What Does 0.05% Confidence Interval Mean?

The 0.05% value associated with a confidence interval of 95% is a sample's [P-value](https://www.investopedia.com/terms/p/p-value.asp)(significance level), which means an experiment's null hypothesis should not fall within the 95% confidence interval.

## The Bottom Line

Confidence intervals allow analysts to understand the likelihood that the results from statistical analyses are real or due to chance. When trying to make inferences or predictions based on a sample of data, there will be some uncertainty as to whether the results of such an analysis actually correspond with the real-world population being studied. The confidence interval depicts the likely range within which the true value should fall.