Loading calculator...
- Gives a range that likely contains the true population mean or proportion.
- Uses the t distribution when the standard deviation comes from your sample, or z when σ is known.
- Also works for proportions such as survey results (yes out of n).
- Shows the margin of error, standard error and critical value for 80% to 99.9% confidence.
How to use the confidence interval calculator
Choose mean or proportion
Use mean for measurements such as heights or scores, and proportion for counts such as survey answers.
Enter your sample
For a mean: the sample mean, standard deviation and sample size. For a proportion: the number of successes and the sample size.
Pick a confidence level
95% is the most common. Higher levels give wider intervals.
Read the interval
You get the lower and upper bounds, the margin of error and every step.
How confidence intervals are calculated
Interval for a mean
CI = x̄ ± t* × s ÷ √n (sample standard deviation)
CI = x̄ ± z* × σ ÷ √n (known population σ)
The t* value uses n − 1 degrees of freedom. For large samples t* and z* are almost the same.
Interval for a proportion
p̂ = x ÷ n
CI = p̂ ± z* × √(p̂(1 − p̂) ÷ n)
This is the standard (Wald) interval. It works best when there are at least 10 successes and 10 failures.
Example 1: mean with a sample SD
Mean 100, SD 15, n = 36, 95% confidence.
- Standard error 15 ÷ √36 = 2.5
- t* (df = 35) 2.0301
- Margin of error 5.0753
- 95% CI 94.9247 to 105.0753
With a known population σ of 15 and z* = 1.96, the interval would be 95.1001 to 104.8999.
Example 2: a survey proportion
520 of 1,000 people said yes, 95% confidence.
- p̂ 52%
- Standard error 0.0158
- Margin of error ± 3.1 points
- 95% CI 48.9% to 55.1%
This is the “plus or minus 3 points” you see in poll results.
Common critical values (z*)
Two-sided confidence levels.
- 90% 1.645
- 95% 1.96
- 99% 2.576
Higher confidence needs a larger critical value, so the interval gets wider.
Where a confidence interval calculator helps
Statistics homework
Check t and z intervals and see the margin of error worked out.
Surveys and polls
Report the margin of error for a percentage from a sample.
Research and lab work
Show how precise a measured average is.
Business testing
Judge whether a sample result is precise enough to act on.
Get the mean and standard deviation of raw data with the standard deviation calculator. Look up any z critical value or p-value with the z-score calculator, and find percentiles with the percentile calculator.
Confidence interval calculator FAQ
What does a 95% confidence interval mean?
If you repeated the sampling many times, about 95% of the intervals built this way would contain the true value. It does not mean there is a 95% chance this one interval contains it.
Should I use t or z?
Use t when the standard deviation comes from your sample, which is the usual case. Use z only when the population standard deviation is truly known.
How do I make the interval narrower?
Collect a larger sample, or accept a lower confidence level. Quadrupling the sample size roughly halves the margin of error.
What is the margin of error?
It is half the width of the interval: the critical value times the standard error.
What sample size do I need for a proportion?
Enough for at least 10 successes and 10 failures. Below that the interval is only approximate.
What confidence levels can I choose?
80%, 85%, 90%, 95%, 98%, 99%, 99.5% and 99.9%.