How to calculate standard deviation
- Work out the mean of all values.
- Subtract the mean from each value and square the result.
- Add the squares and divide by n − 1 (sample) or by n (whole population) — that’s the variance.
- The standard deviation is the square root of the variance.
Example: for 4, 8, 6, 5, 3, 7, 9, 5 the mean is 5.875 and the sum of squared deviations 28.875. The sample variance is 28.875 ÷ 7 = 4.125, so the standard deviation ≈ 2.031. For a population: √(28.875 ÷ 8) ≈ 1.8998. The median is 5.5.
Sample or population?
If you have data on every member of the group you care about (e.g. all grades in a class), choose population. If it’s a subset of a larger group (e.g. a survey of 100 people from a city), choose sample — dividing by n − 1 corrects for the underestimated spread of a small sample. Spreadsheets have separate functions: STDEV.S and STDEV.P.
How to read the result
Standard deviation shows how spread out the values are around the mean. For roughly normal data, about 68% of values lie within one standard deviation of the mean and about 95% within two.
Frequently asked questions
How do I enter data?
Separate numbers with spaces, commas or semicolons, using a dot for decimals: “4, 8.5, 6”. You can paste a spreadsheet column — one number per line.
What’s the difference between variance and standard deviation?
Variance is the average squared deviation, so its units are squared. Standard deviation is its square root — in the same units as the data, and easier to interpret.