How it works
Standard deviation measures how spread out values are around their mean: a small value means the data cluster tightly, a large one means they are scattered. It is the workhorse of statistics — in lab reports, test-score analysis, finance (volatility) and quality control. This calculator shows the full working, not just the answer: each value’s deviation from the mean and its square, so you can check homework or explain a result.
mean x̄ = Σx ÷ n sample variance s² = Σ(x − x̄)² ÷ (n − 1) · population variance σ² = Σ(x − μ)² ÷ n standard deviation = √variance · standard error = s ÷ √nWorked example. Data: 2, 4, 4, 4, 5, 5, 7, 9. The sum is 40 and n = 8, so the mean is 5. Squared deviations: 9, 1, 1, 1, 0, 0, 4, 16 — total 32. As a population: variance = 32 ÷ 8 = 4 and SD = 2. As a sample: variance = 32 ÷ 7 = 4.5714 and SD = 2.1381; standard error = 2.1381 ÷ √8 = 0.7559; coefficient of variation = 42.76%.
How to calculate standard deviation by hand
- Find the mean: add the values and divide by how many there are.
- Subtract the mean from each value. The deviations always add up to zero.
- Square each deviation so negatives don’t cancel positives.
- Add the squares (the “sum of squares”), then divide by n − 1 for a sample or n for a population. That is the variance.
- Take the square root to get the standard deviation, back in the original units.
Sample or population?
Use population when your numbers include every member of the group you care about — every employee’s salary in a 20-person company, say. Use sample when the numbers are drawn from a larger group you want to describe, which is the usual case in surveys and experiments. Dividing by n − 1 (Bessel’s correction) offsets a sample’s tendency to understate the true spread, so the sample SD is always a little larger. In Excel and Google Sheets, STDEV.S is the sample version and STDEV.P the population version; on a TI-84, Sx is sample and σx is population.
Interpreting the result
- The 68–95–99.7 rule: for roughly normal data, about 68% of values fall within 1 SD of the mean, 95% within 2 and 99.7% within 3.
- Coefficient of variation (SD ÷ mean × 100) compares spread between groups with different scales — an SD of 5 is small around a mean of 90 but large around 40.
- Standard error describes how precisely the sample mean estimates the true mean; it shrinks as n grows.
- To see how unusual a single value is, convert it to a z-score with the z-score calculator.
Example: test scores
Five scores: 85, 90, 78, 92, 88. Mean 86.6, sum of squares 119.2, sample variance 29.8, SD 5.46 points — most scores sit between about 81 and 92.
Need the mean, median and mode too? Use the average calculator. Planning a survey? The sample size calculator tells you how many responses you need.