What is Standard Deviation?
Standard deviation is a number that tells you how far individual data points usually sit from the average of the group. If the number is low, it means the data points are clustered closely around the average. If the number is high, the data points are spread out over a wider range.
Population vs. Sample Standard Deviation
There are two different ways to calculate this number. You must choose the right one based on where your data came from.
When to Use Population Standard Deviation
You use the population formula when you have collected data from every single member of the group you want to study. For example, if you measure the heights of every single student in a small classroom, you have population data.
When to Use Sample Standard Deviation
You use the sample formula when you only have a small part of a larger group. This is the most common type in real-world scenarios. For example, if you survey 100 people to guess the opinion of an entire country, you have a sample.
Standard Deviation Formula
The formula changes slightly depending on whether you are using population or sample data. Both formulas follow similar basic steps.
Population Formula
For a population, you take each number, subtract the mean, and square the result. Then, you add all those squared numbers together and divide by the total number of items in your group. Finally, you take the square root of that answer.
Sample Formula
The sample formula is almost exactly the same. The only difference is that you divide by the total number of items minus one. Subtracting one from the sample size makes the final result more accurate for the larger population you are trying to represent.
How to Calculate Standard Deviation Step-by-Step
If you want to do the math by hand, follow these simple steps.
- Find the mean, or average, of your data set.
- Subtract the mean from each individual number in your set.
- Square each of those differences. Squaring means multiplying the number by itself.
- Add all of the squared numbers together.
- Divide that total by the number of values in your set. If it is a sample, divide by the number of values minus one. This gives you the variance.
- Take the square root of the variance to get the standard deviation.
Worked example
A help desk counts weekly tickets for five weeks: 12, 15, 18, 14, and 21. Treat this as a sample from a longer year.
- Mean = (12 + 15 + 18 + 14 + 21) / 5 = 80 / 5 = 16
- Deviations from 16: −4, −1, 2, −2, 5
- Squared deviations: 16, 1, 4, 4, 25. Sum = 50
- Sample variance = 50 / (5 − 1) = 12.5
- Sample standard deviation = √12.5 ≈ 3.54
If those five weeks were the entire population, divide by 5 instead of 4. Population standard deviation = √10 ≈ 3.16. Paste 12, 15, 18, 14, 21 into the tool above and switch between sample and population to see both results.
Standard Deviation vs. Variance
Variance is the average of the squared differences from the mean. Standard deviation is simply the square root of the variance. People use standard deviation much more often because the result is in the same units as your original data. For instance, if your data is measured in meters, the variance will be in square meters, but the standard deviation will stay in meters.
What is a Good Standard Deviation?
There is no single "good" number. It depends entirely on what you are measuring. A standard deviation of 2 might be very low for a person's height in inches, but it would be incredibly high for a person's shoe size. To see how a specific data point compares to the average using your new standard deviation result, you can convert it into a z-score using our z-score calculator.
Frequently Asked Questions
How do I calculate standard deviation in Excel?
You can calculate it in Excel by using the formulas =STDEV.S() for a sample or =STDEV.P() for a population. You just highlight your data cells inside the parentheses.
What does a standard deviation of 1 mean?
A standard deviation of 1 means that, on average, most of your data points fall about 1 unit away from the mean. In a perfect normal distribution, about 68% of all data points will fall within one standard deviation of the average.
Can standard deviation be negative?
No, standard deviation can never be negative. Because the formula requires you to square the differences before averaging them, all the numbers become positive. Taking the square root of a positive number always gives a positive result.
What is the difference between standard deviation and standard error?
Standard deviation measures how spread out your data points are from the average. Standard error measures how accurate your sample mean is compared to the true population mean. Standard error is always smaller than standard deviation.
Is a higher standard deviation better?
It is not a matter of being better or worse. A higher number simply means your data is more spread out. If you are manufacturing machine parts, a high standard deviation is bad because it means the parts are not identical. If you are measuring human personality traits, a high standard deviation is normal and expected.