Standard Deviation Calculator
Paste a list of numbers to get the standard deviation, variance and mean, for a sample or a whole population, with the Excel formula that gives the same answer.
Updated
How to calculate standard deviation
- Type or paste your numbers into the box. Commas, spaces and line breaks all work, so a column copied from Excel can be pasted as it is.
- Choose whether the numbers are a sample or the whole population.
- Read the standard deviation, variance, mean, count and sum on the right.
The formulas
Sample standard deviation:
s = √( Σ(x − mean)² / (n − 1) )
Population standard deviation:
σ = √( Σ(x − mean)² / n )
x is each value, mean is the average of all the values, and n is how many values there are.
Worked example
Take the numbers 12, 15, 9, 20, 14, 18 and 11.
- Mean. Add them up (99) and divide by 7: 14.142857.
- Deviations. Subtract the mean from each value: −2.14, 0.86, −5.14, 5.86, −0.14, 3.86, −3.14.
- Square them and add: 4.59 + 0.73 + 26.45 + 34.31 + 0.02 + 14.88 + 9.88 = 90.857.
- Divide by n − 1 = 6 for a sample: 15.143. That is the variance.
- Square root: 3.891. That is the sample standard deviation.
For a population, divide by 7 instead: variance 12.980, standard deviation 3.603.
Standard deviation in Excel
| Function | Use it for |
|---|---|
=STDEV.S(A2:A8) |
A sample. Ignores text and empty cells. |
=STDEV.P(A2:A8) |
A whole population. |
=VAR.S(A2:A8) / =VAR.P(A2:A8) |
The variance. |
=AVERAGE(A2:A8) |
The mean. |
=STDEVA(A2:A8) |
A sample, counting text as 0 and TRUE as 1. |
The same function names work in Google Sheets.
How to read the result
For data that is roughly bell-shaped, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. With a mean of 14.14 and a standard deviation of 3.89, most values should fall between 10.25 and 18.03.
Standard deviation is sensitive to outliers. One extreme value can raise it sharply, so check the minimum and maximum before drawing conclusions.
Questions
What is standard deviation?
A measure of how spread out a set of numbers is around its mean. A small value means the numbers sit close to the average; a large value means they are widely scattered. It is in the same unit as the data.
Should I use sample or population standard deviation?
Use sample when your numbers are a subset of a larger group you want to describe, such as 50 surveyed customers out of thousands. Use population when you have every value, such as the test scores of an entire class.
Why does the sample formula divide by n − 1?
A sample tends to underestimate the spread of the full population, because its values are closer to their own mean than to the true mean. Dividing by n − 1 instead of n corrects for that.
Which Excel function calculates standard deviation?
STDEV.S for a sample and STDEV.P for a population. The older STDEV and STDEVP give the same results and still work.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean. Standard deviation is its square root, which puts the result back in the original unit.
Can the standard deviation be zero or negative?
It is zero when every number is the same. It is never negative.