Updated on April 18th, 2026

Confidence Interval Calculator

Created By Jehan Wadia

Enter your sample statistics. Since the population standard deviation is known, a z-interval will be computed.
Mean σ known: x̄=72, σ=12, n=36 Mean σ unknown: x̄=72, s=15, n=25 Proportion: p̂=0.42, n=200


Confidence Interval

(68.08, 75.92)

Point Estimate

72

Margin of Error

± 3.92

Standard Error

2.0000

Critical Value

z* = 1.9600

Confidence Level

95%

Step-by-Step Solution

Introduction

A confidence interval is a range of values that likely contains the true value of a population parameter, like a mean or proportion. Instead of guessing one single number, a confidence interval gives you a lower and upper bound so you can say, "I am 95% confident the real answer falls somewhere in this range." The wider the interval, the less precise your estimate is. The narrower it is, the more precise.

This Confidence Interval Calculator helps you quickly find that range. Just enter your sample mean, sample size, standard deviation, and your desired confidence level. The calculator does the math for you and gives you the lower and upper limits of the interval. It works for common confidence levels like 90%, 95%, and 99%. Whether you are working on a school project or analyzing real data, this tool makes the process fast and simple.

How to Use Our Confidence Interval Calculator

Enter your sample data and confidence level to calculate the confidence interval, margin of error, standard error, and critical value for a population mean or proportion. The calculator also shows a step-by-step solution and a visual chart of your interval.

Calculation Mode: Choose the type of confidence interval you want to build. Pick "Mean (σ Known)" if you know the population standard deviation, "Mean (σ Unknown)" if you only have the sample standard deviation, "Proportion" for a population proportion, or "Raw Data" to paste in your actual data values.

Quick Pick Presets: Click one of the preset buttons to auto-fill the calculator with sample values. This is a fast way to see how the tool works before entering your own numbers.

Sample Size (n): Enter the number of observations in your sample. For the "Mean (σ Unknown)" and "Raw Data" modes, you need at least 2 values.

Sample Mean (x̄): Enter the average of your sample data. This is your point estimate for the population mean. This field is used in the "Mean (σ Known)" and "Mean (σ Unknown)" modes. If you need help computing the average from a dataset, our Mean Median Mode Calculator can handle that for you.

Population Standard Deviation (σ): Enter the known standard deviation of the entire population. This field only appears in the "Mean (σ Known)" mode and must be greater than zero.

Sample Standard Deviation (s): Enter the standard deviation calculated from your sample. This field only appears in the "Mean (σ Unknown)" mode and must be greater than zero. You can use our Standard Deviation Calculator to compute this value from raw data.

Sample Proportion (p̂): In Proportion mode, enter the proportion directly as a decimal between 0 and 1, or switch the input method to enter the number of successes (x) and number of trials (n), and the calculator will compute p̂ for you.

Data Values: In Raw Data mode, type or paste your numbers separated by commas, spaces, tabs, or new lines. The calculator will find n, x̄, and s on its own and then build a t-interval.

Confidence Level: Select a preset confidence level such as 90%, 95%, or 99% from the dropdown, or choose "Custom" and type any value between 0 and 100. This sets how confident you want to be that the interval contains the true population value.

What Is a Confidence Interval?

A confidence interval is a range of values that likely contains the true value of a population parameter, such as a mean or proportion. Instead of giving a single number as your best guess, a confidence interval tells you, "We are X% confident that the true value falls between this lower bound and this upper bound." It is one of the most useful tools in statistics because it shows both an estimate and how uncertain that estimate is.

How Confidence Intervals Work

Every confidence interval has three key parts: a point estimate, a margin of error, and a confidence level. The point estimate is your best single guess—like a sample mean or sample proportion. The margin of error tells you how far above and below that guess the interval stretches. The confidence level (commonly 90%, 95%, or 99%) tells you how sure you can be that the interval captures the true value.

For example, if you survey 200 people and find that 42% prefer a certain brand, a 95% confidence interval might be (0.3516, 0.4884). This means you are 95% confident the true proportion of all people who prefer that brand is somewhere between about 35% and 49%.

Z-Intervals vs. T-Intervals

There are two main types of confidence intervals for means, and they depend on what you know about your data:

Confidence Intervals for Proportions

When your data involves categories instead of measurements—like the percentage of voters who support a candidate—you use a proportion confidence interval. This calculator uses the Wald method, which relies on the normal approximation. The standard error for a proportion is calculated as √[p̂(1 − p̂) / n], where p̂ is the sample proportion and n is the sample size. This method works best when the sample size is large and p̂ is not too close to 0 or 1. If you're working with proportions and percentages in other contexts, our Percentage Calculator can also be helpful.

Key Formulas

The general formula for a confidence interval is:

Point Estimate ± (Critical Value × Standard Error)

What Affects the Width of a Confidence Interval?

Three factors control how wide or narrow your interval is:

  1. Confidence level: A higher confidence level (like 99% instead of 95%) makes the interval wider. You need a bigger range to be more sure.
  2. Sample size: A larger sample gives you more information, which shrinks the standard error and makes the interval narrower.
  3. Variability: If your data is more spread out (larger standard deviation), the interval will be wider because there is more uncertainty. You can measure spread using our IQR Calculator or Standard Deviation Calculator.

Common Misconception

A 95% confidence interval does not mean there is a 95% chance the true value is inside your specific interval. The true value is either in the interval or it is not. Instead, 95% confidence means that if you repeated the sampling process many times and built an interval each time, about 95% of those intervals would contain the true value.

Related Statistical Tools

Confidence intervals are just one part of statistical analysis. Once you've estimated a parameter with a confidence interval, you may also want to perform hypothesis testing using a p Value Calculator or a Chi Square Calculator. If you're exploring relationships between variables, our Correlation Coefficient Calculator is a great next step. And if you need to verify how far off an experimental result is from an expected value, try the Percent Error Calculator.


Frequently Asked Questions

What is the margin of error in a confidence interval?

The margin of error is the amount added and subtracted from your point estimate to create the confidence interval. It equals the critical value multiplied by the standard error. A smaller margin of error means your estimate is more precise.

What confidence level should I use?

The most common choice is 95%. Use 90% if you want a narrower interval and can accept less certainty. Use 99% if you need to be very sure the interval contains the true value, but the interval will be wider. Pick the level that fits the stakes of your decision.

How do I know if I should use the z-interval or t-interval?

Use a z-interval when you know the population standard deviation (σ). Use a t-interval when you only have the sample standard deviation (s). In most real-world situations, you will not know σ, so the t-interval is used more often.

What is a critical value?

A critical value is a number from a statistical distribution (z or t) that matches your chosen confidence level. For a 95% confidence level using a z-interval, the critical value is about 1.96. Higher confidence levels give larger critical values, which makes the interval wider.

What is the standard error?

The standard error measures how much your sample statistic (like the mean) is expected to vary from sample to sample. For a mean, it is calculated as the standard deviation divided by the square root of the sample size. A smaller standard error means your estimate is more reliable.

How many data points do I need to calculate a confidence interval?

For a z-interval (σ known), you need at least 1 observation. For a t-interval (σ unknown) or raw data mode, you need at least 2 observations because you need to calculate the sample standard deviation, which requires n − 1 degrees of freedom.

What does degrees of freedom mean?

Degrees of freedom (df) is the number of values in your data that are free to vary. For a confidence interval about a mean using the t-distribution, df equals n − 1, where n is your sample size. Smaller degrees of freedom make the t-distribution wider, which leads to a wider confidence interval.

Can I enter raw data instead of summary statistics?

Yes. Select the "Raw Data" mode, then type or paste your numbers separated by commas, spaces, tabs, or new lines. The calculator will automatically find the sample size, mean, and standard deviation, then build a t-interval for you.

What is the Wald method for proportions?

The Wald method is a way to build a confidence interval for a proportion using the normal approximation. The formula is p̂ ± z* × √[p̂(1 − p̂) / n]. It works best when the sample size is large and the proportion is not too close to 0 or 1.

Why does a larger sample size make the confidence interval narrower?

A larger sample gives you more information about the population. This reduces the standard error because you are dividing by a larger square root of n. A smaller standard error means a smaller margin of error, so the interval gets narrower and your estimate becomes more precise.

Can the confidence interval for a proportion go below 0 or above 1?

The Wald formula can technically produce bounds below 0 or above 1, but this calculator automatically caps the lower bound at 0 and the upper bound at 1 since a proportion cannot be less than 0% or more than 100%.

What is the difference between entering p̂ directly and entering successes and trials?

Both methods give the same result. Entering p̂ directly means you already know the sample proportion as a decimal. Entering successes (x) and trials (n) lets the calculator compute p̂ as x divided by n. Use whichever method matches the information you have.

What does the point estimate mean?

The point estimate is your single best guess for the true population value. For a mean confidence interval, it is the sample mean (x̄). For a proportion confidence interval, it is the sample proportion (p̂). The confidence interval is built around this value.

Does a 95% confidence interval mean there is a 95% probability the true value is inside it?

No. The true value is either inside the interval or it is not. A 95% confidence level means that if you repeated the sampling and calculation many times, about 95 out of 100 intervals would contain the true value. It describes the method's reliability, not the probability for one specific interval.


Related Calculators

Percent Error Calculator

Visit Percent Error Calculator

Percent Change Calculator

Visit Percent Change Calculator

Percentage Calculator

Visit Percentage Calculator

IQR Calculator

Visit IQR Calculator

Z Score Calculator

Visit Z Score Calculator

Standard Deviation Calculator

Visit Standard Deviation Calculator

Mean Median Mode Calculator

Visit Mean Median Mode Calculator

Correlation Coefficient Calculator

Visit Correlation Coefficient Calculator

p Value Calculator

Visit p Value Calculator

Chi Square Calculator

Visit Chi Square Calculator

Sample Size Calculator

Visit Sample Size Calculator