calculator.onl
Categories50

Single-sample confidence interval calculator

Calculate a Student t interval for one mean or a Wilson score interval for one binomial proportion.

A worked example

Hold the mean and standard deviation fixed. Watch the interval narrow as the sample grows.

x̄ / p̂53.7Lower limit49.0023Upper limit58.3977(U−L)/24.6977
Mode: Mean / Proportion

Confidence level: 90% / 95% / 99%

Number of observations represented by the sample mean and standard deviation. n: 2…1000000

Arithmetic mean of those observations. Mean: -1000000000000…1000000000000

Sample standard deviation calculated from the same observations. Standard deviation: 0…1000000000000

Updates as you type

Use a dot or comma for decimals. No thousands separators.

YOUR RESULT

x̄ / p̂

53.7

Calculated from your inputs

Lower limit49.0023
Upper limit58.3977
(U−L)/24.6977
t* / z*2.2622
df9
The numbers, at a glance

Calculations run in your browser.
UNDERSTAND THE RESULT

A little context. A clearer answer.

↑ Back to calculator

When this calculator is useful

For a mean, use df=n−1 and t critical value times s/√n. Wilson centers and half-widths depend on p=x/n and the squared normal critical value; the interval is not generally centered at p. The confidence level describes repeated-sampling coverage, not a posterior probability for this fixed interval. For a related calculation, try Welch and paired t-tests.

What to enter

InputWhat it meansExample value
ModeMode: Mean / ProportionMean
Confidence levelConfidence level: 90% / 95% / 99%95%
nNumber of observations represented by the sample mean and standard deviation. n: 2…1000000 10
MeanArithmetic mean of those observations. Mean: -1000000000000…1000000000000 53.7
Standard deviationSample standard deviation calculated from the same observations. Standard deviation: 0…1000000000000 6.567
nTotal number of trials in the proportion calculation. n: 1…1000000 —
xTrials counted as successes within that total. x: 0…1000000 —

How the calculation works

  1. Change the inputs to explore your own scenario. Mode: Mean / Proportion; Confidence level: 90% / 95% / 99%; n: 2…1000000 ; Mean: -1000000000000…1000000000000 ; Standard deviation: 0…1000000000000 ; n: 1…1000000 ; x: 0…1000000 .
  2. mean: x̄±t(1−α/2,n−1)s/√n; Wilson: [p+z²/(2n)±z√(p(1−p)/n+z²/(4n²))]/[1+z²/n]
  3. Two-sided 90%,95% or 99% intervals. Mean mode uses n, sample mean and sample standard deviation with divisor n−1. Requires independent representative observations; exact t coverage assumes a normal population. Proportion mode uses independent Bernoulli trials with common probability and the Wilson score method without continuity correction. Proportions are 0–1. No survey weights, finite-population correction, clustering, paired difference, prediction interval or guaranteed coverage for every finite sample.
The formulamean: x̄±t(1−α/2,n−1)s/√n; Wilson: [p+z²/(2n)±z√(p(1−p)/n+z²/(4n²))]/[1+z²/n]

A worked example

The NIST example uses a mean of 53.7, a sample standard deviation of 6.567 and ten observations. Its 95% interval is about 49.0 to 58.4 (49.0023 to 58.3977 before rounding). In proportion mode, 26 successes in 200 observations give a 95% Wilson interval of about 0.0903 to 0.1837. With zero successes its upper bound is still positive.

Example you can load

What to enter
Result for this example · x̄ / p̂53.7

This is a fixed example; changing the form above does not change these numbers.

Assumptions & limits

Two-sided 90%,95% or 99% intervals. Mean mode uses n, sample mean and sample standard deviation with divisor n−1. Requires independent representative observations; exact t coverage assumes a normal population. Proportion mode uses independent Bernoulli trials with common probability and the Wilson score method without continuity correction. Proportions are 0–1. No survey weights, finite-population correction, clustering, paired difference, prediction interval or guaranteed coverage for every finite sample.

Frequently asked questions

Which standard deviation belongs here?

The sample standard deviation calculated with divisor n−1.

Is the interval a range for a future observation?

No. It estimates a population mean or proportion.

Why does zero successes give a positive upper limit?

A finite sample with zero observed successes does not establish zero population probability.