Skip to content
Tezmy Tools

Confidence Interval Calculator

Confidence interval for a mean or a proportion, with margin of error

At least 2, as a whole number.

95% confidence interval

45.8722 to 54.1278

Margin of error ±4.1278 around 50

2Standard error
2.0639Critical t value

Method: Student t, 24 degrees of freedom.

A confidence interval describes how well a random sample pins down the true value. It assumes a random, independent sample, and for a mean either a roughly normal population or a large sample.

Runs in your browser. Nothing is uploaded.

About the Confidence Interval Calculator

Confidence Interval Calculator turns sample results into a range that likely contains the true value. Choose a mean or a proportion. For a mean, enter the sample mean, the standard deviation and the sample size, and the tool uses the Student t distribution with n minus 1 degrees of freedom, or the normal distribution if you know the population standard deviation. For a proportion, enter the number of successes and the sample size, and pick the Wilson score method, which suits small samples and results near 0 or 100 percent, or the simple Wald formula. Choose a confidence level from 80 to 99.9 percent. The result shows the interval, the margin of error, the standard error and the critical value used. All calculations run in your browser.

Updated September 2026

How to use the Confidence Interval Calculator

  1. 1Choose A mean or A proportion.
  2. 2For a mean, enter the sample mean, standard deviation and sample size. For a proportion, enter the successes and the sample size.
  3. 3Pick the confidence level, such as 95 percent.
  4. 4Read the interval, the margin of error, the standard error and the critical value.
  5. 5Copy the summary into your report.

What the interval tells you

A sample gives you one number, such as an average score or a percentage who said yes, but a different sample would give a slightly different number. A confidence interval shows how much that number could change from sample to sample. A narrow interval means the sample pinned the value down well, and a wide one means there is a lot of uncertainty.

It is more useful than a single figure because it shows the size of the doubt. A poll result of 52 percent with a margin of 3 points cannot say that one side is ahead, while 52 percent with a margin of 0.5 points can.

Means and proportions

  • Mean: use the sample mean, the sample standard deviation and n. The Student t distribution handles small samples.
  • Proportion: use the number of yes answers and n. The Wilson method is the safe default.
  • Higher confidence gives a wider interval; more data gives a narrower one.
  • The interval is about the population, not about individual values.

Assumptions and limits

The formulas assume a random sample in which each observation is independent. For a mean, the data should come from a roughly normal population or the sample should be large enough for the central limit theorem to help, typically 30 or more. Samples that were not random, such as volunteers, can give a very misleading interval however large they are.

For paired data, differences between groups, medians or skewed data, other methods are needed, and this tool does not cover them.

Related tools

Sample Size Calculator finds how many people to survey, Standard Deviation Calculator gives the mean and standard deviation of a list, Z-Score Calculator finds normal probabilities and critical values, Probability Calculator handles binomial and combined events and Percentage Calculator turns counts into percentages.

Features

  • Interval for a mean with Student t or normal z
  • Interval for a proportion with Wilson or Wald methods
  • Confidence levels from 80 to 99.9 percent
  • Margin of error, standard error and critical value shown
  • Exact t values for any sample size
  • Clear messages for impossible inputs
  • Copy the result
  • Runs in your browser

Frequently asked questions

What is a confidence interval?

It is a range of values, worked out from a sample, that is likely to contain the true value for the whole population. A 95 percent interval means that if you repeated the sampling many times, about 95 percent of the intervals built this way would contain the true value.

How do I calculate a confidence interval for a mean?

Take the sample mean and add and subtract the margin of error, which is the critical value times the standard error. The standard error is the sample standard deviation divided by the square root of n. With a mean of 50, a standard deviation of 10 and n of 25, the 95 percent t interval is 45.87 to 54.13.

Should I use t or z?

Use t when you estimated the standard deviation from your sample, which is the usual case. Use z only if the standard deviation of the whole population is known. With large samples the two give almost the same answer, but t is a little wider for small samples, as it should be.

What is the Wilson method for a proportion?

The Wilson score interval is a way of building an interval for a percentage that stays sensible for small samples and for results near 0 or 100 percent, where the simple Wald formula can go outside the range or give a zero width. Statisticians generally recommend it over the Wald formula.

What does a 99 percent interval look like compared with 95 percent?

It is wider. Asking for more confidence means allowing a bigger range, so the margin of error grows. For a mean with a large sample, the 95 percent margin uses 1.96 standard errors and the 99 percent margin uses 2.576.

How can I get a smaller margin of error?

Use a bigger sample, since the margin shrinks with the square root of n, so four times the sample halves the margin. You can also accept a lower confidence level, or reduce the variation in your measurements. Sample Size Calculator works out how many you need.

Does a confidence interval say the true value lies inside with 95 percent probability?

Strictly no. Once the interval is calculated, the true value is either inside it or not. The 95 percent describes the method, not this one interval, although in everyday use people read it as a good guess of where the value lies.

Related tools