Confidence Interval Calculator
Math Calculators
Calculate confidence intervals for a population mean using z or exact-degree-of-freedom Student-t critical values at 90%, 95%, and 99% confidence.
Paste your raw observations into the Statistics Calculator, then copy its Mean result into this field. Keep the observations in the same units used here.
Paste the sample observations into the Statistics Calculator, select Sample under Standard deviation type, and copy the Std Dev result.
Paste the sample observations into the Statistics Calculator and copy its Count result. Check any invalid-token warning before using the count.
Confidence Interval
[46.2659, 53.7341]
Margin of Error
+-3.7341
Critical Value
2.0452
Std Error
1.8257
What is a confidence interval?
A confidence interval (CI) gives a range of values within which the true population parameter is expected to fall with a given probability. A 95% CI means: if you repeated the sampling 100 times, about 95 of the resulting intervals would contain the true value.
CI = x̄ ± z × (σ / √n)
where:
x̄ = sample mean
z = z-score for confidence level
σ = standard deviation
n = sample size
This calculator uses the entered sample standard deviation to compute the standard error
s / √n. When the t option is selected, it calculates the two-tailed
Student’s t critical value for the exact n − 1 degrees of freedom by numerically
inverting the Student’s t distribution. It does not round the degrees of freedom up to a nearby
table row, which would make an interval too narrow.
Common z-scores
| Confidence level | z-score |
|---|---|
| 90% | 1.645 |
| 95% | 1.960 |
| 99% | 2.576 |
Wider vs. narrower intervals
Larger sample sizes and lower confidence levels produce narrower (more precise) intervals. Smaller samples or higher confidence levels (e.g., 99%) produce wider intervals. There is always a tradeoff between precision and confidence.
When to use Student's t-distribution instead of z
The z-distribution assumes you know the population standard deviation and/or have a large sample (n ≥ 30). When the sample size is small (n < 30) and the population standard deviation is unknown, use the Student's t-distribution with n−1 degrees of freedom. The t-distribution has heavier tails than the normal distribution, producing wider intervals that account for the additional uncertainty of a small sample. As n increases, the t-distribution converges to the z-distribution.
For example, a sample size of 12 has 11 degrees of freedom. At 95% confidence its t critical value is about 2.201, rather than the 2.131 value for 15 degrees of freedom. Using the exact value produces the appropriately wider interval. The z option remains available when the population standard deviation is known or a normal approximation is justified.
Common misinterpretation
A 95% confidence interval does not mean "there is a 95% probability that the true population parameter lies in this interval." The parameter is fixed (not random); it either is or isn't in the interval. The correct frequentist interpretation: if you repeated this study an infinite number of times and computed a 95% CI each time, approximately 95% of those intervals would contain the true parameter. This is a subtle but important distinction. The Bayesian equivalent - a 95% credible interval - does support the probabilistic interpretation.
Sample size planning
To achieve a desired margin of error E at confidence level zα/2 with estimated proportion p:
n = (zα/2)² × p(1−p) / E² For a 95% CI with ±5% margin of error and unknown proportion (use p = 0.5 for maximum sample size): n = (1.96)² × 0.25 / (0.05)² ≈ 384. This is why many polls use samples of ~400 to ~1,000: diminishing returns beyond ~1,000 make larger samples expensive for relatively little precision gain.
Related calculators
- StatisticsProduce sample mean, sample standard deviation, and count from raw observations.
- Z-ScoreStandardize an individual value relative to the same mean and deviation.
- Distribution CalculatorInspect normal probability and cumulative area around a chosen value.
- Linear RegressionFit a relationship between paired observations after summarizing one sample.