Standard deviation tells you how spread out a set of numbers is around the average — the single most useful measure of variability in statistics. A low standard deviation means the values cluster tightly around the mean; a high standard deviation means they are scattered widely. This guide walks through how to calculate standard deviation by hand, the difference between sample and population formulas, and a worked example you can check against. For instant results, use the free standard deviation calculator.
What Is Standard Deviation?
Standard deviation (usually written σ for a population or s for a sample) measures the typical distance between each data point and the mean. It answers the question: “on average, how far do the values sit from the centre?” Because it is expressed in the same units as the original data (dollars, kilograms, marks), you can interpret it directly. Standard deviation is the square root of the variance, which makes variance — the average of squared deviations — interpretable again.
Sample vs Population Standard Deviation
The two formulas differ in one symbol:
- Population (σ): divide the sum of squared deviations by N (the full population size). Use when you have every member of the group.
- Sample (s): divide by N − 1 (the degrees of freedom). Use when your data is a sample used to estimate a population.
Dividing by N − 1 (Bessel’s correction) makes the sample estimate slightly larger, correcting the tendency of a small sample to understate the population’s spread. When in doubt, most real-world data is a sample — use N − 1. Spreadsheets and calculators offer both (STDEV.S vs STDEV.P in Excel).
The Standard Deviation Formula
s = √( Σ(x − x̄)² ÷ (n − 1) )
Where:
- x = each data point
- x̄ = the mean of the data
- n = the number of data points
- Σ = “sum of” across all data points
How to Calculate Standard Deviation: Step by Step
- Find the mean (x̄): add all data points and divide by n.
- Subtract the mean from each data point: these are the deviations (x − x̄).
- Square each deviation: (x − x̄)².
- Sum the squared deviations: Σ(x − x̄)².
- Divide by n − 1 (sample) or N (population): this is the variance.
- Take the square root: this is the standard deviation.
Worked Example
Data set: 4, 8, 6, 5, 3, 9, 5 (a sample of seven test scores)
Step 1 — Mean: (4 + 8 + 6 + 5 + 3 + 9 + 5) ÷ 7 = 40 ÷ 7 = 5.714
Step 2 and 3 — Deviations and squares:
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 4 | −1.714 | 2.939 |
| 8 | 2.286 | 5.224 |
| 6 | 0.286 | 0.082 |
| 5 | −0.714 | 0.510 |
| 3 | −2.714 | 7.367 |
| 9 | 3.286 | 10.796 |
| 5 | −0.714 | 0.510 |
Step 4 — Sum of squares: 2.939 + 5.224 + 0.082 + 0.510 + 7.367 + 10.796 + 0.510 = 27.429
Step 5 — Variance (sample): 27.429 ÷ (7 − 1) = 27.429 ÷ 6 = 4.571
Step 6 — Standard deviation: √4.571 = 2.14
Check: the same data set gives a population standard deviation of √(27.429 ÷ 7) = 1.98.
Why Square the Deviations?
Squaring does two jobs: it stops negative and positive deviations from cancelling each other out (they must all count as distance), and it weights larger deviations more heavily, so big outliers increase the spread measure more than small ones. Taking the square root at the end reverses the squaring so the answer returns to the original units.
Interpreting Standard Deviation
- Low σ (relative to the mean): data is consistent and clustered.
- High σ: data is volatile or varied.
- σ = 0: every value is identical.
- In normal distributions, roughly 68% of values lie within 1 standard deviation of the mean and 95% within 2 standard deviations (the empirical rule).
Standard Deviation vs Variance
Variance is the average squared deviation (step 5 above). Standard deviation is its square root. Variance is used in further statistical formulas, but standard deviation is the figure people quote because its units match the data.
Common Mistakes
- Using the wrong divisor — n vs n − 1 changes the result (1.98 vs 2.14 in our example).
- Forgetting to square the deviations before summing.
- Forgetting the final square root and reporting the variance as the standard deviation.
- Dividing by n before finding the mean — order of operations matters.
FAQ
How do I calculate standard deviation quickly?
Enter your data set into the free standard deviation calculator — it returns the sample and population standard deviation, variance, mean, and count instantly.
When should I use n or n − 1?
Use n when your data includes the entire population. Use n − 1 when your data is a sample drawn from a larger population — the usual case in real-world analysis.
What does a standard deviation of 0 mean?
Every value in the data set is exactly the same. There is no spread at all, so the average distance from the mean is zero.
Is standard deviation the same as variance?
No. Variance is the average of the squared deviations; standard deviation is the square root of the variance. Standard deviation is in the data’s original units, variance in squared units.
Can standard deviation be negative?
No. Because it is the square root of a sum of squares, standard deviation is always zero or positive. A negative result means an arithmetic error somewhere in the steps.
