Statistics & probability

Confidence interval for a mean

Estimate a mean interval using a sample and Student’s t distribution.

Confidence interval for a mean
Esc to restore

Your inputs

Up to 50,000 values. No thousands separators. Absolute values up to 1 trillion; non-zero values must be at least 1e-100 in magnitude.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Uses sample standard deviation (n−1), standard error s/√n and a two-sided Student t critical value with n−1 degrees of freedom. Requires at least two independent observations and a suitable normal/large-sample model; outliers or dependent data can invalidate coverage. A zero sample variance yields a degenerate interval and does not establish zero population variance.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Values, separated by commas or new lines
2, 4, 4, 4, 5, 5, 7, 9
Two-sided confidence level (%)
95

Example result

Sample mean
5
Interval lower bound
3.21251208176
Interval upper bound
6.78748791824
Margin of error
1.78748791824
Sample size
8
Critical t value
2.36462425159

Student t interval; sampling and distribution assumptions apply.