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.

Confidence level

The share of people who gave the answer you are reporting.

95% confidence interval

55.2% to 64.8%

Your result, give or take 4.8 points (z = 1.96).

You have the number. Now ask the question.

Say it in a sentence. SegmentOS writes the survey, and real people answer it.

Free to start. No card needed.

How to use this calculator

How to use this calculator

How to use this calculator

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.

What the number means

What the number means

What the number means

What the number means

A confidence interval is the range that is likely to contain the true value for the whole population, based on what your sample shows. At 95% confidence, ranges built this way contain the true value 95 times out of 100.


A few reference points:

A confidence interval is the range that is likely to contain the true value for the whole population, based on what your sample shows. At 95% confidence, ranges built this way contain the true value 95 times out of 100.


A few reference points:

A narrow range means little sampling error. It says nothing about biased questions or the wrong audience. A precise answer to a badly asked question is still wrong.

Narrow is precise, not correct

When the ranges of two results do not overlap, the difference is very likely real. When they overlap, it may still be real, but you need a significance test to say so.

Overlapping ranges

With 30 responses, a result of 60% has a range of about 42% to 78%. With 400, it is about 55% to 65%. Check the range before you report a subgroup.

Small samples widen the range

Both formulas assume a random sample. For a percentage, the calculation works well when you have at least 10 answers on each side of the result, for example 10 yes and 10 no. Below that, treat the range as a rough guide.

Both formulas assume a random sample. For a percentage, the calculation works well when you have at least 10 answers on each side of the result, for example 10 yes and 10 no. Below that, treat the range as a rough guide.

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 size90% confidence95% confidence99% confidence
52.1322.7764.604
101.8332.2623.250
201.7292.0932.861
301.6992.0452.756
1001.6601.9842.626
Large (z)1.6451.9602.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.