Confidence interval calculator

Confidence interval calculator

Estimate uncertainty around a mean, proportion, difference in means, or difference in proportions from summary statistics.

Enter summary statistics to calculate the estimate, standard error, margin of error, and interval bounds.

Interpreting the result

A confidence interval combines the point estimate with a margin of error. The lower and upper bounds show a range of values that are reasonably compatible with the data under the selected method. The interval does not prove that every value inside is equally likely, and it does not make values outside impossible. It is a disciplined way to show estimation uncertainty.

What is this test?

A confidence interval is an estimation tool, not a hypothesis test by itself. It starts with a point estimate, such as a sample mean, sample proportion, or difference between two groups. It then adds and subtracts a margin of error based on the standard error and confidence level. The result is an interval that communicates both the estimate and the uncertainty around it.

Statoma currently supports four common summary-statistic intervals: a mean interval using a t critical value, a proportion interval using a normal approximation, a difference in means interval using Welch degrees of freedom, and a difference in proportions interval using a normal approximation. These are standard teaching and reporting forms, but they still rely on sampling assumptions and sensible input data.

The frequentist interpretation is about the method, not a fixed parameter moving around. If a 95% confidence interval method were repeated across many comparable samples, about 95% of the intervals would contain the true population parameter. For one completed study, the interval is better read as a range of plausible values generated by that method and dataset.

When to use it

  • Use a mean interval when the target is a population average and you have a sample mean, sample standard deviation, and sample size.
  • Use a proportion interval when the target is a population share or rate based on a count of successes out of a sample.
  • Use a difference in means interval when comparing two independent group averages from summary statistics.
  • Use a difference in proportions interval when comparing two independent rates, shares, or conversion proportions.
  • Use a wider confidence level, such as 99%, when you need a more conservative interval and can tolerate less precision.

Confidence intervals are especially useful when practical size matters more than a yes-or-no threshold. A p-value can say whether a null value looks surprising, but an interval shows the range of effect sizes still compatible with the data. That range is often what makes a result actionable.

How it works

Most introductory confidence intervals share the same structure. The estimate is the center. The standard error measures sampling variability. The critical value comes from a reference distribution and expands or contracts with the confidence level. The margin of error is the critical value multiplied by the standard error.

estimate±critical value×standard error\text{estimate} \pm \text{critical value} \times \text{standard error}

Mean intervals use a t critical value because the population standard deviation is unknown and estimated by the sample standard deviation. Proportion intervals in this calculator use the normal approximation. Difference in means intervals use a Welch-style standard error and degrees-of-freedom approximation, which avoids assuming equal population variances. Difference in proportions intervals combine the sampling variance from both groups.

Worked example

Suppose a class has a sample mean score of 82.4, a sample standard deviation of 6, and a sample size of 36. For a 95% mean interval, the standard error is 6 divided by the square root of 36, which equals 1. The t critical value with 35 degrees of freedom is about 2.03, so the margin of error is about 2.03 points. The interval runs from about 80.37 to 84.43.

The interval should not be described as saying there is a 95% chance that the true mean lies between those two numbers. The true mean is treated as fixed in this framework. The 95% describes the long-run performance of the interval method. In a report, the better phrasing is that the 95% confidence interval for the population mean score is 80.37 to 84.43, assuming the sampling design and model conditions are reasonable.

Common mistakes

Calling the interval a probability statement

A 95% confidence interval does not mean the fixed parameter has a 95% probability of being inside this particular interval.

Ignoring sample design

The formula assumes the summary statistics came from a sampling process that supports the standard error calculation.

Using a proportion approximation near the boundaries

The simple normal proportion interval can behave poorly when the observed proportion is close to 0 or 1, or when sample size is small.

Reporting only the margin of error

The margin of error needs the point estimate and confidence level to be meaningful.

Treating overlap as a formal test

Two intervals overlapping or not overlapping is not the same as a planned hypothesis test for a difference.

FAQ

What does a confidence interval show?

A confidence interval gives a range of plausible values for a population parameter based on the estimate, standard error, and confidence level.

Does a 95% interval mean the parameter has a 95% chance of being inside?

No. In frequentist terms, the method would capture the true parameter in about 95% of repeated samples analyzed the same way.

Why does a higher confidence level make the interval wider?

Higher confidence requires covering more of the reference distribution, so the critical value and margin of error increase.

Can a proportion interval go below 0 or above 1?

The simple normal approximation can do that near 0 or 1. Treat such results as a warning that a different interval method may be better.

Related calculators