📏 Confidence Interval Calculator
Confidence intervals for a mean (t or z, from summary stats or raw data) or a proportion (Wilson, Wald, exact), with the margin of error at any level.
| Sample mean | 50.00 |
|---|---|
| Sample SD (s) | 10.000 |
| Sample size | 25 |
| Standard error | 2.0000 |
| Critical value | t (df = 24) = 2.0639 |
| Margin of error | 4.1278 |
What Confidence Interval Calculator Does
This confidence interval calculator gives the range of plausible values for a population mean or proportion from your sample. For a mean, enter the sample mean, standard deviation and size — or paste the raw numbers and let it work them out. For a proportion, enter the number of successes and the sample size, such as 412 “yes” answers out of 1,000.
The result shows the interval, the margin of error, the standard error and the critical value used. Means use the t distribution unless you know the population standard deviation; proportions are shown three ways — Wilson score, Wald and exact Clopper–Pearson — so you can see when the simple method breaks down. An optional population size applies the finite population correction for surveys of a small group.
How to Use Confidence Interval Calculator
- Choose a mean from summary statistics, a mean from raw data, or a proportion
- Enter the mean, standard deviation and sample size — or paste your data, or successes and sample size
- Pick the confidence level, such as 95%
- Add the population size if you sampled a large share of it
- Read the interval, margin of error and critical value
Formula Used by Confidence Interval Calculator
Interval for a mean
CI = x̄ ± t(α/2, n − 1) × s ÷ √n
Worked example
The ten sample values in the raw-data box: mean 13.3, s = 1.054, 95% confidence.
- Standard error = 1.054 ÷ √10 = 0.333
- t with 9 df = 2.262
- Margin = 2.262 × 0.333 = 0.754
Result: 95% CI: 12.55 to 14.05.
Wilson score interval for a proportion
(p̂ + z²/2n ± z√(p̂(1 − p̂)/n + z²/4n²)) ÷ (1 + z²/n)
Worked example
40 successes out of 100, 95% confidence (z = 1.96).
- p̂ = 0.40
- Wilson: 30.9% to 49.8%
- Wald for comparison: 40% ± 9.6 = 30.4% to 49.6%
Result: With this many successes and failures the two agree closely; they diverge for small samples.
Critical Values by Confidence Level
| Confidence | z | t (9 df, n = 10) | t (29 df, n = 30) |
|---|---|---|---|
| 80% | 1.282 | 1.383 | 1.311 |
| 90% | 1.645 | 1.833 | 1.699 |
| 95% | 1.960 | 2.262 | 2.045 |
| 98% | 2.326 | 2.821 | 2.462 |
| 99% | 2.576 | 3.250 | 2.756 |
| 99.9% | 3.291 | 4.781 | 3.659 |
Poll Margin of Error (95%, Result Near 50%)
| Sample size | Margin of error |
|---|---|
| 100 | ± 9.8 points |
| 400 | ± 4.9 points |
| 1,000 | ± 3.1 points |
| 2,500 | ± 2.0 points |
| 10,000 | ± 1.0 point |
How to Read Your Result
Reading an interval
An interval of 45.9 to 54.1 says the data are consistent with any population mean in that range. If a value you care about — a target, an earlier result, a difference of zero — falls outside a 95% interval, the data are evidence against it at the 5% level, the same conclusion a two-tailed test at α = 0.05 would reach.
Wide interval? Collect more data
A wide interval means the estimate is imprecise. Halving the margin of error takes four times the sample, so use the sample size calculator to plan how many observations reach the precision you need before collecting more.
Proportions near 0% or 100%
With 2 successes out of 40, the Wald interval would run below zero and has to be cut off, while Wilson gives a sensible 1.4% to 16.5%. When there are fewer than 10 successes or failures, the calculator warns you that the Wald interval is unreliable.
Limitations & Accuracy Notes
- Intervals assume a random sample; they cannot correct for biased sampling or non-response.
- The t interval assumes the data are roughly normal, or the sample is large enough for the mean to be; strongly skewed small samples need other methods.
- Intervals for the difference between two groups are not covered.