Standard deviation explained: population vs sample
Reviewed 23 November 2026 · 7 min read · Written and maintained by Toolnexo
Two classes can both average 74 on a test and still be very different places. In one, everybody is close to 74. In the other, some students scored 50 and others 98. The mean cannot tell those apart, and standard deviation can. This guide explains what it measures, shows the calculation on a small data set, and clears up the question that trips most people: should you divide by n or by n minus 1? The numbers below come from the standard deviation calculator on this site, which runs in your browser, so your data is not uploaded.
Same average, different spread
Take two sets of five test scores. Class A scored 70, 72, 74, 76 and 78. Class B scored 50, 62, 74, 86 and 98. Both sets have a mean of 74 and a median of 74, so a report that only gave the average would call them identical.
The range already hints at the difference: 8 points for A and 48 for B. Standard deviation is a more complete version of the same idea, because it uses every value instead of only the highest and lowest. For Class A the population standard deviation is 2.83. For Class B it is 16.97, about six times larger. Roughly speaking, it is the typical distance of a value from the mean.
How it is calculated, step by step
Use the eight values 2, 4, 4, 4, 5, 5, 7 and 9. The steps are the same for any list.
- Find the mean: the values add up to 40, and 40 ÷ 8 = 5.
- Subtract the mean from each value: −3, −1, −1, −1, 0, 0, 2 and 4.
- Square each distance, so negatives cannot cancel positives: 9, 1, 1, 1, 0, 0, 4 and 16. They add up to 32.
- Divide the total by the number of values to get the variance: 32 ÷ 8 = 4.
- Take the square root of the variance to get back to the original units: √4 = 2.
Population or sample: n or n minus 1
If your list is every member of the group you care about, such as all 30 students in one class, divide by n. That gives the population standard deviation, which is 2 for the example above.
If your list is a sample used to estimate a bigger group, such as 30 customers out of 10,000, divide by n − 1 instead. That gives the sample standard deviation, which is 2.1381 for the same eight values, because 32 ÷ 7 = 4.5714 and its square root is 2.1381. The reason is that the sample mean is calculated from the same data, so it sits closer to those values than the true mean of the whole group would. Squared distances from it come out too small on average, and dividing by one less than n corrects for that. The correction makes the variance unbiased, and the standard deviation is still very slightly low on average, which is normally ignored.
The difference matters most for short lists. For 4, 8 and 12 the population value is 3.266 and the sample value is 4, a gap of more than 20 percent. For 100 values the two differ by only about half a percent. A single value has no sample standard deviation at all, because n − 1 would be zero, and the calculator says so instead of showing a number.
Reading the result
For data that is roughly bell-shaped, about 68 percent of values fall within one standard deviation of the mean, about 95 percent within two and about 99.7 percent within three. If Class B's scores were roughly bell-shaped, most of them would fall between about 55 and 93, which is 74 give or take the sample figure of 18.97. For Class A the same rule gives about 71 to 77.
That rule belongs to the normal distribution. Income, house prices, waiting times and similar data are usually skewed, and for them the percentages can be well off. A histogram is worth a look before you quote the rule.
Outliers and other warnings
Because distances are squared, one extreme value dominates. For 1, 2, 3, 4 and 100 the mean is 22 and the sample standard deviation is 43.62, even though four of the five values are under 5. The median, 3, describes the typical value far better. When your data has outliers, look at the median and the quartiles as well, which the calculator shows below the main figures.
The coefficient of variation divides the sample standard deviation by the mean and shows it as a percentage: 4.3 percent for Class A and 25.6 percent for Class B. It is useful for comparing spread between measurements on different scales, but it only makes sense for values with a true zero, and the calculator hides it when the mean is 0.
The standard error of the mean is a different thing: the sample standard deviation divided by the square root of n. For the eight values it is 2.1381 ÷ √8 = 0.7559. It describes how precisely the mean is estimated, not how spread out the data is, and it shrinks as you collect more values while the standard deviation does not.
Using the calculator
- Paste numbers separated by commas, spaces, semicolons or new lines. A decimal comma such as 1,5 is read as two numbers, so write 1.5.
- Read both the sample and the population result, and choose by asking whether your list is the whole group or a part of it.
- Open the working table to see each value, its distance from the mean and the squared distance, which is the table from the step by step section above.
- Up to 100,000 numbers are accepted, and the working table shows the first 200.
Put it into practice
Standard Deviation Calculator
Find the standard deviation, variance, mean, median and mode of a list of numbers, with both sample and population results and the workin…
Runs in your browserAverage Calculator
Paste a list of numbers and get the mean, median, mode, sum, count, range and standard deviation at once, with the formula shown.
Runs in your browserPercentage Calculator
Calculate percentages four ways: a percentage of a number, one number as a percentage of another, the change between two values, and a nu…
Runs in your browserGrade Calculator
Work out your weighted course grade from scores and weights, or find the score you need on the final exam to reach the grade you want.
Runs in your browserHow this guide is maintained
This page is reviewed when the related tools change. It describes what the published tools actually do: the tools run in your browser tab, so your files stay on your device. If you find something inaccurate, email [email protected] and it will be corrected.
Other guides
- How to merge PDFs without uploading them6 min · 17 November 2026
- OCR a scanned PDF: accuracy, limits and privacy7 min · 17 November 2026
- Compress a PDF without destroying readability6 min · 17 November 2026