Confidence interval calculator

Intervals for a mean or a proportion, using the multiplier your sample size actually calls for — and the Wilson method, because the textbook one returns negative percentages on small samples. Nothing you type here leaves your browser — it is worked out on your own device, so there is nothing to send and nothing to log.

The textbook interval can give you a negative percentage

Two successes out of twenty is 10%. The Wald interval — the one in most textbooks, and in most calculators — puts the 95% range at −3.2% to 23.2%.

A proportion cannot be negative. That is not a wide interval, it is arithmetic that has left the space of possible answers, and it happens whenever the sample is small or the proportion is near zero or one. Which is exactly when people most want an interval.

The Wilson interval does not do this. It gives 2.8% to 30.1% for the same data, stays inside 0 and 1 by construction, and has better coverage at small samples. It is the default on this page and the Wald figure is shown beside it so you can see the difference.

1.96 is the wrong multiplier for a mean

1.96 is the normal critical value, and it is right when you know the population standard deviation. You do not. You estimated it from the same sample, which adds uncertainty that the normal distribution does not account for.

The correct multiplier is t, and it depends on your sample size: 2.064 at n = 25, 2.262 at n = 10, 2.776 at n = 5. Using 1.96 regardless gives an interval that is too narrow — it claims more precision than the data supports, and the smaller the sample the worse it gets.

What a confidence interval actually means

It does not mean there is a 95% probability the true value lies in this particular range. The true value is a fixed number; it is either in your interval or it is not, and no probability attaches to that.

It means that the procedure has a 95% hit rate: if you repeated the whole exercise many times, 95% of the intervals constructed this way would contain the true value. That is a statement about the method, not about your particular interval, and the difference matters more than it sounds like it should.

Where to go next