Skip to main content
KalkuNet

Confidence Interval Calculator (Mean & Proportion)

Confidence intervals for a mean (t or z) and a proportion (Wald and Wilson).

Calculated in your browserStatistics
Lower limit
149.524014
Upper limit
155.275986
Margin of error
2.875986
Standard error (s ÷ √n)
1.416667
t value (df = 35)
2.030108

Formula and sources

Mean: x̄ ± t(α/2; n − 1) × s ÷ √n (or z × σ ÷ √n when the population σ is known) Proportion (Wald): p ± z × √(p(1 − p) ÷ n) Proportion (Wilson): (p + z²/2n ± z√(p(1 − p)/n + z²/4n²)) ÷ (1 + z²/n)

  • Wilson EB (1927), J Am Stat Assoc 22:209–212
  • Student's t distribution — confidence interval for a mean

When to use the Confidence Interval

  • Reporting survey results

    An average height of 152.4 cm from 36 students means more with a range, such as 149.5–155.3 cm at 95% confidence. The range shows how certain your estimate is.

  • The t distribution for small samples

    When the standard deviation comes from the sample, the calculator uses the t distribution with n − 1 degrees of freedom, giving a wider and more honest interval for small samples.

  • Percentages from a questionnaire

    The proportion mode gives a percentage range, such as 120 of 300 respondents agreeing. The Wilson interval stays reliable for small samples and percentages near 0% or 100%.

  • Choosing the confidence level

    99% confidence gives a wider interval than 95%. Choose what you need: 95% is the usual standard in social and business research.

Frequently asked questions

When should I use z and when t?

Use t when the standard deviation comes from the sample, which is almost always. Use z only when the population standard deviation is known from elsewhere.

How can I narrow the interval?

Increase the sample size. The width is proportional to 1 ÷ √n, so four times as many observations make the interval about half as wide.

Why do Wald and Wilson differ?

The Wald formula is simple but less accurate for small samples or extreme percentages. Wilson adjusts the centre of the interval and is more reliable; with large samples the two nearly agree.

How does it relate to hypothesis tests?

If the 95% interval does not contain the hypothesised value, such as zero for a difference in means, it matches rejecting H₀ at the 5% level in a two-sided test.

How should I report it?

Give the mean or percentage with its range, such as 152.4 cm (95% CI: 149.5–155.3 cm), and state the sample size.

Related calculators