Standard Deviation

Calculate standard deviation and variance online: population (σ) and sample (s) figures, plus mean, median, min, max and sum for any list of numbers.

Runs in your browser. Files never leave your device.

Use a dot for decimals. Commas, spaces, semicolons and new lines all separate numbers, so you can paste a spreadsheet column.

7.75
Mean (Average)
6.5
Median
3.799671
Std Deviation (population σ, ÷ n)
4.062019
Std Deviation (sample s, ÷ n−1)
14.4375
Variance (population σ²)
16.5
Variance (sample s²)
3
Min
14
Max
8
Count
62
Sum

Use the population figures (÷ n) when your numbers are the whole group; use the sample figures (÷ n−1) when they are a sample used to estimate a larger group. Results are calculated with decimal arithmetic to 60 significant digits and shown to 6 decimal places (6 significant digits for values below 1).

About the Standard Deviation

Calculate standard deviation and variance for a list of numbers, both the population figure (σ, divided by n) and the sample figure (s, divided by n − 1). Paste exam marks, measurements, prices or survey answers and see at once how spread out they are, alongside the mean, median, minimum, maximum, count and sum.

Because results update as you type, you can add or remove a value and watch the spread change. Use it to check statistics homework, a lab report or a spreadsheet formula. If you're not sure which of the two standard deviations you need, the table further down sorts that out.

How standard deviation is calculated

Standard deviation measures how far the values typically sit from their mean. To get it, the calculator first finds the mean, then subtracts it from every value, squares each difference so negative and positive gaps don't cancel, and adds the squares up. That total is the sum of squares.

Dividing the sum of squares by n gives the population variance; dividing it by n − 1 gives the sample variance. The standard deviation is the square root of the variance, which puts it back in the same units as your data (marks, kilograms, dollars), while variance is in squared units.

Mean:                 x̄ = Σx ÷ n
Sum of squares:       SS = Σ(x − x̄)²
Population variance:  σ² = SS ÷ n          σ = √σ²
Sample variance:      s² = SS ÷ (n − 1)    s = √s²

x = each value, n = how many values, Σ = add them all up

The sums are done in exact decimal arithmetic to 60 significant digits, and the deviations are taken from the mean in a second pass, so data such as 1000000001, 1000000002, 1000000003 still gives the right small spread instead of a rounding error.

Assumptions and limits

  • Numbers can be separated by commas, spaces, semicolons or line breaks, so a column pasted from a spreadsheet is read value by value. Use a dot for decimals; a comma always splits numbers, so 1,000 is read as 1 and 0, and a warning appears whenever a comma sits directly between two digits. That includes a list typed as 4,8,15 with no spaces: the values are still read correctly, but adding a space after each comma keeps the warning away.
  • Every entry must be a number (scientific notation such as 1.5e3 is accepted). A word or symbol in the list stops the calculation with a message naming the entry, rather than being silently skipped.
  • Sample standard deviation and variance need at least two values. With a single value the population figures are 0 and the sample cards show a dash.
  • Up to 100,000 values at a time, each no larger than 10^300 in size.
  • Results are shown to 6 decimal places, or 6 significant digits for values smaller than 1, so very small spreads don't round to zero.

Worked examples

The default list: population vs sample standard deviation

The box starts with 12, 7, 3, 14, 6, 11, 5, 4. The mean is 62 ÷ 8 = 7.75 and the squared deviations add up to 115.5. Divided by 8 that gives a population variance of 14.4375; divided by 7 a sample variance of 16.5.

SS = 4.25² + 0.75² + 4.75² + 6.25² + 1.75² + 3.25² + 2.75² + 3.75² = 115.5
σ² = 115.5 ÷ 8 = 14.4375   σ = 3.799671
s² = 115.5 ÷ 7 = 16.5      s = 4.062019

Comparing the spread of two classes

Class A scored 72, 85, 91, 64, 78 and class B scored 68, 70, 71, 69, 72. Their means (78 and 70) are only 8 marks apart, but the spread is very different: class A's sample standard deviation is 10.606602, class B's is 1.581139. Class B's marks are bunched tightly together; class A's are not.

Same mean, very different spread

The list 50, 50, 90, 10 has a mean and median of 50, exactly like 50, 50, 50, 50. But its population standard deviation is 28.284271 (variance 800), against 0 for the four equal values. The mean alone can't tell these two data sets apart; the standard deviation can.

Population or sample: which one to use

SituationUseDivide by
Marks of every student in your class, when the class is all you care aboutPopulation σn
A survey of 200 customers used to describe all customersSample sn − 1
Daily sales for every day of last month, to describe last monthPopulation σn
Ten test measurements used to estimate a machine's typical variationSample sn − 1
Spreadsheet STDEV.P / STDEV.SPopulation / Samplen / n − 1

How to use the Standard Deviation

  1. Paste your data set. Type the values into the box with a space, comma, semicolon or new line between them, using a dot for decimals.
  2. Read the spread. The cards show population and sample standard deviation and variance, plus mean, median, min, max, count and sum.
  3. Pick the right figure. Use σ (÷ n) if the list is the whole group and s (÷ n − 1) if it's a sample from a bigger group.

Frequently asked questions

What is the difference between sample and population standard deviation?

What you divide by. Both start from the same sum of squared deviations: population standard deviation divides it by n and describes a complete group. Sample standard deviation divides by n − 1, which makes it slightly larger and corrects for a sample usually looking less spread out than the group it came from.

Why divide by n − 1 for a sample?

Because otherwise a sample's variance comes out too small. The deviations in a sample are measured from the sample's own mean, which sits closer to the sample values than the true group mean does. That makes the squared deviations too small on average. Dividing by n − 1 instead of n (Bessel's correction) removes that bias.

How do I calculate standard deviation by hand?

Find the mean, subtract it from each value, square each result and add the squares. Divide by n for a population or n − 1 for a sample to get the variance, then take the square root. The first worked example above shows every step for eight numbers.

What is the difference between variance and standard deviation?

Variance is the average squared distance from the mean, so it's in squared units (marks², cm²). Standard deviation is its square root and is in the original units, which makes it easier to read: a standard deviation of 5 marks means values typically sit about 5 marks from the mean.

Does this match Excel's STDEV.S and STDEV.P?

Yes, it uses the same definitions: STDEV.S and VAR.S are the sample figures (÷ n − 1) and STDEV.P and VAR.P are the population figures (÷ n). If your spreadsheet gives a different answer, check that both hold exactly the same values: a spreadsheet skips blank and text cells in a range, while a number pasted here with a thousands separator is split into two.

Is a high standard deviation bad?

Not in itself; it only says the values are spread out. For a machine part, a high spread may mean poor consistency. For exam marks it shows a wide range of ability. Compare it with the mean: a spread of 10 matters far more around a mean of 20 than around 2,000.

Sources

This tool runs entirely in your browser. What you enter or upload stays on your device and is never sent to our servers.