Kalkmi Online calculators
en
English

Confidence Interval Calculator

Estimate a population mean or proportion from your sample. Use raw data, summary statistics or success counts, and compare confidence levels visually.

Turn a sample into a range for the population mean or proportion. Start with your measurements, summary statistics, or a count of successes.

Set up your interval
One population, one random sample.
Two-sided interval. Choose the level before examining results.
Both describe the same kind of mean interval.
Use t when you only know the sample SD, even for a large sample.
Separate numbers with commas, spaces or new lines. Decimal point: 10.5; scientific notation: 1.05e1. Up to 2,000 values. Empty cells and nonnumeric tokens are rejected.

95% confidence interval for the population mean

9.85159 to 10.14841

Sample mean 10 · n = 6

Margin of error ±0.148413 · t, df = 5

This estimates the population mean, not the range containing 95% of individual measurements. For small samples, the t method assumes approximately normal independent observations.

Teal: confidence interval. Coral point: sample estimate. The point is not always halfway between proportion limits.

More confidence, a wider range

These intervals use the same sample and method. Choose a row to change the confidence level.

Sample details and calculation

Sample SD = 0.141421; standard error = 0.0577350; t critical = 2.57058.

10 ± 2.57058 × 0.0577350 = 9.85159 to 10.14841.

Start with an example

Illustrative samples. Each sets every option and remains editable.

What the interval means, methods and limits

Confidence describes the procedure

A 95% method is designed to contain the fixed population parameter in about 95% of repeated random samples under its assumptions. It does not give this particular interval a 95% probability of containing that fixed parameter. Changing the confidence level after looking at results changes the procedure.

A population mean

When the population SD is unknown, use mean ± t × s/√n, with n − 1 degrees of freedom. For raw observations the sample variance is Σ(x − mean)²/(n − 1). When population σ is genuinely known, use mean ± z × σ/√n. A large n alone does not make an estimated sample SD a known σ.

Small-sample t intervals rely on approximately normal independent observations. A larger sample may support an approximation, but no automatic size cutoff validates skewed, heavy-tailed or dependent data. Identical raw observations cannot estimate positive population variation; this tool rejects a t-interval with zero sample SD. A confidence interval is not a prediction interval for a future individual value.

A binomial proportion

With x successes in n independent trials, p̂ = x/n. Wilson inverts the normal score test: its center is (p̂ + z²/(2n))/(1 + z²/n), with half-width z√[p̂(1 − p̂)/n + z²/(4n²)]/(1 + z²/n). The sample proportion can be away from the interval midpoint.

Exact binomial limits use beta quantiles: lower = Beta⁻¹(α/2; x, n − x + 1) when x > 0; upper = Beta⁻¹(1 − α/2; x + 1, n − x) when x < n. At zero successes the lower bound is 0; at all successes the upper bound is 1. “Exact” refers to binomial coverage, not exact knowledge of the population proportion. Clopper–Pearson can cover more often than the nominal level.

Sampling matters

These methods assume an independent random sample from the population described. Neither a narrow interval nor a large sample fixes selection bias, nonresponse, clustered observations or repeated measurements on the same subject. This calculator does not apply finite-population correction, weights, paired or two-sample inference. Counts must be actual outcomes, not invented from a rounded percentage.

Input limits: up to 2,000 raw values or 1,000,000 observations in a summary/count; decimal coefficients up to 24 digits, 12 decimal places and exponents −24 to 24. Calculations use exact finite-decimal sums for raw statistics and numerical quantiles. Displayed limits are rounded; the mean plot uses offsets so large measurement baselines do not collapse a small interval.

References: NIST: confidence limits for a mean, NIST: Wilson and exact binomial intervals.

Related tools: standard deviation from a dataset and plan survey sample size.

Was this calculation useful?
It takes one second and helps others choose a useful calculator.

Help improve Kalkmi Report an issue or request a useful calculator.
Suggest a calculator
Text copied
Removal error
Restore error
Calculator published
Calculator unpublished
Feedback sent
Done
Error
Author received:++
Calculator removed
Install as an app

Open the browser menu and choose “Add to Home Screen” or “Install app”.