Confidence Interval Calculator
Use this confidence interval calculator to see the likely range for a true value. Enter the sample mean, standard deviation and size, or a proportion, pick 90, 95 or 99 percent, and get the interval and margin of error with steps.
Confidence Interval Calculator
-
-
-
-
-
This confidence interval calculator gives the range that likely contains a true population value, based on your sample. It handles a mean when the population SD is known (z), a mean with only the sample SD (t), and a proportion, at 90%, 95%, 99% or a custom level.
How to use the Confidence Interval Calculator
- Choose the Type: Mean (σ known, z), Mean (σ unknown, t) or Proportion.
- For a mean, enter the Sample Mean, the SD and the Sample Size (n). For a proportion, enter Successes (x) and Trials (n).
- Pick a Confidence Level, or choose Custom and type your own level.
- Press Calculate Interval to see the point estimate, margin of error, lower and upper bounds, and the critical value used.
Formula
Mean, σ unknown: x̄ ± t × s/√n, with df = n − 1
Proportion: p̂ ± z × √(p̂(1 − p̂)/n)
The critical value comes from the normal (z) or t distribution for your confidence level, for example z ≈ 1.96 at 95%. The tool uses close approximations for both, so the last decimal can differ slightly from a printed table.
Example
A sample of 36 has a mean of 50, and σ = 10. Standard error = 10/√36 ≈ 1.6667. At 95%, the margin is 1.96 × 1.6667 ≈ 3.27, so the interval is about 46.73 to 53.27. For a proportion, 45 successes in 100 trials gives 0.45 ± 0.0975, or about 0.3525 to 0.5475.
Frequently asked questions
What does a 95% confidence interval mean?
If you repeated the sampling many times and built an interval each time, about 95% of those intervals would contain the true value. It does not mean there is a 95% chance the true value lies in this one interval.
When should I use z instead of t?
Use z when the population standard deviation is known, and for proportions. Use t when you only have the sample standard deviation, especially with small samples. As n grows, t and z values become nearly the same.
How do I make a confidence interval narrower?
Increase the sample size or lower the confidence level. Because the margin depends on 1/√n, you need about four times as many observations to cut the margin in half.
What is the margin of error?
It is the distance from the point estimate to either end of the interval: critical value × standard error. A survey result of 45% ± 9.75% has a margin of error of 9.75 percentage points.
Plan how many responses you need with the Sample Size Calculator.
Find a confidence interval
How to use it
- Pick mean or proportion.
- Enter your sample data.
- Pick a confidence level.
- Read the interval.
More questions
What does 95% confidence mean?
If you repeated the study many times, about 95% of intervals would hold the true value.
Does a bigger sample help?
Yes. A bigger sample makes the confidence interval narrower and more precise.
Should I use z or t?
Use t for small samples when the population SD is unknown.
Related tools: Sample Size Calculator, Z-score Calculator, Standard Deviation Calculator.
A survey proportion at 95% confidence
Pick the interval type, enter your sample statistics (or successes and trials for a proportion), choose a confidence level and read the lower bound, upper bound and margin of error. To see the z values behind each confidence level, use the Normal Distribution Calculator.
Worked example: in a survey of 400 US shoppers, 130 prefer store pickup, so the sample proportion is 130 ÷ 400 = 0.325. At 95% the margin is 0.0459, giving an interval of 0.2791 to 0.3709, or about 27.9% to 37.1%.
More answers
How much larger a sample do I need to halve the margin of error?
About four times larger. The margin shrinks with the square root of n, so going from 400 to 1,600 people cuts the margin from about 4.6 points to about 2.3 points for the same proportion.
How do I write this interval as percentages?
Multiply each bound by 100. The interval 0.2791 to 0.3709 becomes 27.91% to 37.09%, or 32.5% plus or minus 4.59 percentage points.