Confidence Interval Calculator

Enter your sample size, sample mean, standard deviation, and confidence level to calculate the confidence interval for a population mean — or switch to proportion mode and enter the number of successes to get an interval for a proportion. Results include the lower bound, upper bound, margin of error, and critical value.

Enter a value between 0 and 1, e.g. 0.95 for 95%

Required for Mean intervals

Known population standard deviation (Z interval only)

Sample standard deviation (t interval only)

Number of successes in your sample (proportion interval only)

Results

Confidence Interval

--

Lower Bound

--

Upper Bound

--

Margin of Error (E)

--

Critical Value

--

Standard Error (SE)

--

Confidence Interval Visualization

Frequently Asked Questions

What is a confidence interval?

A confidence interval is a range of values, derived from sample data, that is likely to contain the true population parameter (such as a mean or proportion). For example, a 95% confidence interval means that if you repeated the sampling process 100 times, approximately 95 of those intervals would contain the true parameter. It reflects estimation uncertainty, not a probability about the true value itself.

What is the difference between a Z interval and a t interval?

A Z interval is used when the population standard deviation (σ) is known, and relies on the standard normal distribution. A t interval is used when the population SD is unknown and you are estimating it from sample data using the sample standard deviation (s). The t-distribution has heavier tails than the normal distribution, producing wider intervals — especially for small sample sizes — to account for extra uncertainty.

What does a 95% confidence level actually mean?

A 95% confidence level means the procedure used to construct the interval will produce an interval containing the true population parameter in approximately 95% of repeated samples. It does NOT mean there is a 95% chance the true value falls within any specific computed interval — once calculated, the interval either contains the true value or it does not.

How do I calculate a confidence interval for a proportion?

To calculate a confidence interval for a proportion, you need the sample size (n) and the number of successes (x). The sample proportion p̂ = x/n is computed, then the standard error SE = √(p̂(1−p̂)/n), and the interval is p̂ ± z* × SE. This calculator handles all those steps automatically when you select the Proportion mode.

What happens to the confidence interval as sample size increases?

As sample size increases, the standard error decreases, which narrows the confidence interval. A larger sample provides more information about the population, so the estimate becomes more precise. This is why collecting more data generally leads to tighter, more useful confidence intervals.

What is the margin of error?

The margin of error (E) is the half-width of the confidence interval — it equals the critical value multiplied by the standard error (E = critical × SE). The full interval is then: estimate ± E. A smaller margin of error indicates a more precise estimate, achieved by increasing sample size or lowering the confidence level.

Does a wider confidence interval mean bad data?

Not necessarily. A wider interval often just reflects a smaller sample size, higher variability in the data, or a higher chosen confidence level (e.g. 99% vs 90%). It means your estimate is less precise, not that the data is flawed. You can reduce the width by collecting more data or accepting a lower confidence level.

When should I use a t interval instead of a Z interval?

Use a t interval whenever the population standard deviation is unknown — which is almost always the case in practice. The t interval uses the sample standard deviation (s) as an estimate and applies the t-distribution with n−1 degrees of freedom. As sample size grows large (typically n > 30), the t and Z intervals converge to nearly the same result.

More Education & Academic Tools