Standard Deviation: Formula, Calculator and Examples
What standard deviation measures, how to calculate it by hand for a sample or a population, and a free calculator that shows every step.
Practice Statistics FreeStandard deviation calculator
Standard deviation is a measure of how spread out numbers are from their mean: the square root of the average squared distance from the mean. A small standard deviation means the values sit close to the average; a large one means they are spread out.
Paste or type your numbers. The calculator shows the mean, variance and standard deviation, and the table of steps.
- Count (n)
- 6
- Mean
- 5.5
- Variance
- 3.5
- Standard deviation
- 1.8708
Show the steps
| x | x − mean | (x − mean)² |
|---|---|---|
| 4 | -1.5 | 2.25 |
| 8 | 2.5 | 6.25 |
| 6 | 0.5 | 0.25 |
| 5 | -0.5 | 0.25 |
| 3 | -2.5 | 6.25 |
| 7 | 1.5 | 2.25 |
- Mean = 33 ÷ 6 = 5.5
- Sum of squared deviations = 17.5
- Variance = 17.5 ÷ 5 (n − 1) = 3.5
- Standard deviation = √3.5 = 1.8708
What is standard deviation?
Standard deviation measures how far the values in a data set typically are from the mean. Two classes can both average 75 on a test: if one class's scores are 73, 75 and 77 and the other's are 55, 75 and 95, the second class has a much larger standard deviation because its scores are more spread out.
It is written for a sample and (the Greek letter sigma) for a population. It is always zero or positive, and it is in the same units as the data, which makes it easier to interpret than the variance, its square.
Standard deviation formulas
Sample standard deviation
Population standard deviation
is each value, and are the sample and population means, and or is the number of values. The only difference is the denominator.
Which one should I use?
- Population (÷ N): your data is the whole group, such as the scores of every student in one class when you only care about that class.
- Sample (÷ n − 1): your data is part of a bigger group and you want to estimate the spread of the whole group, such as 50 surveyed students standing in for a whole school. This is the usual choice in statistics courses, AP Statistics and science labs.
Dividing by n − 1 (Bessel's correction) makes the sample variance slightly larger. A sample tends to sit closer to its own mean than to the true population mean, so dividing by n alone would underestimate the spread.
How to calculate standard deviation by hand
- Find the mean. Add the values and divide by how many there are.
- Find each deviation. Subtract the mean from each value. (These always add up to 0, which is a handy check.)
- Square each deviation. This makes every term positive and weights big deviations more.
- Add the squares. This is the sum of squares.
- Divide by n − 1 for a sample or N for a population. The result is the variance.
- Take the square root. That is the standard deviation.
Worked examples
Example 1: Population standard deviation
EasyFind the population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.
Example 2: Sample standard deviation
EasyThree test scores, 70, 80 and 90, are a sample from a larger class. Find the sample standard deviation.
Example 3: Using standard deviation with the empirical rule
MediumHeights of adult women in a country are roughly normal with mean 64 inches and standard deviation 3 inches. About what percent are between 58 and 70 inches?
The empirical rule (68–95–99.7)
For data that is roughly bell-shaped (normally distributed):
- about 68% of values lie within 1 standard deviation of the mean;
- about 95% lie within 2 standard deviations;
- about 99.7% lie within 3 standard deviations.
The number of standard deviations a value is from the mean is its z-score: . A score of 130 when the mean is 100 and the standard deviation is 15 has z = 2.
Common mistakes
- Using the wrong denominator. Check whether the question says sample or population. Calculators label them Sx (sample) and σx (population).
- Forgetting the square root. Stopping at the variance gives an answer in squared units.
- Squaring the sum instead of summing the squares. Square each deviation first, then add.
- Rounding the mean too early. Keep the full mean until the end, or the deviations will not add to 0.
Standard deviation practice problems (with answers)
- Find the population standard deviation of 1, 2, 3, 4, 5.
Show answer
√2 ≈ 1.414 (mean 3, squared deviations sum to 10, 10 ÷ 5 = 2)
- Find the sample standard deviation of 1, 2, 3, 4, 5.
Show answer
√2.5 ≈ 1.581 (10 ÷ 4 = 2.5)
- Find the sample standard deviation of 6, 2, 3, 1.
Show answer
≈ 2.160 (mean 3, squared deviations 9 + 1 + 0 + 4 = 14, 14 ÷ 3 ≈ 4.667)
- Find the population standard deviation of 2, 4, 6, 8.
Show answer
√5 ≈ 2.236 (mean 5, squared deviations sum to 20, 20 ÷ 4 = 5)
- What is the standard deviation of 10, 10, 10, 10?
Show answer
0 (every value equals the mean, so there is no spread)
- The variance of a data set is 49. What is the standard deviation?
Show answer
7 (standard deviation is the square root of variance)
- You add 5 to every value in a data set. What happens to the standard deviation?
Show answer
Nothing. Shifting every value moves the mean too, so the distances from the mean stay the same.
- You double every value in a data set. What happens to the standard deviation?
Show answer
It doubles. Every distance from the mean doubles.
- IQ scores are roughly normal with mean 100 and standard deviation 15. About what percent score between 85 and 115?
Show answer
About 68% (within 1 standard deviation of the mean)
- Using the same IQ scores, about what percent score between 70 and 130?
Show answer
About 95% (within 2 standard deviations)
Frequently asked questions
What does standard deviation tell you?
Standard deviation measures how spread out the values in a data set are from the mean. A small standard deviation means most values are close to the average; a large one means they are spread out. It is in the same units as the data, so a standard deviation of 5 points on a test means scores typically sit about 5 points from the mean.
What is the difference between sample and population standard deviation?
Use the population formula (divide by N) when your data includes every member of the group you care about. Use the sample formula (divide by n − 1) when your data is a sample used to estimate a larger population. Dividing by n − 1, called Bessel’s correction, makes the sample variance an unbiased estimate of the population variance. In most homework and real data, you want the sample standard deviation.
How do you calculate standard deviation step by step?
Find the mean. Subtract the mean from each value and square the result. Add up the squared deviations. Divide by n − 1 for a sample or by N for a population; this is the variance. Take the square root of the variance to get the standard deviation.
What is the relationship between variance and standard deviation?
Standard deviation is the square root of variance, and variance is the standard deviation squared. Variance is in squared units (points², cm²), which is hard to interpret, so standard deviation is usually reported instead.
Can standard deviation be negative?
No. It is the square root of an average of squared numbers, so it is always zero or positive. It is zero only when every value in the data set is the same.
What is a good or high standard deviation?
There is no universal cutoff; it depends on the scale of the data. A common way to judge it is the coefficient of variation, standard deviation ÷ mean. Comparing it to the range also helps: for roughly bell-shaped data, the range is often about 4 to 6 standard deviations.
How do you find standard deviation in Excel or Google Sheets?
Use =STDEV.S(A1:A20) for a sample and =STDEV.P(A1:A20) for a population. Google Sheets also accepts STDEV (sample) and STDEVP (population). On a TI-84, enter the data in L1, then STAT → CALC → 1-Var Stats: Sx is the sample standard deviation and σx is the population standard deviation.
Keep going in statistics
Standard deviation is the base for most of what comes next.
Statistics is easier when you can see every step.
Lessons, practice and an AI tutor that checks your working. Start the first lesson free.
Start Free