Confidence Interval Calculator for Means & Proportions

Estimate the range your true value likely falls in. Enter sample data, choose a confidence level, and read the margin of error and interval — recomputed live as you type.

How the confidence interval is calculated

A confidence interval gives a plausible range for an unknown population value based on a single sample. The general shape is the same for every case: estimate ± (critical value × standard error). The "critical value × standard error" piece is the margin of error.

For a proportion (the rate you care about in A/B testing), the point estimate is p̂ = successes / n. Its standard error is SE = √(p̂(1−p̂) / n), and this calculator multiplies that by the z critical value for your chosen confidence level (z ≈ 1.96 at 95%). So a conversion rate of 11.8% on 1,000 visitors gives a 95% interval of roughly 9.8% to 13.8%. Narrow intervals mean a precise estimate; wide ones mean you need more data before trusting a winner.

For a mean of continuous data, the estimate is the sample average x̄, the standard error is SE = s / √n, and the critical value comes from the Student t distribution with n−1 degrees of freedom rather than z. The t value is larger than z for small samples, which correctly widens the interval to reflect the extra uncertainty of estimating the standard deviation from limited data. As n grows, t converges to z.

The z and t critical values here are computed numerically — an inverse-normal approximation for z and an iterative inversion of the t CDF — so any confidence level from 50% to 99.99% works, not just the textbook presets. Use the custom field to match an exact alpha. Remember the standard caveat: a 95% interval means the procedure captures the true value 95% of the time across repeated samples, not that there is a 95% probability for this one interval.

Related Tools

A/B Test Sample Size Calculator P-Value Calculator Chi-Square Calculator