About the Confidence Interval Calculator tool
A confidence interval gives a range of plausible values for a population quantity, based on a sample. Instead of just reporting that the average in a sample was 50, you report that the population mean is likely between 47.3 and 52.7 at 95% confidence. The width depends on the sample size, the variability of the data and the confidence level you choose.
This confidence interval calculator covers the three intervals taught in introductory statistics. Mean with σ unknown uses the Student t distribution with n − 1 degrees of freedom — the usual choice in practice — and the critical t-value is computed from the exact t distribution rather than a table, so any sample size and any confidence level work. Mean with σ known uses the normal distribution. Both accept either summary statistics (mean, standard deviation and n) or raw data, from which the mean and sample standard deviation are calculated for you.
Proportion gives the Wilson score interval, which behaves well even for small samples or proportions near 0% or 100%, alongside the textbook Wald interval p̂ ± z·SE and its margin of error, with a warning when the Wald interval is unreliable. The steps show the critical value, standard error and margin of error.
How to use Confidence Interval Calculator
- Choose “Mean, σ unknown (t)”, “Mean, σ known (z)” or “Proportion”.
- Pick a “Confidence level” — 90%, 95% and 99% are common — or choose Custom.
- For a mean, choose “Summary statistics” and enter x̄, s (or σ) and n, or choose “Raw data” and paste the values.
- For a proportion, enter the number of successes and the sample size.
- Read the interval, margin of error and critical value, and open “Show steps” for the calculation.
Features
Exact t critical values
Computed from the t distribution for any degrees of freedom and confidence level.
Summary or raw data
Paste sample values and the mean and standard deviation are worked out automatically.
Wilson and Wald intervals
Both proportion intervals are shown, with guidance on which to trust.
Any confidence level
Presets from 80% to 99.9% plus a custom level.
Full working
Critical value, standard error, margin of error and final interval are listed step by step.
When to use it
- Report a 95% confidence interval for the average in a lab experiment.
- Find the margin of error for a poll result such as 420 of 1,000 respondents.
- Build an interval for a mean from a small sample using the t distribution.
- Check a statistics homework answer that uses a z interval.
- Estimate the range of a conversion rate from an A/B test variant.
Frequently asked questions
How do you calculate a 95% confidence interval for a mean?
Take the sample mean ± t* × s ÷ √n, where t* is the critical value from the t distribution with n − 1 degrees of freedom (about 2.06 for n = 25). If the population σ is known, use z* = 1.96 and σ instead.
When should I use t instead of z?
Use t whenever the population standard deviation is estimated from the sample, which is almost always. The z interval applies when σ is genuinely known. For large samples the two give nearly the same answer.
What does 95% confidence actually 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% probability that this particular interval contains it.
Why use the Wilson interval for proportions?
The Wald interval p̂ ± z√(p̂(1 − p̂)/n) can be too narrow and even extend below 0% or above 100% for small samples or extreme proportions. The Wilson interval has better coverage and stays within 0–100%.
How can I make my confidence interval narrower?
Increase the sample size — the width shrinks roughly with 1/√n — or accept a lower confidence level. Reducing measurement variability also helps.