Blog
Statistics on data

Confidence interval calculator online

Your sample mean is one number, but the average of everyone you did not measure is somewhere near it rather than exactly on it. A confidence interval says how near: it turns a single estimate into a range, which is the honest way to report an average computed from a sample.

Your data never leaves this device

Your data

Paste a table straight from Excel or Google Sheets, or drop a CSV file. Nothing is uploaded anywhere — the whole calculation runs inside this browser tab.

CSV, TSV or plain text. Files saved in windows-1251 are detected and re-read automatically, so Cyrillic headers do not turn into garbage.

Parsing options

Columns

Result

The drawing library is downloaded only when you press the button, and only on this page.

This page has no server side at all. The table you paste is parsed by JavaScript inside your own browser, the chart is drawn on a canvas element on your machine, and the export file is assembled locally. Nothing is uploaded, stored or written to any log. You can disconnect from the network after the page has loaded and everything will still work — which is the simplest way to verify the claim yourself.

Facts and limits of this method

Levels computed 90%, 95% and 99%, all at once
Distribution Student's t with n−1 degrees of freedom, not the normal
Critical value Found by inverting the exact t-distribution, not taken from a table
Formula mean ± t · standard deviation / √n
Width behaviour Shrinks as √n — quadrupling the sample halves the interval
Minimum rows 2

When it misleads you

How it is calculated

The half-width is the standard error of the mean multiplied by a critical value from the t-distribution. The standard error is the standard deviation divided by the square root of the count, which is why the interval narrows as data accumulates while the standard deviation itself does not.

The t-distribution is used rather than the normal, and this matters exactly where it is most often ignored. At 10 rows the 95% critical value is 2.26 instead of 1.96 — an interval 15% wider — and that gap is the correction for having estimated the standard deviation from the same small sample.

The critical value is obtained by numerically inverting the exact t-distribution rather than by looking it up in a rounded table. That means the result is correct for any number of rows, including the awkward sizes that printed tables skip.

All three conventional levels are shown together because the choice between them is arbitrary and showing only one hides that. A result that is significant at 95% and not at 99% is a result whose fragility deserves to be visible.

Questions and answers

Does a 95% interval contain 95% of my values?

No, and this is the classic error. It is a range for the population mean. The range covering most individual values is roughly mean ± 2 standard deviations, which is far wider.

Why does my interval shrink so slowly as I add data?

Because it narrows with the square root of the sample size. To halve the width you need four times the rows, and to halve it again you need sixteen times.

Why the t-distribution instead of the normal?

Because the standard deviation was estimated from the same sample, which adds uncertainty. The t-distribution accounts for it. Above about 30 rows the two nearly coincide, but below that the normal gives intervals that are too narrow.

Which level should I report?

95% is the convention in most fields. Report the level you chose alongside the interval — an interval without its confidence level is meaningless.

Is my data uploaded?

No. The critical values and the interval are computed in your browser.

Related tools

All tools