Confidence Limits for a Mean Calculator

Offline — showing the version cached on .

Show all explainers, focus on one, or collapse them. You can also open or close each section directly.

Results

Lower confidence limit is 9.258. Upper confidence limit is 9.265.

Lower confidence limit
Upper confidence limit
Find
Did this solve your problem?

How to use this calculator

  1. Enter Sample mean
    Enter the mean calculated from your sample. It is the center value used to place the two limits. 1
  2. Enter Sample standard deviation
    Enter the sample's standard deviation, a measure of how spread out its values are. The calculation uses it to set the distance from the mean to each limit. 1
  3. Enter Sample size
    Enter the number of observations in your sample. The calculation uses this value to determine degrees of freedom and scale the sample spread. 1
  4. Enter Confidence level
    Enter the desired confidence level as a percentage. The calculation uses it to choose the t percentile for the interval. 1
  5. Read Upper confidence limit

Upper confidence limit () vs Sample mean ()

100000-100000-100000100000

Upper confidence limit () Sample mean ()

What this calculates

Use this page to examine an interval around a mean estimated from sample data. Its limits give you a range to consider when judging the estimate. 1

A confidence interval gives you two limits for the mean rather than one estimate. The sections below explain the calculation and how to read its results. 1

What the interval tells you

The lower and upper confidence limits mark the ends of an interval for the mean. The interval computed from a sample either contains the true mean or does not. Its limits give you a range to consider instead of a single estimate. 1

How the limits are computed

lower limit = sample mean − t₁₋α/₂, N₋₁ × s/√N upper limit = sample mean + t₁₋α/₂, N₋₁ × s/√N 1

The t value is the 100(1 − α/2) percentile of the t distribution with N − 1 degrees of freedom. The confidence coefficient is 1 − α. 1

Here, N is the sample size, s is the sample standard deviation, and the sample mean is the center of the two limits. A narrower interval gives a more precise estimate. 1

Choosing a confidence level

The confidence coefficient is one minus the significance level, written as 1 − α. The t percentile in the calculation comes from the corresponding tail probability and degrees of freedom. In practice, 90%, 95%, and 99% intervals are often used, with 95% most common. 1

Reading interval width

Compare the distance between the limits to see how wide the interval is. A narrower interval means a more precise estimate of the mean. The formula makes the interval depend on the sample spread, sample size, and chosen confidence level. 1

Worked examples

NIST example — 95% confidence interval: Lower confidence limit 9.258

See inputs and calculation

Starting values

Sample mean
9.26146
Sample standard deviation
0.022789
Sample size
195
Confidence level
95 %
    1. Lower confidence limit: 9.258
      Show arithmetic
      9.261 - t_ppf(1 - (1 - 95 / 100) / 2, 195 - 1) * (0.0228 / 195 ^ 0.5)
    2. Upper confidence limit: 9.265
      Show arithmetic
      9.261 + t_ppf(1 - (1 - 95 / 100) / 2, 195 - 1) * (0.0228 / 195 ^ 0.5)
    Original example and source context

    The published example row is included as source context beneath the calculator's computed stages. “9.26146, 0.022789, 195, 95 % → 9.258242 (lower confidence limit); 9.264679 (upper confidence limit)” 1

    Questions to consider

    Use the interval to consider what estimate is reasonable, how much variability the estimate has, and whether a target falls within the limits. These are questions the confidence limits are designed to help you examine. 1

    Key facts

    • The confidence coefficient equals 1 − α, where α is the significance level. 1 1
    • The t percentile uses sample size minus one degrees of freedom. 1 1
    • A confidence interval provides two limits for the mean. 1 1

    How this is calculated

    Compute a two-sided Student t confidence interval from the sample mean, sample standard deviation, sample size, and confidence level. NIST defines the interval using a t-distribution percentile with N − 1 degrees of freedom. The percentile is found numerically, and the endpoints are the mean plus or minus that critical value times the standard error.

    Lower confidence limit

    sample_mean - t_ppf(1 - (significance_level) ÷ 2, degrees_of_freedom) × (sample_standard_deviation ÷ sample_size ^ 0.5)
    • degrees_of_freedom = Degrees of freedom
    • significance_level = Significance level
    • sample_mean = Sample mean ()
    • sample_standard_deviation = Sample standard deviation ()
    • sample_size = Sample size ()
    • t_ppf = the t value with this probability at or below it, for these degrees of freedom
    Understand each part

    These names are shorthand for the exact calculations below, not different formulas.

    1. Degrees of freedom (degrees_of_freedom)

      Sample size minus one, as used for the t distribution.

      See the definition of degrees_of_freedomsample_size - 1
    2. Significance level (significance_level)

      One minus the confidence coefficient.

      See the definition of significance_level1 - confidence_level / 100
    3. Standard error (standard_error)

      Sample standard deviation divided by the square root of the sample size.

      See the definition of standard_errorsample_standard_deviation / sqrt(sample_size)
    Follow the calculation with your values
    1. Lower confidence limit: 9.258
      Show arithmetic
      9.261 - t_ppf(1 - (1 - 95 / 100) / 2, 195 - 1) * (0.0228 / 195 ^ 0.5)
    2. Upper confidence limit: 9.265
      Show arithmetic
      9.261 + t_ppf(1 - (1 - 95 / 100) / 2, 195 - 1) * (0.0228 / 195 ^ 0.5)
    Full formulas, symbols and sources

    lower_bound = sample_mean - t_ppf(1 - (1 - confidence_level / 100) / 2, sample_size - 1) * (sample_standard_deviation / sample_size ^ 0.5)

    Upper confidence limit

    upper_bound = sample_mean + t_ppf(1 - (1 - confidence_level / 100) / 2, sample_size - 1) * (sample_standard_deviation / sample_size ^ 0.5)

    sample_mean
    Sample mean ()
    sample_standard_deviation
    Sample standard deviation ()
    sample_size
    Sample size ()
    confidence_level
    Confidence level (%)
    lower_bound
    Lower confidence limit
    upper_bound
    Upper confidence limit
    t_ppf
    the t value with this probability at or below it, for these degrees of freedom

      Frequently asked questions

      What is a reasonable estimate for the mean?
      The interval gives you a lower and upper limit to use when considering an estimate. The source frames this as a question about the mean, rather than naming one limit as the answer. 1
      How much variability is there in the estimate of the mean?
      The interval's width helps you judge precision: a narrower interval means a more precise estimate. The limits show the range around the estimate produced from the sample. 1
      Does a given target value fall within the confidence limits?
      Compare the target with both limits. It falls within the confidence limits when it is between the lower and upper limits. 1
      What does the t percentile represent?
      It is the percentile of the t distribution selected for the interval's tail probability. The distribution uses the sample size minus one as its degrees of freedom. 1
      Does the interval always contain the true mean?
      A particular interval from a sample either contains the true mean or it does not. The source does not say that every computed interval contains it. 1
      Which confidence levels are often used?
      The source identifies 90%, 95%, and 99% as commonly used levels. It says 95% is the most commonly used among them. 1

      Limitations & common mistakes

      • The page's own choice is to accept Sample mean from -100000 to 100000 and Sample standard deviation from 0.000001 to 100000; these endpoints are not limits of the formula.
      • The page's own choice is to accept Sample size from 2 to 10000 and Confidence level from 80 to 99.9%; these endpoints are not limits of the formula.
      • The confidence limits use the t distribution with N − 1 degrees of freedom.
      • The results are computed from the numbers you enter and are only as exact as those numbers; they are not a substitute for a measurement or for a professional's judgement where one is required.

      Formula, sources, and review

      This calculation follows the formula published on this page and rests on 1 cited sources, listed under Sources below. Last checked .

      How we review

      Sources & methodology

      ConstantValueUnitSource
      confidence_limits_for_mean_c121

      Sources

      • 1 Confidence Limits for the Mean — last verified