CCalculate.Studio

📏 Confidence Interval Calculator

A confidence interval expresses the uncertainty in a sample mean as a range of plausible values for the population mean. This calculator builds a z-based interval from your sample mean, standard deviation, sample size and chosen confidence level (90%, 95% or 99%). For example, a sample of 100 with mean 50 and standard deviation 8 gives a 95% confidence interval of 48.432 to 51.568.

Последняя проверка: 2026-07-07

Ваши данные

Результаты

Confidence interval48.432 – 51.568
Margin of error1,57
Standard error0,8

Understanding your confidence interval

The width of the interval reflects the precision of the estimate. The table below shows how the interval for the example (mean 50, sd 8, n = 100) changes with the confidence level.

Confidence levelz valueMargin of errorInterval
90%1.64491.31648.684 - 51.316
95%1.961.56848.432 - 51.568
99%2.57582.06147.939 - 52.061
  • Higher confidence produces a wider interval: certainty is bought with precision.
  • This is a z-based interval. For small samples (n below about 30) with the standard deviation estimated from the data, Student's t-distribution gives a more accurate, slightly wider interval.
  • The interval assumes the sample is a simple random sample and, for small n, that the underlying data are approximately normal. Biased sampling invalidates the interval regardless of its width.
  • Quadrupling the sample size halves the width of the interval, since the standard error scales with 1 / sqrt(n).

What is a confidence interval?

A confidence interval is a range calculated from sample data that is designed to contain the true population parameter — here, the population mean — with a stated long-run success rate. A 95% confidence level means that if the same sampling procedure were repeated many times, about 95% of the intervals constructed this way would contain the true mean.

The interval is centered on the sample mean and extends one margin of error in each direction. The margin of error is the critical value (z) multiplied by the standard error of the mean, and the standard error is the standard deviation divided by the square root of the sample size. Larger samples shrink the standard error, and therefore the interval, in proportion to the square root of n: quadrupling the sample size halves the interval width.

The correct reading of a 95% interval is a statement about the procedure, not about any single interval: it is not strictly correct to say there is a 95% probability that the true mean lies inside this particular interval — the true mean is a fixed value, and each computed interval either contains it or does not. The 95% refers to how often the method succeeds across repeated samples.

How to use this confidence interval calculator

  1. Enter the sample mean — the average of your measured values.
  2. Enter the standard deviation. Use the sample standard deviation (n - 1 form) computed from your data, or the population value if it is known.
  3. Enter the sample size n (at least 2) and choose a confidence level: 90%, 95% or 99%.
  4. Read the interval, the margin of error and the standard error. For small samples (commonly n below 30) with unknown population standard deviation, note that a t-based interval is slightly wider and more accurate.

The confidence interval formula

CI = mean +/- z x (sd / sqrt(n))
Standard error: SE = sd / sqrt(n)
Margin of error: MOE = z x SE
z values: 1.6449 (90%), 1.96 (95%), 2.5758 (99%)
Example: 50 +/- 1.96 x (8 / sqrt(100)) = 50 +/- 1.568 = 48.432 to 51.568

The z-based interval for a mean is: sample mean plus or minus z multiplied by (standard deviation / sqrt(n)). The z critical values are 1.6449 for 90%, 1.96 for 95% and 2.5758 for 99% — the points of the standard normal distribution that leave the corresponding total probability in the two tails.

Worked example: mean 50, standard deviation 8, n = 100, 95% confidence. Step 1 — standard error: 8 / sqrt(100) = 8 / 10 = 0.8. Step 2 — margin of error: 1.96 x 0.8 = 1.568. Step 3 — interval: 50 - 1.568 = 48.432 and 50 + 1.568 = 51.568, so the 95% confidence interval is 48.432 to 51.568.

This calculator uses the standard normal (z) distribution, which is appropriate when the population standard deviation is known or the sample is reasonably large. When the sample is small (commonly n below 30) and the population standard deviation is estimated from the sample, Student's t-distribution with n - 1 degrees of freedom gives a slightly wider, more accurate interval; the difference fades as n grows.

Common mistakes

  • Interpreting a 95% interval as '95% of the data lie in this range' — the interval describes uncertainty about the mean, not the spread of individual observations.
  • Saying there is a 95% probability the true mean is in this specific interval; the 95% describes the long-run success rate of the procedure across repeated samples.
  • Using the z interval for a small sample with an estimated standard deviation, where the t-distribution is the appropriate choice.
  • Entering the standard error instead of the standard deviation — the calculator divides by sqrt(n) itself.

Часто задаваемые вопросы

How do I calculate a 95% confidence interval?

Compute the standard error (standard deviation divided by the square root of the sample size), multiply it by 1.96 to get the margin of error, and add and subtract that margin from the sample mean. Example: mean 50, sd 8, n = 100 gives SE = 0.8, margin 1.568, and an interval of 48.432 to 51.568.

What does a 95% confidence level actually mean?

It describes the long-run performance of the method: if you repeatedly drew samples of the same size and built an interval from each, about 95% of those intervals would contain the true population mean. Any single interval either contains the true mean or it does not — the 95% is a property of the procedure, not of one interval.

When should I use the t-distribution instead of z?

Use Student's t-distribution when the sample is small (a common rule of thumb is n below 30) and the population standard deviation is unknown and estimated from the sample. The t-distribution has heavier tails, producing a slightly wider interval that correctly accounts for the extra uncertainty; with larger samples the t and z intervals become practically identical.

How can I make my confidence interval narrower?

Three ways: increase the sample size (the width shrinks in proportion to 1 / sqrt(n), so quadrupling n halves the width), accept a lower confidence level (a 90% interval is narrower than a 99% one), or reduce measurement variability so the standard deviation itself is smaller.

What is the difference between standard error and standard deviation?

The standard deviation measures the spread of individual observations around the mean. The standard error measures the uncertainty of the sample mean itself, and equals the standard deviation divided by sqrt(n). As the sample grows, the standard deviation stabilizes near its population value while the standard error keeps shrinking toward zero.

Источники

  1. National Institute of Standards and Technology (NIST). NIST/SEMATECH e-Handbook of Statistical Methods, Section 7.1: Confidence intervals. nist.gov.
  2. Moore DS, McCabe GP, Craig BA. Introduction to the Practice of Statistics. W. H. Freeman (confidence intervals for a mean; z vs t procedures).
  3. Student (Gosset WS). The probable error of a mean. Biometrika 1908; 6(1): 1-25 (origin of the t-distribution).

Статистика · Все калькуляторы

Похожие калькуляторы

Guides & articles