A little context. A clearer answer.
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
| Input | What it means | Example value |
|---|---|---|
| Mode | Mode: Mean / Proportion | Mean |
| Confidence level | Confidence level: 90% / 95% / 99% | 95% |
| n | Number of observations represented by the sample mean and standard deviation. n: 2…1000000 | 10 |
| Mean | Arithmetic mean of those observations. Mean: -1000000000000…1000000000000 | 53.7 |
| Standard deviation | Sample standard deviation calculated from the same observations. Standard deviation: 0…1000000000000 | 6.567 |
| n | Total number of trials in the proportion calculation. n: 1…1000000 | — |
| x | Trials counted as successes within that total. x: 0…1000000 | — |
How the calculation works
- 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 .
- mean: x̄±t(1−α/2,n−1)s/√n; Wilson: [p+z²/(2n)±z√(p(1−p)/n+z²/(4n²))]/[1+z²/n]
- 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.
mean: 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 enterThis 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.