What is standard deviation?
Last updated: 2026-11-23
Standard deviation is a typical distance between the values in a set of numbers and their mean. A small standard deviation says the values sit close to the mean. A large one says they are spread out. It is measured in the same units as the data, so a standard deviation of 10 points on an exam means scores usually land about 10 points from the average.
Start learning No account needed
1. Standard deviation in plain words
Start with the mean. For each value, find how far it sits from the mean; that gap is its deviation, positive above the mean and negative below it. Deviations add up to zero, so you cannot average them directly. Square each one so the signs stop cancelling, average the squares to get the variance, then take the square root to return to the original units. That root is the standard deviation.
If you are new to the surrounding ideas, see can you learn statistics on your own, which puts describing how spread out data is before hypothesis tests. Once spread makes sense, the next step is the p-value.
2. A worked example: five exam scores
The five scores below are invented for this page: 72, 85, 90, 64 and 79.
- Mean: (72 + 85 + 90 + 64 + 79) / 5 = 390 / 5 = 78.
- Deviations from the mean: -6, 7, 12, -14 and 1. They add up to 0.
- Squared deviations: 36, 49, 144, 196 and 1. They add up to 426.
- Population variance: 426 / 5 = 85.2, so the population standard deviation is the square root of 85.2, which is 9.23.
- Sample variance: 426 / 4 = 106.5, so the sample standard deviation is the square root of 106.5, which is 10.32.
Both answers are correct; they answer different questions, which the next section explains. For comparison, the average of the absolute deviations is (6 + 7 + 12 + 14 + 1) / 5 = 8.0. Squaring gives the 14-point gap extra weight, which is why standard deviation comes out larger than the plain average gap.
These numbers come from a short script, scripts/standard-deviation-example.mjs in our repository, and a test checks that the page and the script agree.
3. The common mix-up: dividing by n or by n minus 1
There are two formulas, and they differ only in the divisor.
- Population standard deviation divides the sum of squares by n. Use it when your numbers are the whole group you care about, such as every score in a class of five.
- Sample standard deviation divides by n - 1. Use it when your numbers are a sample, and you want to estimate the spread of a larger group they came from, such as five scores drawn from a lecture of three hundred.
The reason for n - 1 is that deviations are measured from the sample mean, which is pulled toward the sample's own values. Gaps from it tend to come out smaller than gaps from the true mean, so dividing by n would usually understate the spread of the larger group. Dividing by n - 1 corrects for that on average. The difference matters most with small samples: here it is 9.23 against 10.32, and it shrinks as n grows.
Tools make different choices, so check which one yours uses. In Excel, STDEV.P is the population version and STDEV.S the sample version. In Python, numpy.std divides by n unless you pass ddof=1, while pandas' std and statistics.stdev divide by n - 1. We ran all three on the five scores above and got 9.23, 10.32 and 10.32 in that order.
4. What standard deviation does not tell you
- It does not say what shape the data has. Two sets can share a mean and a standard deviation and still look different.
- It is pulled strongly by extreme values, because the gaps are squared. One unusual score can move it a lot.
- It has no meaning on its own. A standard deviation of 10 is large for heights in centimeters and small for annual incomes in dollars, so read it against the size of the values.
5. Test yourself on it
Close this page and write the five steps from memory for a new set of numbers, such as 2, 4, 4, 4 and 6. Then say which divisor you would use if those were every value in a small group, and which if they were a sample from a larger one. Reopen the page and compare, looking for the first step where you slipped, which is often forgetting to square before averaging, or taking the root too early.
Roediger and Karpicke had students study prose passages and then either restudy them or take recall tests. After 5 minutes restudying did better. On tests after 2 days and a week, the tested group kept substantially more, even though restudying made students more confident. Their material was prose, not statistics, so the link to standard deviation is our suggestion. For the general method, see how to test yourself.
Is standard deviation the average distance from the mean?
Close, but not exactly. It is the square root of the average squared distance, so larger gaps count for more.
What the sources found, and their limits
Roediger and Karpicke, 2006. Two experiments with college students who studied prose passages, then restudied or took one or three free-recall tests with no feedback. After 5 minutes restudying did better; on delayed tests testing gave substantially greater retention. Limits: prose passages in a lab, not statistics, and we read the abstract record, not the full paper. Source: Europe PMC abstract record, Psychological Science, 2006, read on 2026-11-18.
The definition and the worked example on this page are standard textbook arithmetic that we computed ourselves, not findings from a study, and the five scores are invented.
How Professor Turing helps
Professor Turing is a tutor for adults learning any subject, in college or on their own. It asks you questions instead of giving the final answer, does not grade a bare guess, and remembers what you got wrong. No account is needed to start.
Bring a topic you are studying, such as why a sample uses n - 1. Its first reply asks what you already know before it teaches anything. If you answer with a bare guess, such as a term, it asks how you got there instead of saying right or wrong, and when you stay stuck it changes its approach and makes the next step smaller instead of giving the final answer. Later in a session it can offer a short test without help, scored apart from the tutoring, so you can tell what you can do alone from what the tutor carried you through.
It does not read or mark a written answer, and it does not write your explanation for you, so the explanation has to be yours. You must be 18 or older, and conversations are deleted after 7 days.
FAQ
Is standard deviation the average distance from the mean? Close, but not exactly. It is the square root of the average squared distance, so larger gaps count for more. In our example the mean absolute deviation is 8.0 points while the population standard deviation is 9.23.
Should I divide by n or n minus 1? Divide by n when your numbers are the whole group you care about. Divide by n minus 1 when they are a sample used to estimate a larger group. For the five scores in our example that gives 9.23 and 10.32.
Can the tutor mark my explanation of standard deviation? No. It does not take a written answer to mark. It can ask you questions about what standard deviation measures and which formula fits, and you write the explanation yourself.
Start with what you're working on
Tell the tutor which topic you are studying and let it ask you the questions.
Start learning No account needed
See also: all study guides