🏆 US-Registered Digital Marketing Agency Trusted by 200+ brands · USA · UK · Canada · AUS
Advertisement
Advertisement
STATISTICS

Confidence Interval Calculator — means and proportions

Build an exact confidence interval for a mean or a proportion, with the correct critical value chosen for you.

If you estimated the spread from your own sample, use the t interval.
The average of the values you measured.
Sample SD for a t interval, known population SD for a z interval.
Leave at 0 for an infinite population; enter a real size to apply the correction.
Confidence interval
0 to 0
 
0
Margin of error
0
Critical value
0
Standard error
0
Degrees of freedom
Tip: a confidence interval describes the precision of your estimate, not the spread of your data. Raising the confidence level always widens the interval — 99% is not a free upgrade over 95%.
Advertisement

A confidence interval converts a single sample statistic into a range of plausible values for the quantity you actually care about — the population mean or the population proportion you can never measure directly. This calculator builds that range for you, picks the right critical value from the t or normal distribution automatically, and shows the standard error and margin of error separately so you can see where the width of the interval comes from.

Arb Digital built this tool because so much practical measurement work — survey results, conversion readings, average order values — gets reported as a bare average with no indication of how stable it is. A mean of 100 from 25 observations and a mean of 100 from 2,500 observations are very different claims, and the interval makes that difference visible.

What This Confidence Interval Calculator Does

Choose one of three interval types. The t interval for a mean is the everyday case: you have a sample mean, a sample standard deviation, and a sample size, and you did not know the population spread in advance. The calculator looks up the exact Student t critical value for your degrees of freedom and confidence level, computes the standard error, and returns the lower and upper limits.

The z interval for a mean applies when the population standard deviation is genuinely known from prior work rather than estimated from the sample in front of you. It uses a normal critical value, which is always slightly narrower than the matching t value.

The proportion interval handles percentage data — the share of visitors who converted, the share of respondents who said yes. It uses the standard Wald formula, and the optional population size field applies the finite population correction when your sample is a large fraction of a small closed population.

The four supporting numbers update with every keystroke: margin of error, critical value, standard error, and degrees of freedom. Those are the quantities you need to reproduce the interval by hand, which means you can check the tool rather than trust it.

How to Use It

  1. Pick the interval type. If your standard deviation came out of the same sample you are analysing, choose the t interval. That is true far more often than people assume.
  2. Enter the sample mean and standard deviation, or for a proportion, enter the observed percentage. Use the sample standard deviation with n − 1 in the denominator, which is what our standard deviation calculator returns in sample mode.
  3. Enter the sample size. This is the number of observations, not the number of groups or the number of days.
  4. Choose the confidence level. 95% is the convention in most fields; 99% is common where the cost of an error is high.
  5. Add a population size only if the population is genuinely finite and small. Sampling 300 people from a town of 400 gives a much tighter interval than sampling 300 from a country, and the correction accounts for that.

The Formula and a Worked Example You Can Check

For a mean with unknown population standard deviation, the interval is x̄ ± t(α/2, df) × s ÷ √n, where df = n − 1. For a known population standard deviation, the t value is replaced by z. For a proportion, the interval is p̂ ± z(α/2) × √(p̂(1 − p̂) ÷ n).

Work through the tool's default values by hand. A sample of n = 25 has a mean of 100 and a sample standard deviation of 15, and you want 95% confidence. Degrees of freedom are 25 − 1 = 24. The two-tailed t critical value at 24 degrees of freedom is 2.0639 — a number you can look up in any printed t table. The standard error is 15 ÷ √25 = 15 ÷ 5 = 3.0. The margin of error is 2.0639 × 3.0 = 6.19. The interval is therefore 100 ± 6.19, or 93.81 to 106.19. That is exactly what the calculator shows on load, and the method matches the worked procedure in the NIST/SEMATECH e-Handbook section on confidence limits for the mean.

The proportion case is just as checkable. Take p̂ = 0.52 with n = 1,000 at 95% confidence. The z critical value is 1.9600. The standard error is √(0.52 × 0.48 ÷ 1000) = √0.0002496 = 0.015799. The margin of error is 1.96 × 0.015799 = 0.03097, or 3.1 percentage points, giving an interval of roughly 48.9% to 55.1%. This is the origin of the familiar "plus or minus three points" you see attached to national polls with around a thousand respondents.

Advertisement

t Interval or z Interval: The Choice People Get Wrong

The textbook rule many people remember is "use z when n is above 30". That rule is a relic of the era when critical values came from printed tables and nobody wanted to typeset thirty extra rows. The real distinction is not sample size at all — it is whether the standard deviation is known or estimated. If you computed s from your own data, you introduced a second source of uncertainty, and the t distribution is the distribution that accounts for it.

The practical consequence is small at large n and substantial at small n. At df = 24 the 95% t value is 2.0639 against a z value of 1.9600 — about 5% wider. At df = 4 the t value is 2.7764, more than 40% wider than z. Using z with a sample of five produces an interval that is confidently, quantifiably too narrow. Since the calculator computes exact t values numerically rather than reading a truncated table, there is no reason to substitute z for convenience at any sample size.

What "95% Confident" Actually Means

The interval is a statement about the procedure, not about the specific numbers in front of you. If you repeated the whole exercise many times — new sample, new interval, same method — about 95% of the intervals produced would contain the true population value. The one interval you are looking at either contains it or it does not; the 95% is the long-run hit rate of the recipe.

This distinction is not academic pedantry. It rules out the two most common misreadings. First, "there is a 95% probability the true mean is between 93.81 and 106.19" treats the fixed population mean as if it were random. Second, and more damaging in practice, "95% of individual values fall in this range" confuses the interval with the data spread. The interval above spans about 12 units while the underlying data has a standard deviation of 15 — most individual observations fall well outside it. If you want the range covering most individual values, you want a prediction or tolerance interval, which is a different and much wider calculation. Penn State's STAT 500 applied statistics course notes work through the same distinction with additional examples.

Why Precision Improves So Slowly

Every term in the margin of error is fixed by your design except √n. Because the sample size enters under a square root, halving the width of an interval requires four times the data, not twice. Going from n = 100 to n = 400 cuts the margin of error in half. Going from n = 400 to n = 800 buys only a 29% reduction.

This single fact should shape how you plan measurement work. It explains why survey firms cluster around 1,000 respondents, and why an A/B test that is ambiguous after two weeks usually needs far more than another two weeks to resolve. Before committing to a sample, run the target backwards with our sample size calculator, and use the margin of error calculator to price the trade-off directly.

Where the Proportion Interval Breaks Down

The Wald interval for a proportion is the formula in every introductory course, and it misbehaves badly at the edges. When p̂ is close to 0 or 1, or when n is small, two things go wrong. The interval can extend past 0% or 100%, which is impossible; this calculator clamps the displayed limits at those bounds, but the clamping itself is a warning sign. Worse, the actual coverage drifts below the nominal level — a "95%" Wald interval near p̂ = 0.02 can capture the true value substantially less than 95% of the time.

The conventional check is that both n × p̂ and n × (1 − p̂) should be at least 10 before you trust a Wald interval. With 5 conversions out of 200 visitors, n × p̂ = 5, so the condition fails and the interval is indicative only. Statisticians then reach for the Wilson score or Clopper-Pearson exact interval, both of which behave properly near the boundaries. The tool flags this condition in the result subtitle so you know when the assumption is under strain.

The Finite Population Correction

Standard interval formulas assume you are sampling from an effectively infinite population. When you survey 300 of a company's 400 employees, that assumption is plainly false — you have already measured three quarters of everyone, so your uncertainty about the remainder is much smaller than the basic formula implies.

The finite population correction multiplies the standard error by √((N − n) ÷ (N − 1)). With n = 300 and N = 400 the factor is √(100 ÷ 399) = 0.5006, cutting the margin of error roughly in half. The correction is negligible whenever the sampling fraction is under about 5%, which is why national polling ignores it: 1,000 people out of 250 million changes nothing. Apply it for internal surveys and audits of finite record sets.

Reporting an Interval Honestly

Report the interval, the confidence level, and the sample size together — a range with no n attached is unauditable. Round the limits to a precision the data can support; quoting four decimal places from a sample of twelve implies a certainty the measurement does not have.

When two groups are being compared, the right object is a confidence interval on the difference between them, not two separate intervals eyeballed for overlap. Non-overlapping intervals do imply a significant difference, but overlapping intervals do not imply the absence of one — the overlap test is conservative and routinely misses real differences. For that comparison use the t-test calculator, which builds the interval on the difference directly.

Need more free statistics tools?

Arb Digital publishes a growing library of free calculators for statistics, maths, finance, and marketing — no sign-up, no limits, and every formula documented on the page.

Browse All Free Tools Contact Arb Digital

Common Mistakes to Avoid

  • Using the population standard deviation formula on sample data — dividing by n instead of n − 1 understates the spread and produces an interval that is too narrow.
  • Reading the interval as a range for individual values — it estimates where the population mean sits, not where most observations fall.
  • Widening to 99% confidence to look more rigorous — you have not gained certainty, you have only produced a vaguer answer from the same data.
  • Comparing two groups by checking whether their intervals overlap — build an interval on the difference instead, or run a proper two-sample test.
  • Applying the proportion formula to tiny counts — with fewer than about 10 successes or 10 failures the Wald interval loses its stated coverage.

Related Free Tools From Arb Digital

Compute the inputs first with the standard deviation calculator or the variance calculator, then convert a single observation to a standard score with the z-score calculator. Plan the sample before you collect it using the sample size calculator, price the precision trade-off with the margin of error calculator, and test a difference between groups with the t-test calculator. Everything else lives in the free online tools hub.

Frequently Asked Questions

What does a 95% confidence interval actually mean?

It means the method used to build the interval captures the true population value in about 95% of repeated samples. It is a statement about the reliability of the procedure over the long run, not a probability attached to the single interval you are looking at.

When should I use t instead of z?

Use t whenever the standard deviation was estimated from your own sample, which is almost always. Use z only when the population standard deviation is known independently. The difference is largest at small sample sizes and shrinks steadily as n grows.

How do I make a confidence interval narrower?

Collect more data, reduce measurement variability, or accept a lower confidence level. Because the sample size sits under a square root, cutting the interval width in half requires four times as many observations.

Can a confidence interval go below 0% or above 100% for a proportion?

The Wald formula can produce limits outside that range when the proportion is near an extreme or the sample is small. Those limits are impossible values and signal that a Wilson score or exact interval would be more appropriate.

Is the margin of error the same as the confidence interval?

No. The margin of error is the half-width — the amount added and subtracted. The confidence interval is the full range from the lower limit to the upper limit, so the interval is twice the margin of error wide.

Do I need a population size to calculate an interval?

Not usually. The standard formulas assume an effectively infinite population. Enter a population size only when your sample is a large share of a small closed group, in which case the finite population correction tightens the interval.

This tool is provided for education and general analysis. Results depend on your data meeting the assumptions of the chosen method, and it is not a substitute for professional statistical advice on a specific study design.

Advertisement
Advertisement
Arb Digital assistant

👋 Hey! Want to grow your business? Ask me anything — a free marketing proposal is on the table!