Confidence Interval Calculator

Confidence interval for a mean or a proportion

Calculate a confidence interval for a mean (with z or Student's t) or for a proportion (standard and Wilson intervals), with the margin of error and critical value.
Share
Try an example:
%
Your result will appear here as you type.

About Confidence Interval Calculator

Formula

CI = x̄ ± z × s ÷ √n (or t with n − 1 degrees of freedom)

CI = p̂ ± z × √(p̂(1 − p̂) ÷ n)

Worked examples

Mean of 50

With SD 10 and n = 100, SE = 1 and z = 1.96: 95% CI 48.04 to 51.96.

How it works

  1. Margin of error = critical value × standard error.
  2. For a mean, the standard error is s ÷ √n; small samples use the t distribution.
  3. For a proportion, the standard error is √(p(1 − p) ÷ n); the Wilson interval is more accurate for small samples.

What you need

  • The sample statistics and a confidence level.

Tips

  • Quadrupling the sample size halves the margin of error.

Limitations

  • Assumes a random sample.

Runs in your browser. Calculations run in your browser - nothing you enter is sent anywhere.

Definitions

Margin of error
Half the width of the interval.
Critical value
The z or t value for the confidence level.

Frequently asked questions

Does 95% confidence mean a 95% chance the mean is inside?+

Strictly, it means 95% of intervals built this way would contain the true mean.

Was this calculator helpful?