Skip to content
Investment Math
Investment Math

Currency and number style

Only changes how amounts look. There is no currency conversion.

Standard Deviation explained: formula, worked example and common mistakes

Sample or whole group, with the mean, variance, median, quartiles and range — and the squared distance from the mean shown value by value. Free, no sign-up.

Updated

What the number means

The standard deviation answers one question: how far from the average do these values typically sit?

Take the distance of each value from the mean, square it so the signs do not cancel and so far-away values count for more, average those squares, and take the square root to get back to the original units. That is it — four steps, and the page shows each one.

The result is in the same units as your data. If the numbers are marks out of ten, the standard deviation is in marks. If they are monthly returns in per cent, it is in per cent.

The worked example

The list 2, 4, 4, 4, 5, 5, 7, 9.

Step 1: the mean.

(2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) / 8 = 40 / 8 = 5

Step 2: the distance from the mean, squared, value by value.

Value Distance from mean Squared
2 −3 9
4 −1 1
4 −1 1
4 −1 1
5 0 0
5 0 0
7 2 4
9 4 16
Total 32

Step 3: the variance.

Whole group (population): 32 / 8     = 4
Sample:                   32 / (8-1) = 4.5714

Step 4: the standard deviation.

Whole group: square root of 4      = 2
Sample:      square root of 4.5714 = 2.138

The rest of the summary falls out of the same sorted list: median 4.5, mode 4, range 7, Q1 4, Q3 5.5, interquartile range 1.5, and a standard error of 0.7071.

Sample or whole group

The only difference is the divisor: n for a whole group, n − 1 for a sample.

The reason for n − 1 is that a sample’s own mean is itself estimated from the sample, which pulls the squared distances slightly too low. Dividing by one fewer corrects for it. The correction is large on small sets — on eight values it raises the answer by about 7% — and vanishes on large ones.

Pick the whole group when your numbers are everything: the marks of one class, the twelve monthly returns that actually happened last year. Pick the sample when they stand in for something bigger you did not measure. The page gives both bases, so you can see the size of the difference rather than worrying about it in the abstract.

When to use it, and when not to

Use it to summarize any list: marks, measurements, response times, returns. The spread is usually more informative than the average, and the page prints both along with the quartiles so you can see whether the set is symmetric or lopsided.

Be careful reading it as risk. A standard deviation treats a surprise upward exactly like a surprise downward, and most people do not. It also assumes the numbers are comparable — the same thing measured the same way. And on data with a long tail, the standard deviation is dominated by the tail, which is where the interquartile range earns its keep.

Common mistakes people make

1. Using population when the question wants sample. Check the wording. School and exam questions usually mean the sample formula unless they say otherwise.

2. Forgetting the square root. Variance and standard deviation are different numbers in different units. In the example they are 4 and 2.

3. Comparing spreads measured in different units. A standard deviation of 2 means nothing against one of 500 if the first is in marks and the second in millimeters. Divide by the mean for a unit-free comparison.

4. Reading a standard deviation on skewed data as “typical”. With a long tail, most values sit much closer to the middle than the standard deviation suggests, and a few sit much further.

5. Averaging standard deviations. They do not average. Variances add for independent quantities; standard deviations do not.

6. Computing it on too few numbers. Three values give a standard deviation, but not a meaningful one. The standard error on the page is a rough guide to how firm the mean itself is.

Frequently asked questions

What does standard deviation actually measure?

How far the values sit from their own average, on average. A small standard deviation means the values are bunched; a large one means they are spread out. In the worked example the mean is 5 and the standard deviation is 2, so a typical value sits about 2 away from 5.

What is the difference between sample and population?

Population treats your numbers as the whole group and divides the squared distances by n. Sample treats them as a sample from something bigger and divides by n − 1, which makes the answer slightly larger. The smaller the set, the bigger the difference: on eight values it is the difference between 2 and 2.138.

Which basis do I pick?

Pick population when the numbers are everything you care about — the marks of one class, the monthly returns that actually happened. Pick sample when you are using them to say something about a wider group you did not measure. If a question asks for "the standard deviation" with no other clue, it usually wants the sample one.

Why are the distances squared?

So that values above and below the mean do not cancel out, and so that far-away values count for more than near ones. Squaring changes the units, which is why the square root is taken at the end — variance is in squared units, standard deviation is back in the original ones.

What is variance?

The average of the squared distances, before the square root. In the worked example the variance is 4 and the standard deviation is 2. Variance adds neatly across independent things, which is why it turns up inside formulas even though standard deviation is what gets reported.

What are quartiles and the interquartile range?

The quartiles cut a sorted list into four. Q1 is the value a quarter of the way up, Q3 is three quarters of the way up, and the interquartile range is the gap between them — the middle half of the data. It is a measure of spread that ignores extremes, unlike the standard deviation.

Why does the mean say so little on its own?

Because two sets with the same mean can look nothing alike. 5, 5, 5, 5 and 1, 1, 9, 9 both average 5; one has a standard deviation of 0 and the other 4. The average tells you where, the standard deviation tells you how spread out.

This tool shows math, not advice.

Cite this page

Copy this line into a reference list, a report or a spreadsheet note.

Investment Math Calculator. “Standard Deviation Calculator”. Updated 2026-10-30. https://investmentmathcalculator.com/guides/standard-deviation-calculator/

Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.