← All tools

Confidence Interval Calculator

Compute a confidence interval for a population mean from a sample mean, standard deviation, and size. For samples of 30 or more the calculator uses the normal (z) critical value; for smaller samples with an unknown population standard deviation it uses the t distribution (Cornish–Fisher approximation). Enter a confidence level (90 / 95 / 98 / 99 % or custom) to get the margin of error and the lower and upper bounds, plus the standard error and critical value used. Everything runs locally in your browser.

Enter the sample statistics.

Standard error = sd ÷ √n. For n ≥ 30 the critical value is the normal quantile z = Φ⁻¹(1 − α/2), computed by Newton's method on the error-function CDF (matches standard tables to ~1e-6). For n < 30 the critical value is the t quantile with ν = n − 1 degrees of freedom, approximated by the Cornish–Fisher expansion (accurate to a few thousandths at common levels); a z-based interval would be too narrow for small samples. Margin of error = critical × SE. The interval is mean ± margin. This is a statistical estimate, not a guarantee. Runs locally.