Confidence Interval Calculator
Enter your sample mean, standard deviation, sample size and confidence level to find the confidence interval for the mean.
A confidence interval gives a range that likely contains the true population mean. It equals the sample mean plus or minus a margin of error, where the margin is a z-value times the standard error (SD รท โn). For a mean of 100 with SD 15, n = 25, at 95% confidence, the margin is 1.96 ร 3 = 5.88, giving an interval of 94.12 to 105.88.
How to Use This Calculator
Enter your sample mean, the standard deviation, and the sample size n, then choose a confidence level of 90%, 95% or 99%. The calculator returns the confidence interval for the population mean along with the margin of error and standard error in the working.
Use the standard deviation from your sample (or the known population value if you have it). A 95% level is the most common default. Higher confidence (99%) produces a wider interval; lower confidence (90%) a narrower one โ you trade certainty against precision.
How the Calculation Works
The interval is centered on the sample mean and extends a margin of error in each direction. The margin equals a critical z-value times the standard error of the mean. The standard error, SD รท โn, captures how much sample means bounce around the true mean โ it shrinks as the sample grows. The z-value comes from the standard normal distribution for the chosen confidence: 1.645 for 90%, 1.960 for 95%, and 2.576 for 99%. Multiplying them gives the half-width of the interval.
Worked Example
A sample of n = 25 has a mean of 100 and a standard deviation of 15, and you want a 95% confidence interval. Standard error = 15 รท โ25 = 15 รท 5 = 3. Margin of error = 1.96 ร 3 = 5.88. The interval is 100 ยฑ 5.88, or from 94.12 to 105.88. If you raised the confidence to 99%, the margin would grow to 2.576 ร 3 = 7.73, widening the interval to 92.27โ107.73.
What the Result Means
A 95% confidence interval means that if you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true population mean. It is a statement about the procedure's long-run reliability, not a 95% probability that the true mean lies in this particular interval. A narrower interval means a more precise estimate; you narrow it by collecting a larger sample or accepting lower confidence. The margin of error is the ยฑ number reporters often quote in polls.
Assumptions and Limitations
This calculator uses the normal (z) interval, which is appropriate when the sample size is reasonably large (often n โฅ 30) or the population standard deviation is known and the data is roughly normal. For small samples with an estimated standard deviation, the t-distribution is technically more accurate and gives a slightly wider interval. The interval also assumes a random, independent sample; bias in how data was collected is not fixed by any interval. Results are exact given your inputs and the tabulated z-values.
When to Use a Confidence Interval Calculator
Students and researchers use this to build a confidence interval for a mean from the sample mean, standard deviation, and size. Run it to report a margin of error, judge how precise an estimate is, or complete a statistics assignment. Enter your figures and confidence level to get the interval.
Related Calculators
Inverse Normal (InvNorm) Calculator
Find the z-score or value for a given probability.
Open calculator โSample Variance Calculator
Sample and population variance and standard deviation from data.
Open calculator โStandard Deviation Calculator
Get sample and population standard deviation from a list of numbers.
Open calculator โZ-Score Calculator
Convert a value to a standard score using the mean and standard deviation.
Open calculator โFrequently Asked Questions
What does a 95% confidence interval mean?
It means that if you repeated the study many times, about 95% of the intervals you construct would contain the true population mean. It reflects the reliability of the method, not a probability for one specific interval.
What is the margin of error?
It is the ยฑ part of the interval โ the critical z-value times the standard error. It sets how far the interval extends on each side of the sample mean. A smaller margin means a more precise estimate.
Why does a higher confidence level widen the interval?
To be more confident of capturing the true mean, you must allow a wider range. The z-value grows from 1.645 (90%) to 1.96 (95%) to 2.576 (99%), enlarging the margin of error.
How can I make my confidence interval narrower?
Increase the sample size, which shrinks the standard error (SD รท โn), or accept a lower confidence level. Reducing variability in your data also helps.
Should I use z or t for the interval?
Use z when the sample is large (roughly n โฅ 30) or the population standard deviation is known. For small samples with an estimated SD, the t-distribution is more accurate and gives a slightly wider interval.
What z-value goes with each confidence level?
1.645 for 90%, 1.960 for 95%, and 2.576 for 99% confidence. These are the critical values from the standard normal distribution used in the margin of error.
Looking for a different calculator?
CalculatorPlus has free tools across finance, construction, math, health and more โ each one showing the formula and a worked example.