Skip to content
Statculator

Confidence Interval Calculators

Seven free confidence interval calculators: one mean (t or z), a proportion, a variance, two means, two proportions and paired data, each with steps.

Open the Confidence Interval Calculator

Updated · Formulas and conventions follow our methodology

In short

A confidence interval is a range of plausible values for an unknown population parameter, built from sample data as an estimate plus or minus a margin of error. A 95% interval comes from a method that captures the true value in 95% of repeated samples. The seven calculators on this hub build intervals for a mean, a proportion, a variance or standard deviation, two means, two proportions and paired data, and show every step.

Not sure which interval you need? The Confidence Interval Calculator handles one mean, one proportion, two independent means, two proportions and paired data in a single tool, and writes out every step with an interpretation.

  • Lower and upper limits
  • Point estimate and margin of error
  • Standard error
  • z∗ or t∗ critical value and df
  • Any confidence level, such as 90%, 95%, 98% or 99%
  • Plain-English interpretation
Open the Confidence Interval Calculator

All 7 confidence interval calculators

How confidence intervals work

Almost every interval on this hub has the same structure: point estimate ± critical value × standard error. The product of the last two terms is the margin of error. The critical value comes from the standard normal distribution for proportions and for means with a known σ, and from the t distribution when σ is estimated from the sample. The exception is the interval for a variance or standard deviation, which is built from two χ² critical values and is not symmetric around the sample value.

To choose a calculator, ask two questions: are you estimating a mean, a proportion or a variance, and do you have one group, two independent groups or paired measurements? For a single proportion Statculator defaults to the Wilson interval, which stays inside 0 to 1 and keeps coverage close to the stated level even for small samples or proportions near 0 or 1; Wald and exact Clopper–Pearson intervals are available as alternatives.

How to calculate a 95% confidence interval

  1. Find the point estimate. Use the sample mean x̄ for a mean, the sample proportion p̂ = x / n for a proportion, or the difference x̄₁ − x̄₂ or p̂₁ − p̂₂ when you compare two groups.
  2. Find the standard error. For a mean it is s / √n; for a proportion it is √(p̂(1 − p̂) / n). The standard error measures how much the estimate would vary from sample to sample.
  3. Look up the critical value. For 95% confidence, z∗ = 1.96. For a mean with σ estimated from the sample, use t∗ with n − 1 degrees of freedom instead, which is a little larger than 1.96 for small samples. The T Critical Value Calculator and Z Critical Value Calculator give any level.
  4. Multiply to get the margin of error. Margin of error = critical value × standard error.
  5. Add and subtract. Lower limit = estimate − margin of error; upper limit = estimate + margin of error. Report the interval with its confidence level, for example “95% CI 49.66 to 54.94”.

Worked example: a 95% confidence interval for a mean

Problem. A sample of n = 25 bags has a mean weight of x̄ = 52.3 g and a sample standard deviation of s = 6.4 g. Find the 95% confidence interval for the population mean weight.

  1. 01Standard error. σ is unknown, so use the sample standard deviation.
    SE = s / √n = 6.4 / √25 = 6.4 / 5 = 1.28
  2. 02Critical value. With σ estimated, use t with n − 1 = 24 degrees of freedom and 2.5% in each tail.
    t∗ = t₀.₉₇₅,₂₄ ≈ 2.064
  3. 03Margin of error. Multiply the critical value by the standard error.
    ME = 2.064 × 1.28 ≈ 2.64
  4. 04Interval. Subtract and add the margin of error.
    52.3 − 2.64 = 49.66
    52.3 + 2.64 = 54.94

Answer. The 95% confidence interval for the mean is 49.66 g to 54.94 g. At 99% confidence t∗ rises to 2.797 and the interval widens to 48.72 g to 55.88 g. Enter the same three numbers into the Mean Confidence Interval Calculator to check every step.

Which confidence interval calculator should I use?

If you want to…Use
If you want one tool that handles every common interval type
If you want an interval for one population mean, with or without a known σ
If you want an interval for one proportion or percentage
If you want an interval for a population variance or standard deviation
If you want to compare two independent proportions, such as two conversion rates
If you want to compare the means of two independent groups
If you measured the same subjects twice or have matched pairs
If you only need the margin of error, or the sample size for a target margin
If you need the z∗ or t∗ critical value for a confidence level
If you also want a p-value for the same comparison

How to get 1.96 for a 95% confidence interval

A 95% interval leaves α = 0.05 outside it, split equally between the two tails, so each tail holds 0.025. The critical value z∗ is the z-score with 0.975 of the standard normal distribution to its left. Look up 0.9750 in the body of the z table and read off z = 1.96, or enter 95% in the Z Critical Value Calculator.

The same rule gives every other level: z∗ = 1.645 for 90%, 2.326 for 98%, 2.576 for 99% and 3.291 for 99.9%. When σ is estimated from the sample, read t∗ from the t-table at the same tail area with n − 1 degrees of freedom; t∗ is larger than z∗ for small samples and approaches it as n grows.

Confidence level, sample size and interval width

Higher confidence gives a wider interval, and a larger sample gives a narrower one. Width shrinks in proportion to 1/√n, so quadrupling the sample size halves it. For a proportion near 50% at 95% confidence, the margin of error is about ±9.8 percentage points with n = 100, ±4.9 with n = 400, ±3.1 with n = 1,000 and ±2.45 with n = 1,600.

To plan a study around a target width, work backwards with the Sample Size Calculator: choose the confidence level and the largest margin of error you can accept, and it returns the n you need.

Confidence interval formulas

IntervalFormulaNotes
Mean, σ unknownx̄ ± t∗ · s / √nt∗ uses df = n − 1
Mean, σ knownx̄ ± z∗ · σ / √nMostly textbook and process-control settings
Proportion (Wald)p̂ ± z∗ · √(p̂(1 − p̂) / n)Simple, but coverage drops for small n or p̂ near 0 or 1
Proportion (Wilson)[p̂ + z²/(2n) ± z · √(p̂(1 − p̂)/n + z²/(4n²))] / (1 + z²/n)Statculator’s default for one proportion
Two proportions(p̂₁ − p̂₂) ± z∗ · √(p̂₁(1 − p̂₁)/n₁ + p̂₂(1 − p̂₂)/n₂)Unpooled standard error
Two means (Welch)(x̄₁ − x̄₂) ± t∗ · √(s₁²/n₁ + s₂²/n₂)df from the Welch–Satterthwaite equation
Paired mean differenced̄ ± t∗ · s_d / √nn is the number of pairs; df = n − 1
Variance(n − 1)s² / χ²₍1−α/2₎ ≤ σ² ≤ (n − 1)s² / χ²₍α/2₎χ²₍q₎ is the q-th quantile of χ² with df = n − 1; take square roots for σ
Common z∗ values1.645, 1.960, 2.326, 2.576For 90%, 95%, 98% and 99% confidence

Frequently asked questions

What does a 95% confidence interval mean?

It means the interval was produced by a method that captures the true population value in 95% of samples drawn the same way. Any one interval either contains the true value or does not; the 95% describes the long-run reliability of the procedure, not a 95% probability for this particular interval. A narrow interval signals a precise estimate, and a wide one signals uncertainty.

How do I calculate a 99% confidence interval?

Use the same steps as for 95% but with a larger critical value: z∗ = 2.576 instead of 1.96, or t∗ at 0.5% in each tail with n − 1 degrees of freedom. The interval is about 31% wider than the 95% interval for the same data when z is used. Every calculator on this hub accepts any confidence level.

Can I calculate a confidence interval without the population standard deviation?

Yes, and this is the usual case. Replace σ with the sample standard deviation s and use the t distribution with n − 1 degrees of freedom instead of z. The Mean Confidence Interval Calculator does this automatically, and it can also compute s from raw data you paste in.

Should I use z or t for a confidence interval for a mean?

Use t whenever the standard deviation is estimated from the sample, which is almost always. Use z only when the population standard deviation σ is genuinely known. For large samples the two barely differ: at 95% confidence t∗ is 1.984 with 100 degrees of freedom, against z∗ = 1.960.

Why does Statculator use the Wilson interval for a proportion?

The Wilson interval keeps its actual coverage close to the stated confidence level, while the simpler Wald interval can fall well short of 95% when the sample is small or the proportion is near 0 or 1. Wilson limits also always stay between 0 and 1. The Proportion Confidence Interval Calculator still reports Wald and exact Clopper–Pearson intervals for comparison.

How can I make a confidence interval narrower?

Collect more data, lower the confidence level, or reduce variability in the measurements. Width falls with the square root of the sample size, so you need four times as many observations to halve it. Lowering confidence from 95% to 90% also narrows the interval, at the cost of being wrong more often.

How is a confidence interval related to a hypothesis test?

For a mean, a two-sided 95% confidence interval excludes the null value exactly when a two-sided t-test rejects H₀ at α = 0.05. The interval gives more information than the test because it also shows how large the effect could plausibly be. Reporting both is good practice; see the Hypothesis Testing Calculators calculators for the matching tests.

How do I find a confidence interval for a standard deviation?

Build the interval for the variance first: divide (n − 1)s² by the upper and then the lower χ² critical value with n − 1 degrees of freedom, and take the square root of both limits. For n = 20 and s = 4, the 95% interval for σ runs from 3.04 to 5.84. The interval is not symmetric around s and assumes the data come from a normal distribution; the Variance Confidence Interval Calculator shows each step.

Looking for something else? See all calculators or search the site.