Standard Deviation Calculator

: Find the sample and population standard deviation, variance, mean, standard error and mean absolute deviation of a list of numbers, with the working shown
Limits: 50 MB · .txt, .csv or .tsv · Exact: decimals and fractions are kept as fractions while calculating, so the mean, sum of squares and variance are exact (shown to 6 decimals with the fraction when they do not end). Standard deviations are square roots: exact when they come out even (√4 = 2), otherwise shown to 6 decimals (≈).
Standard deviation
The standard deviation and variance appear here as you type.

A standard deviation calculator for any list of numbers: paste a column from a spreadsheet or type the numbers with commas or spaces, and it gives the sample standard deviation and the population standard deviation side by side, with the variance, mean, count, sum, sum of squares, standard error of the mean, coefficient of variation and mean absolute deviation. The working is written out step by step with your own numbers, and a table shows each value's difference from the mean. The arithmetic is exact, so the variance never picks up floating-point noise.

  1. Type or paste the numbers, separated by commas, spaces, tabs, semicolons or new lines. A column copied from a spreadsheet works, heading and all.
  2. Under Data is, pick A sample when the numbers are some of a larger group, or A whole population when they are every member of it. Both standard deviations are always shown; the choice decides which one leads and which working is written out.
  3. Read the standard deviation at the top, then the variance, mean and the other figures. Working shows the five steps with your numbers.
  4. Copy beside a figure takes that number; Copy all or Download takes the figures and the value-by-value table.

The standard deviation of eight numbers, as a sample and as a whole population.

Input
2, 4, 4, 4, 5, 5, 7, 9
Output
Standard deviation (sample, s): ≈ 2.13809
Standard deviation (population, σ): 2
Variance (sample, s²): ≈ 4.571429 (32/7)
Variance (population, σ²): 4
Mean: 5

1. Mean: sum ÷ count = 40 ÷ 8 = 5
2. Square each difference from the mean: (2 − 5)² = 9, (4 − 5)² = 1, (4 − 5)² = 1, (4 − 5)² = 1, (5 − 5)² = 0, (5 − 5)² = 0, (7 − 5)² = 4, (9 − 5)² = 16
3. Add them up (the sum of squares): 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
4. Divide by n − 1 = 7: 32 ÷ 7 = 32/7 ≈ 4.571429 (the sample variance, s²)
5. Square root: √(32/7) ≈ 2.13809 (the sample standard deviation, s)

How do you calculate standard deviation?

Find the mean, square each number's difference from it, add the squares, divide by n − 1 (sample) or n (population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9: the mean is 5, the squares add up to 32, 32 ÷ 7 is about 4.571429, and its square root is about 2.13809.

What is the difference between sample and population standard deviation?

Only the divisor: the sample standard deviation divides the sum of squares by n − 1, the population standard deviation by n. Use the sample version when the data is part of a larger group you want to describe, and the population version when you have every member. Unless every value is the same, the sample figure is a little larger: about 2.13809 against 2 for the example.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. The variance is in squared units (cm², dollars²), the standard deviation is in the units of the data, which makes it easier to read next to the mean. For the example the population variance is 4 and the population standard deviation is 2.

Can the standard deviation be 0 or negative?

It is 0 only when every value is the same, and it is never negative, because it is the square root of an average of squares.

Does it match the standard deviation on a TI-84 or in Excel?

Yes. On a TI-84, 1-Var Stats shows Sx (the sample standard deviation) and σx (the population one); in Excel and Google Sheets they are STDEV.S and STDEV.P, with VAR.S and VAR.P for the variances. This page shows the same pairs, to 6 decimal places.

Runs entirely in your browser. Nothing is uploaded.