U

Confidence Interval Calculator

Compute a confidence interval for a sample mean from sample size, sample mean, standard deviation and confidence level, with margin of error and bounds.
Sample statistics
100
110000
100
-500500
15
0.1100
Confidence level

Confidence Interval

Breakdown

Interval width
0

Key Assumptions

  • The sample mean is assumed to follow a normal distribution, which holds for the central limit theorem when the sample is large or when the underlying population is normal.
  • The standard deviation is treated as the population standard deviation, or as the sample standard deviation when the sample size is greater than 30.
  • The confidence level selects a critical z-value from the standard normal distribution; the interval is symmetric around the sample mean.
  • A 95% confidence interval means that in repeated sampling roughly 95% of intervals built this way will contain the true mean, not that any single interval has a 95% chance of containing it.
  • For small samples with an unknown standard deviation, a t-distribution would be more accurate than the z-based interval shown here.

Formula Used

Confidence interval = X-bar ± z x (sigma / sqrt(n)) margin of error = z x (sigma / sqrt(n)) lower bound = X-bar - margin; upper bound = X-bar + margin where z is the critical value for the chosen confidence level.
Embed this calculator on your website

Add this embed page to your site — visitors use the calculator right from your page.

Statistics has an uncomfortable habit of answering questions with ranges instead of single numbers, and the confidence interval is the most famous example. When you measure a sample, you get a sample mean, but the true population mean remains unknown, and a confidence interval tells you how wide a net you must cast to catch it with a chosen level of reliability. The Confidence Interval Calculator below does exactly that: enter your sample size, sample mean, standard deviation and confidence level, and it returns the margin of error plus the lower and upper bounds in one pass.

Confidence Interval for a Sample Mean

Every sample is a snapshot, and different samples from the same population give different means. The confidence interval formalizes that scatter. It is built around the sample mean using the standard error, which is the standard deviation divided by the square root of the sample size, multiplied by a critical value that reflects how confident you want to be. The formula produces a symmetric band: the lower bound is the mean minus the margin of error, and the upper bound is the mean plus the same distance. The interval is your best description of where the population mean probably sits.

CI = X̄ ± z × (σ / √n)

With the defaults loaded, a sample of 100 observations with a mean of 100 and a standard deviation of 15 gives a margin of error of 2.94 at 95 percent confidence, so the interval runs from 97.06 to 102.94. If you move the confidence level up to 99 percent, the critical value grows to 2.576 and the interval widens to roughly 96.14 to 103.86. The trade-off is built into the numbers: more confidence always costs precision.

What Is the Margin of Error?

The margin of error is the step you take away from the sample mean in both directions, and it is the single number people quote when they describe a poll or survey. It equals the critical z-value multiplied by the standard error of the mean. The margin grows when you ask for a higher confidence level, because the critical value increases, and it shrinks when your sample grows, because the standard error falls. A margin of 2.94 at 95 percent confidence, for instance, means the true mean is expected to lie within 2.94 units of the sample mean, provided the assumptions hold.

What Does a 95% Confidence Level Really Mean?

The phrase invites a tempting but wrong reading: that each individual interval has a 95 percent chance of containing the true mean. That is not what it means. The confidence level describes the procedure over many repetitions. If you drew one hundred samples and built a 95 percent confidence interval from each, about ninety-five of those intervals would capture the true mean and about five would miss it. For any one interval you cannot attach a probability, because the true mean is either inside it or it is not. The level is a guarantee about the method, not about the result in your hands. This distinction, subtle as it sounds, is the single most misunderstood idea in introductory statistics and the one reviewers check for first.

How to Interpret Lower and Upper Bounds

The lower and upper bounds are the two ends of the interval, and they are the part of the result that actually describes your population. If a study reports that a treatment effect is 4.0 with a 95 percent confidence interval from 1.5 to 6.5, the meaningful summary is that the plausible range for the effect sits entirely above zero. If the interval crosses zero, from minus 1.0 to plus 2.0, then a zero effect remains plausible and the result is not statistically convincing. Practitioners are taught to focus on the interval itself rather than the point estimate, because the interval encodes both the best estimate and the uncertainty around it.

Choosing the Right Z-Value

Each confidence level maps to a critical z-value taken from the standard normal distribution. The select menu in this calculator stores them directly, so you never have to look them up. The common ones to know are 1.645 for 90 percent, 1.960 for 95 percent, and 2.576 for 99 percent. The 95 percent figure is the research default because it balances reasonable confidence with reasonable width, but the right level depends on the stakes: higher-stakes decisions may justify a wider, more conservative interval, while exploratory work may accept a narrower one.

Standard Error and Sample Size

The standard error of the mean is the standard deviation divided by the square root of the sample size, and it is the statistical engine behind the whole calculation. Because the square root sits in the denominator, precision improves slowly: quadrupling your sample only halves the standard error and therefore the margin of error. This is why moving from a sample of 100 to 400 observations narrows the interval far less than the cost of the data might suggest, and why sample-size planning exists as a field at all. Larger samples buy precision at a diminishing rate.

Z or t? Know the Difference

This calculator uses the z-distribution, which is exact when the population standard deviation is known, and a close approximation when the sample is large enough that the sample standard deviation stands in reliably, conventionally more than 30 observations. When the standard deviation is unknown and the sample is small, the t-distribution is the correct tool, because its wider tails compensate for the uncertainty in estimating sigma. As sample size climbs, the two distributions converge, which is why the distinction matters most for small samples and fades for large ones.

Confidence Intervals in Research and Polling

Confidence intervals appear wherever an estimate is reported with uncertainty. Election polls publish margins of error so readers can judge how close a race really is. Clinical trials report confidence intervals around treatment effects so doctors can see whether a benefit could be clinically meaningful. Quality control uses control charts derived from the same logic to flag processes drifting outside expected limits. In every case the interval is doing the same job: translating the scatter of a sample into an honest statement about the population it represents.

Worked Example: Sampling a Production Line

Imagine a factory that fills cereal boxes and wants to check the average fill weight. An inspector weighs 64 randomly chosen boxes, finding a mean of 500 grams with a standard deviation of 24 grams. At 95 percent confidence the critical value is 1.96, and the standard error is 24 divided by the square root of 64, which is 3 grams. The margin of error is therefore 1.96 times 3, or about 5.88 grams, and the 95 percent confidence interval for the true average fill weight runs from 494.12 to 505.88 grams.

The same numbers locked into a 99 percent confidence level would use a critical value of 2.576, widening the interval to roughly 492.27 to 507.73 grams. Now the inspector can act: if the label promises at least 495 grams, the lower end of the 95 percent interval barely covers it, signalling that the line is close to the limit and worth a look. That reading only comes from the interval, because the sample mean of 500 grams alone looks fine. This is the practical payoff that makes confidence intervals a working tool rather than a classroom exercise.

Common Mistakes

  • Reading a 95 percent confidence level as the probability that this particular interval contains the true mean.
  • Using the z-interval for a small sample when the population standard deviation is unknown and the t-distribution is required.
  • Entering the sample standard deviation without checking whether the sample is large enough to justify it.
  • Confusing the standard deviation of the data with the standard error of the mean, which are different by a factor of the square root of n.
  • Reporting the point estimate without its interval, which hides all the uncertainty.
  • Assuming a wider interval means the data are worse, when it may simply reflect a higher confidence level.

Key Assumptions

  • The sample mean follows a normal sampling distribution, which the central limit theorem supports for large samples or normal populations.
  • The standard deviation entered is the population value, or a close sample estimate when the sample exceeds 30.
  • The interval is symmetric around the sample mean, which is correct for the normal approximation.
  • The confidence level selects the critical z-value used in the margin of error.
  • Small samples with unknown standard deviation would need a t-distribution for an accurate interval.

Confidence intervals trade a single number for a slightly more honest package: an estimate plus an honest measure of how much it can be trusted. Enter your sample statistics, choose the confidence level your decision demands, and the calculator hands you the margin of error and bounds that belong in your report.

Disclaimer

Results are provided as estimates for informational purposes only and may be inaccurate. Always verify outcomes with a qualified professional before making financial or personal decisions based on these calculations.

FAQs

Related Calculators