Skip to main content

DigitalCalculators.net

Confidence Interval Calculator

Find the confidence interval for a mean or a proportion, with the margin of error, the critical value and the steps.

Results

ItemValue

Steps

StepWorking
The t interval assumes a random sample from a roughly normal population, or a sample of about 30 or more. The proportion interval uses the normal approximation, which works best when there are at least 10 successes and 10 failures.

Quick Answer

A confidence interval is estimate ± critical value × standard error. With a sample mean of 72, a standard deviation of 10 and 25 people, the 95% t interval is 67.87 to 76.13, or 72 ± 4.13. The critical value t* for 24 degrees of freedom is 2.064.

Last updated: 2 November 2026 ·How we calculate this: t and z confidence intervals

Table of Contents

How This Confidence Interval Calculator Works

Choose whether you want an interval for a mean or for a proportion. For a mean, enter the sample mean, standard deviation and sample size. For a proportion, enter the number of successes and the sample size. Pick a confidence level, and the calculator finds the critical value, the margin of error and the interval.

Quick explanation: the interval gives a range of likely values for the true population value.

  • t interval: the usual choice when you only know the sample standard deviation.
  • z interval: when the population standard deviation σ is known.
  • Proportion: for percentages, such as survey results.

How to Use the Confidence Interval Calculator

  1. Choose an interval for a mean (t or z) or for a proportion.
  2. Enter the sample mean and standard deviation, or the number of successes.
  3. Enter the sample size.
  4. Choose the confidence level, such as 95%.
  5. Press Calculate and read the interval, the margin of error and the steps.

Core Formulas

  • Mean, σ unknown: x̄ ± t* × s ÷ √n, with n − 1 degrees of freedom
  • Mean, σ known: x̄ ± z* × σ ÷ √n
  • Proportion: p̂ ± z* × √(p̂(1 − p̂) ÷ n)
  • Margin of error: critical value × standard error

Key Terms

  • Confidence level: how often the method captures the true value over many samples, such as 95%.
  • Margin of error: half the width of the interval.
  • Standard error: the standard deviation of an estimate, such as s ÷ √n for a mean.
  • Critical value: the z* or t* number that sets how many standard errors to go out.
  • Degrees of freedom: n − 1 for a one-sample mean. It sets the shape of the t curve.

Worked Example

A poll of 500 voters finds 310 support a plan, so p̂ = 0.62. Find the 95% interval.

  • Standard error = √(0.62 × 0.38 ÷ 500) = 0.02171
  • Margin of error = 1.960 × 0.02171 = 0.0425, or 4.25 percentage points
  • Interval = 57.75% to 66.25%

Real-Life Examples

  • Product weights: 40 bags have a mean of 500.4 g and s = 2.1 g. The 95% interval is 499.73 g to 501.07 g.
  • A customer survey: 180 of 400 customers say they would buy again. The 95% interval is 40.1% to 49.9%.
  • Test scores: a class of 25 has a mean of 72 and s = 10. The 99% interval is 66.41 to 77.59, wider than at 95%.
  • Known spread: a machine with σ = 0.5 mm makes 36 parts with a mean of 20.1 mm. The 95% z interval is 19.937 to 20.263 mm.

Confidence Interval vs Margin of Error

  • Margin of error: the amount added and subtracted, such as ±3 points.
  • Confidence interval: the full range, from estimate − margin to estimate + margin.
  • Polls: “52% ± 3%” means a confidence interval of 49% to 55%.
  • Planning: to choose a sample size for a target margin, use our Sample Size Calculator.

Critical Values by Confidence Level

As the degrees of freedom grow, t* gets closer to z*.

Confidencez*t*, df = 10t*, df = 30
80%1.2821.3721.310
90%1.6451.8121.697
95%1.9602.2282.042
98%2.3262.7642.457
99%2.5763.1692.750
99.9%3.2914.5873.646

What Changes the Width

  • Sample size: four times the sample halves the margin of error.
  • Confidence level: 99% gives a wider interval than 95%.
  • Spread: a larger standard deviation gives a wider interval.
  • Proportion near 50%: gives the widest interval for a given sample size.

Common Mistakes to Avoid

  • Saying there is a 95% chance the true value is in this interval. The 95% describes the method: about 95% of such intervals contain the true value.
  • Using z when σ is unknown. Use the t interval with the sample standard deviation.
  • Entering a percentage as the standard deviation. For proportions, enter the counts instead.
  • Using a biased sample. No formula fixes a sample that does not represent the population.
  • Ignoring small counts. The proportion interval is unreliable with fewer than 10 successes or failures.

Frequently Asked Questions

Take the estimate and add and subtract 1.96 standard errors for a z interval, or t* standard errors for a t interval. This calculator does it for you.

If you repeated the study many times, about 95% of the intervals made this way would contain the true value.

Use t when you estimate the standard deviation from your sample, which is almost always. Use z only when σ is truly known.

About 1.960. For 90% it is about 1.645, and for 99% about 2.576.

To be more confident of capturing the true value, the range has to be wider.

Larger samples give narrower intervals, because the standard error falls as √n grows.

Yes, for a mean. For a proportion, a result below 0% or above 100% is a sign the sample is too small for this method.

Standard deviation is the spread of the data. Standard error is the spread of the estimate, which is smaller.

Use p̂ ± z* × √(p̂(1 − p̂) ÷ n). Choose Proportion above and enter the successes and sample size.

For a difference or an effect, an interval that includes zero means the result is not significant at that confidence level.

No. A prediction interval is for one future value and is much wider.

A 95% interval that does not include the null value matches a two-tailed p-value below 0.05.

References & Sources

SourceUsed ForLink
NIST/SEMATECH e-Handbook, Confidence limits for the mean The t interval for a mean. https://www.itl.nist.gov/div898/handbook/eda/section3/eda352.htm
Wikipedia, Confidence interval Meaning and common mistakes. https://en.wikipedia.org/wiki/Confidence_interval
Wikipedia, Binomial proportion confidence interval Intervals for proportions. https://en.wikipedia.org/wiki/Binomial_proportion_confidence_interval