Standard Deviation Calculator
Paste or type your data, and choose whether it is a sample or a whole population.
Need the full working for a harder problem? Try the statistics step-by-step solver.
The formula
Sample: s = √(Σ(x − mean)² ÷ (n − 1)). Population: σ = √(Σ(x − mean)² ÷ n).
Worked example
Weekly sales for five weeks were 120, 135, 128, 142 and 125. How variable are they?
- Mean: 650 ÷ 5 = 130
- Deviations: −10, 5, −2, 12, −5
- Squared and summed: 100 + 25 + 4 + 144 + 25 = 298
- Sample variance: 298 ÷ 4 = 74.5
- Square root: √74.5 = 8.63
The sample standard deviation is 8.63. Treating the five weeks as the whole population gives 7.72.
How it works
Find the mean
Add the values and divide by how many there are.
Square the deviations
Subtract the mean from each value, square each result, and add them up.
Divide
By n − 1 for a sample or n for a population. That is the variance.
Take the square root
The standard deviation is the square root of the variance.
Good to know
- In Excel and Google Sheets, STDEV.S is the sample formula and STDEV.P is the population formula.
- The standard deviation has the same units as the data; the variance has those units squared.
- A single outlier can inflate the result sharply, because deviations are squared.
Common questions
Sample or population?
Use sample when your data is part of a larger group you want to draw conclusions about. Use population when you have every value in the group.
What does a large standard deviation mean?
The values are spread far from the mean. A small one means they cluster closely around it.
What is the coefficient of variation?
The standard deviation as a percentage of the mean, which lets you compare spread across different scales. For the sales data it is 8.63 ÷ 130 × 100 = 6.6%.
What is the standard error of the mean?
The standard deviation divided by the square root of the sample size. It measures how precisely the sample mean estimates the true mean. Here it is 8.63 ÷ √5 = 3.86.
What does the 68–95–99.7 rule say?
For roughly normal data, about 68% of values lie within one standard deviation of the mean, 95% within two and 99.7% within three.