Confidence Interval Calculator
Estimate a population mean or proportion from your sample, with the margin of error and a clear interval. Updates live as you type.
How this is calculated
A confidence interval gives you a range of plausible values for a population parameter, such as a mean or a proportion, based on a single sample. Instead of reporting just one number, you report a lower and upper bound together with a confidence level. This Confidence Interval Calculator builds that interval for you and shows the margin of error, the standard error, and the critical value behind it.
To use it, first choose what you are estimating. Pick the mean (σ unknown) option when you have continuous data and you estimated the spread from your own sample, which is the most common situation in real research. Choose the mean (σ known) option only in the rarer case where the population standard deviation is genuinely known. Choose the proportion option when your outcome is a yes or no result, such as the share of people who agree with a statement.
For a mean, enter your sample mean, your standard deviation, and your sample size. The calculator uses the t distribution with degrees of freedom equal to n minus one when σ is unknown, and the normal (z) distribution when σ is known. For a proportion, set the observed proportion and the sample size, then pick the Wilson or Wald method. Wilson is recommended because it stays within the zero to one range and remains accurate for small samples and for proportions near zero or one, where the simpler Wald interval can mislead.
The confidence level controls how wide the interval is. A 95 percent level is the common default, meaning that if you repeated the same sampling process many times, about 95 percent of the intervals constructed this way would contain the true value. Raising the level to 99 percent widens the interval because you are demanding more certainty; lowering it to 90 percent narrows it. You can set any level you like with the slider.
The margin of error is the half-width of the interval: the critical value multiplied by the standard error. A larger sample size shrinks the standard error and therefore the margin of error, which is why bigger samples produce tighter, more informative intervals. If you are sampling a meaningful fraction of a small, finite population, enter the population size to apply the finite population correction, which slightly narrows the interval to reflect that you have measured a real share of the whole group.
A note on interpretation: a 95 percent confidence interval does not mean there is a 95 percent probability that the true value sits inside this particular interval. The true value is fixed; it is the interval that varies from sample to sample. The confidence level describes the long-run success rate of the method, not the odds for one specific result. Use the “How this is calculated” section to see the exact formula with your own numbers substituted in, which is useful for checking your work or explaining it in a report.
