Deepnote is now open-source! Star us on GitHub ⭐️
Get started
← Back to all data apps

Confidence interval calculator (Z & T)

By Srihari Thyagarajan

Updated on February 27, 2026

Use this confidence interval calculator to estimate plausible ranges for population means and proportions. Supports multiple estimation methods with optional calculation detail for auditability.

Use template ->

What is a confidence interval?

A confidence interval is a range of values constructed from sample data that is likely to contain the true population parameter at a chosen confidence level. A 95% confidence interval, for example, means that if you repeated the sampling process many times, about 95% of the intervals constructed would contain the true value.

It is one of the core tools in inferential statistics because it communicates both the estimate and the uncertainty around it, rather than reporting a single point that implies more precision than the data actually supports. Reporting a point estimate without an interval is common but misleading in most research and analytical contexts.

Confidence interval formula

For a population mean (z-interval): CI = x̄ ± z × (σ / √n)

For a proportion: CI = p̂ ± z × √(p̂(1 − p̂) / n)

Where x̄ is the sample mean, σ is the population standard deviation (replaced by s, the sample standard deviation, when the population σ is unknown), n is the sample size, p̂ is the observed sample proportion, and z is the critical value corresponding to the chosen confidence level (1.96 for 95%, 2.576 for 99%). When the population standard deviation is unknown and the sample is small, the t-distribution replaces z, with degrees of freedom equal to n − 1.

How the confidence interval calculator works

The calculator handles both mean and proportion intervals and applies the appropriate method based on inputs. The more informative read is width and placement together, not just the endpoint values. A narrow interval reflects higher precision under the current sample; a wider one signals uncertainty that should carry into any decisions built on the result.

Optional calculation detail is available for situations where the result needs to travel beyond the analyst. Stakeholders can trace the logic rather than accepting the output on faith.

How confidence intervals are used in practice

Confidence intervals appear wherever sample data is used to draw inferences about a population: A/B testing, survey analysis, clinical research, quality control, and economic reporting. Reporting a CI rather than a point estimate is generally better analytical practice because it keeps uncertainty visible and prevents false precision from compounding downstream.

Srihari Thyagarajan

Technical Writer

Follow Srihari on Twitter, LinkedIn and GitHub

Try Deepnote now

Get started – it’s free
Book a demo

Footer

Solutions

  • Notebook
  • Data apps
  • Machine learning
  • Data teams

Product

Company

Comparisons

Resources

Footer

  • Privacy
  • Terms

© 2025 Deepnote. All rights reserved.