Standard Deviation Calculator

Calculate sample and population standard deviation and variance, with every step shown.

How to use

  1. Paste your values — one per line, or separated by spaces or commas. A comma also works as the decimal separator.
  2. Choose whether the numbers are a sample of a larger group (divide by n − 1) or the entire population (divide by n).
  3. Read the standard deviation, the variance and the coefficient of variation, with the sum of squared deviations spelled out below.

About this tool

The standard deviation answers a question the mean cannot: how spread out are the values? Two classes can both average 7 out of 10 — one where almost everyone scored 7, and one where half scored 4 and half scored 10. The mean hides that difference; the standard deviation exposes it. The variance is the same measure before the square root, which keeps the units squared and is why the standard deviation is usually the number people quote.

The math is done in the order you would do it by hand, and every step is shown: the mean, then the deviation of each value from the mean, then each deviation squared and added up, then the division and the square root. The tool always calculates both versions. Dividing that sum by n − 1 gives the sample standard deviation (s); dividing by n gives the population one (σ). For the set 2, 4, 4, 4, 5, 5, 7, 9 the population value is exactly 2 and the sample value is about 2.14 — the same data, two legitimate answers to two different questions.

The dividing line is simple: use n − 1 when your numbers are a sample of a larger group you did not measure entirely — which is almost always the case in surveys, quality control and experiments — and n only when you really measured every element of the population, like the grades of all 30 students in one specific class. The tool also reports the coefficient of variation, the standard deviation as a percentage of the mean, which lets you compare the spread of data sets measured in different units. Everything runs locally in your browser.

The formula

Sample: s = √( Σ(x − x̄)² ÷ (n − 1) ) · Population: σ = √( Σ(x − x̄)² ÷ n ) · Variance is the same expression without the square root · Coefficient of variation = (standard deviation ÷ mean) × 100.

Frequently asked questions

Should I use the sample or the population formula?

Use the sample formula (n − 1) unless you measured every element of the group. Sampling is the normal case, which is why n − 1 is the default here and in spreadsheets' STDEV function.

Why divide by n − 1?

Because the sample mean is always slightly closer to the sample than the real population mean is, which makes the deviations too small. Dividing by n − 1, known as Bessel's correction, compensates for that bias.

Is a standard deviation of 5 high?

It depends entirely on the scale. Five points on a 0–10 exam is enormous; five reais on a R$ 5,000 price is negligible. The coefficient of variation exists exactly to make that comparison, since it expresses the spread as a percentage of the mean.

What is the difference between variance and standard deviation?

The variance is the average of the squared deviations, so it is measured in squared units. The standard deviation is its square root, which brings the number back to the original units and makes it readable.

Do my numbers leave my browser?

No. Everything is calculated in JavaScript on your device, with no network requests. Your data is never uploaded or stored.

Related tools

Long links? Shorten them for free

Vai.la turns any URL into a short link with click statistics, QR Code and your own biolink.

Vai.la is not responsible for how the tools are used or for decisions made based on their results.