Standard deviation tells you how spread out a set of numbers is. A small value means the numbers sit close to the average. A large value means they are scattered widely. It is the most common way to measure variability in statistics, school grades, test results, finance and quality control.
What Standard Deviation Actually Measures
Two classes can both have an average test score of 80 and still be very different. In one class everyone scored between 78 and 82. In the other, scores range from 50 to 100. The average is identical, but the second class is far more spread out. Standard deviation puts a single number on that difference.
It is expressed in the same units as your data. If you measure heights in centimeters, the standard deviation is in centimeters too. That makes it easier to interpret than variance, which is in squared units.

The Two Formulas: Population vs Sample
There are two versions, and choosing the right one matters.
Population: σ = √( Σ(x − μ)² ÷ N )
Sample: s = √( Σ(x − x̄)² ÷ (n − 1) )
- x is each value in the data set.
- μ or x̄ is the mean (average).
- N or n is how many values there are.
- Σ means "add up everything that follows".
Use the population formula when your data contains every member of the group you care about, for example the scores of all 30 students in one class. Use the sample formula when your data is only a part of a bigger group, for example 30 students chosen to represent a whole school. The sample version divides by n − 1 instead of n. This small change corrects for the fact that a sample tends to underestimate the real spread. If you are unsure which to use, the sample formula is the safer default in most real-world studies.
How to Calculate Standard Deviation Step by Step
- Find the mean. Add all values and divide by how many there are.
- Subtract the mean from each value. These are the deviations. Some will be negative.
- Square each deviation. This removes the negative signs and gives extra weight to values far from the mean.
- Add the squared deviations.
- Divide. By N for a population, or by n − 1 for a sample. The result is the variance.
- Take the square root of the variance. That is the standard deviation.
Example 1: A Small Data Set
Take the values 2, 4, 4, 4, 5, 5, 7, 9.
- Mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5.
- Deviations: −3, −1, −1, −1, 0, 0, 2, 4.
- Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16.
- Sum of squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
- Population variance: 32 ÷ 8 = 4. Sample variance: 32 ÷ 7 ≈ 4.571.
- Population standard deviation: √4 = 2. Sample standard deviation: √4.571 ≈ 2.138.
Notice that the sample result is slightly larger. That is the n − 1 correction at work, and the gap shrinks as the data set grows.
Example 2: Test Scores
Five students score 72, 85, 90, 68 and 95. Treat this as a sample from a larger group.
| Score (x) | x − mean (82) | (x − mean)² |
|---|---|---|
| 72 | −10 | 100 |
| 85 | 3 | 9 |
| 90 | 8 | 64 |
| 68 | −14 | 196 |
| 95 | 13 | 169 |
| Total | 0 | 538 |
The mean is 410 ÷ 5 = 82. The deviations always add up to zero, which is a handy check on your arithmetic. The sum of squares is 538.
- Sample variance: 538 ÷ 4 = 134.5
- Sample standard deviation: √134.5 ≈ 11.60
- Population standard deviation (if these five were the whole group): √(538 ÷ 5) = √107.6 ≈ 10.37
So a typical score in this group sits roughly 11 points away from the average of 82.
How to Interpret the Result
For data that follows a bell-shaped (normal) distribution, a useful rule of thumb applies:
| Range | Share of data inside it |
|---|---|
| Mean ± 1 standard deviation | about 68% |
| Mean ± 2 standard deviations | about 95% |
| Mean ± 3 standard deviations | about 99.7% |
If exam scores have a mean of 82 and a standard deviation of 10, about two thirds of students scored between 72 and 92. A score of 102 would be two standard deviations above the mean, which is unusually high. This rule only works well for roughly symmetric, bell-shaped data. Skewed data or data with extreme outliers does not follow these percentages.
Common Mistakes
- Using the wrong formula. Dividing by N when you have a sample, or n − 1 when you have a full population, gives a slightly wrong answer.
- Forgetting the square root. The variance is not the standard deviation. If your answer seems too large, check this step.
- Not squaring the deviations. Adding raw deviations always gives zero.
- Rounding too early. Keep several decimals until the final step.
- Ignoring outliers. One extreme value can inflate the standard deviation a lot. Check your data for typing errors.
Standard Deviation vs Variance
Variance is the average squared deviation. Standard deviation is its square root. Both describe spread, but standard deviation is in the original units, so it is usually the one you report. Variance is more convenient in advanced statistics because variances of independent variables add up neatly.
Where Standard Deviation Is Used
- Education: comparing how consistent exam results are between classes.
- Finance: measuring the volatility of an investment. Higher standard deviation of returns means higher risk.
- Manufacturing: checking whether parts stay within tolerance.
- Science: reporting the uncertainty of repeated measurements.
- Weather and health: describing how much daily temperatures or blood pressure readings vary.
Check Your Work Instantly
Enter your numbers into our free standard deviation calculator. It returns the mean, variance and both population and sample standard deviation at once. If you only need the mean, try the average calculator.
Frequently Asked Questions
Can standard deviation be negative?
No. It is a square root of a sum of squares, so it is zero or positive.
What does a standard deviation of zero mean?
Every value in the data set is identical. There is no spread at all.
Is a high standard deviation bad?
Not necessarily. It only means the data is spread out. Whether that is good or bad depends on context. In manufacturing you want it low. In a diversified set of ideas, higher variety may be fine.
How many data points do I need?
You can calculate it with as few as two values, but the result becomes more reliable as the sample grows.