Confidence Interval Calculator
Enter the sample mean, standard deviation and sample size to find a confidence interval for the population mean.
What this tool does
This tool calculates a confidence interval for a population mean from the sample mean, standard deviation and sample size. Choose a confidence level from 80% to 99.9%; the result shows the standard error, critical value and each calculation step. It uses the t distribution with n − 1 degrees of freedom when the population standard deviation is unknown, and the z distribution when it is known.
What is a confidence interval?
A confidence interval is a range estimated from a sample for a population mean. It is calculated as the sample mean ± critical value × standard error, where the standard error = s ÷ √n (s is the sample standard deviation and n is the sample size). Use a z value when the population standard deviation is known, and a t value when it is unknown and the sample is small.
FAQ
What is a confidence interval?
A confidence interval is a range estimated from sample data using a statistical method to estimate a population parameter. Its calculation depends on the model and assumptions used.
How should I interpret a 95% confidence interval?
If the same sampling method were repeated and an interval built from each sample, about 95% of those intervals would contain the population value in the long run. This does not mean there is a 95% probability that the value lies in this particular calculated interval.
When should I use a z value or a t value?
A z value is generally used when the population standard deviation is known. A t value is generally used when it is unknown, especially with a small sample. Common two-sided z critical values are about 1.645 at 90%, 1.96 at 95%, and 2.576 at 99%. For larger samples, the t distribution approaches the z distribution; choose based on the data and analysis assumptions.
How does sample size affect interval width?
With other conditions held constant, the standard error for a mean is proportional to 1/√n, so increasing the sample size narrows the interval. Roughly four times as many observations are needed to halve its width.
How is a confidence interval related to sample size planning?
When planning a survey, use a sample size calculator to estimate the required n from the desired confidence level and margin of error. The needed number also depends on population size, variability, and sampling design.