Confidence Interval Calculator
Enter your sample size and your result. Get the confidence interval for a percentage or an average, at 90%, 95% or 99% confidence.
The share of people who gave the answer you are reporting.
95% confidence interval
Your result, give or take 4.8 points (z = 1.96).
Two kinds of result, one range:
For a percentage
Enter your sample size and the percentage you measured, such as 60% said yes. You get the range that percentage is likely to fall in.
For an average
Enter the average, the standard deviation and the sample size, such as a score of 7.2 out of 10. The calculator uses the t-distribution, which is the right one for averages.
Confidence level
95% is the research standard. Use 99% when a wrong call is expensive and 90% for exploratory work. Higher confidence gives a wider range.
The confidence interval formulas
For a percentage: p ± z × √(p × (1 − p) ÷ n)
For an average: mean ± t × (s ÷ √n), where s is the standard deviation and t comes from the t-distribution with n − 1 degrees of freedom.
Worked example at 95%: 400 responses with a result of 60% give 60% ± 4.8 points, so 55.2% to 64.8%. z is 1.645 for 90%, 1.96 for 95% and 2.576 for 99%.
Multipliers by sample size
The t value used for an average. Large samples approach z.
| Sample size | 90% confidence | 95% confidence | 99% confidence |
|---|---|---|---|
| 5 | 2.132 | 2.776 | 4.604 |
| 10 | 1.833 | 2.262 | 3.250 |
| 20 | 1.729 | 2.093 | 2.861 |
| 30 | 1.699 | 2.045 | 2.756 |
| 100 | 1.660 | 1.984 | 2.626 |
| Large (z) | 1.645 | 1.960 | 2.576 |
Common questions
How do you calculate a confidence interval?
Take your result, then subtract and add the margin of error. For a percentage, the margin is z × √(p × (1 − p) ÷ n). For an average, it is t × (s ÷ √n). With 400 responses and a result of 60%, the 95% confidence interval is 55.2% to 64.8%.
What does a 95% confidence interval mean?
If you ran the same survey many times and built the interval each time, about 95 of every 100 intervals would contain the true value. In practice, read it as the range of plausible values for what you are measuring.
Should I use 90%, 95% or 99% confidence?
95% is the standard in market research and the safe default. Use 99% when a wrong decision is expensive, and accept a wider range. Use 90% for early, exploratory work where a rough answer is enough.
When do I use z and when do I use t?
Use z for percentages. Use t for averages, because the standard deviation is estimated from your sample. With 100 responses or more the two are almost the same: 1.984 against 1.96 at 95% confidence.
What is the difference between a confidence interval and a margin of error?
The margin of error is the plus-or-minus figure. The confidence interval is the full range, from the result minus the margin to the result plus the margin. A result of 60% with a margin of 4.8 points has an interval of 55.2% to 64.8%.
How do I get a narrower confidence interval?
Collect more responses, or accept a lower confidence level. The width falls with the square root of the sample size, so halving it takes four times the responses. For averages, less varied answers also give a narrower range.