Confidence Interval Calculator


$n$ =   =   =
$\text{Confidence Level:}$ %
Example 1Example 2
Sample Size
=   $E$ =
$\text{Confidence Level:}$ %
Example 1Example 2

How it Works:

A confidence interval is made up of two parts, the point estimate and the margin of error. The point estimate is simply the sample statistic corresponding to the population parameter of interest. So, if we're constructing a confidence interval for the population mean ($\mu$), we use the sample mean ($\bar{x}$). Since the sample mean is easy to calculate, the focus will be on finding the margin of error. The formula we use to compute the margin of error depends on whether the population standard deviation ($\sigma$) is known or unknown. To change from $\sigma$ known to $\sigma$ unknown, click on $\boxed{\sigma}$ and select $\boxed{s}$ in the Confidence Interval Calculator.

$\sigma$ Known $\sigma$ Unknown
Margin of Error $ z_{\alpha/2} \dfrac{\sigma}{\sqrt{n}} $ $ t_{\alpha/2} \dfrac{s}{\sqrt{n}} $

In order to find $ z_{\alpha/2} $ (or $ t_{\alpha/2} $), we must first find the value of $\alpha/2$. We start by setting 1 - $\alpha$ equal to the confidence coefficient. The confidence coefficient is simply the decimal form of the confidence level. So, for example, if the confidence level is 95%, the confidence coefficient is .95. The next step is to solve for $\alpha/2$. So, continuing with our example, we would have 1 - $\alpha$ = .95 and find the value of $\alpha/2$ to be .025. The most commonly used confidence level is 95% while 90% and 99% are also popular. To change the confidence level, click on $\boxed{95\%}$.

Confidence Level Confidence Coefficient
99% .99
95% .95
90% .90

Now that we know the value of $\alpha/2$, we can find $ z_{\alpha/2} $ (or $ t_{\alpha/2} $). We can get $ z_{\alpha/2} $ by finding the z-value that provides an area of $\alpha/2$ in the upper tail of the z-distribution. Similarly, $ t_{\alpha/2} $ is the t-value that provides an area of $\alpha/2$ in the upper tail of the t-distribution. If $\sigma$ is known and we're using the z distribution, it is useful to calculate the area to the left since that is what the z-table gives us. The t-table gives us the upper tail area but the particular t-distribution depends on the degrees of freedom, which is simply one less than the sample size (degrees of freedom = n - 1).


Finally, we can put the point estimate and margin of error together to make the confidence interval. The confidence interval is created by adding and subtracting the margin of error from the point estimate. If $\sigma$ is known, the confidence interval will be given by $\bar{x} \pm z_{\alpha/2} \frac{\sigma}{\sqrt{n}}$. If $\sigma$ is unknown, the confidence interval will be given by $\bar{x} \pm t_{\alpha/2} \frac{s}{\sqrt{n}}$. The confidence interval gives a range of values the population parameter is likely to be in. The likeliness that the interval contains the parameter is determined by the confidence level.


If we're constructing a confidence interval of the population proportion, we use the sample proportion. The confidence interval is created by adding and subtracting the margin of error from the point estimate. Since the sample mean and sample proportion are easy to calculate, the focus will be on finding the margin of error. To switch from confidence intervals about the population mean to the population proportion, click on $\boxed{\bar{x}}$ and select $\boxed{\bar{p}}$.

Population Proportion
Margin of Error $ z_{\alpha/2} \sqrt{\dfrac{\bar{p}(1-\bar{p})}{n}} $