Standard Deviation Calculator
Population and sample standard deviation and variance.
Example
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squared deviations add up to 32. Population variance = 32 / 8 = 4, so the population standard deviation is 2. Sample variance = 32 / 7, so the sample standard deviation is about 2.138.
What standard deviation measures
Standard deviation measures how spread out numbers are around their mean. A small value means the data points are close to the average. A large value means they are spread widely.
Population vs sample standard deviation
Use the population formula, σ = √(Σ(x - μ)² / N), when your list contains every value in the group you care about. Use the sample formula, s = √(Σ(x - x-bar)² / (n - 1)), when your list is only a sample from a larger group. Dividing by n - 1 instead of n corrects for the fact that a sample tends to underestimate the spread of the whole population. This calculator shows both, so you can pick the one that matches your data.
How to calculate it step by step
- Find the mean: add all values and divide by how many there are.
- Subtract the mean from each value and square the result.
- Add up the squared differences.
- Divide by N for a population, or by n - 1 for a sample. This is the variance.
- Take the square root of the variance.
Worked example
For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5. The squared differences from the mean are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. The population variance is 32 / 8 = 4, so the population standard deviation is 2. The sample variance is 32 / 7 = 4.571, so the sample standard deviation is about 2.138.
Tips for reading the result
- Standard deviation uses the same units as your data, while variance uses squared units.
- For data with a roughly bell-shaped distribution, about 68% of values fall within one standard deviation of the mean and about 95% within two.
- One extreme value can raise the standard deviation a lot, so check for outliers.
- Standard deviation is never negative, and it is 0 only when every value is the same.
Related calculators
For the average, middle value and most common value of the same list, use the mean, median and mode calculator.