Home / Standard Deviation Calculator

Standard Deviation Calculator

Paste a data set to get mean, variance, and both population and sample standard deviation. Steps and the full formula are shown for each result.

Enter your data

Results

Population SD (sigma)--
Sample SD (s)--
Mean--
Population variance--
Sample variance--
Count (n)--
Enter data above and press Calculate.

What the Result Means

Standard deviation measures how spread out values are from the mean. A low value means the data clusters tightly around the average; a high value means individual points swing further away from it. Two data sets can share the same mean and still look completely different once you check the spread, which is exactly what this number captures.

Whether to read the population or sample figure depends on what your numbers represent. If the list you entered is the entire group you care about, such as every test score in one specific class, use population SD (sigma). If your list is a sample drawn from a bigger population, such as 30 patients standing in for an entire hospital, use sample SD (s), which divides by n - 1 instead of n to avoid understating the spread of the larger group.

Worked Example: 2, 4, 4, 4, 5, 5, 7, 9

This is the classic textbook example for standard deviation. Here is how to work through it step by step.

Data: 2, 4, 4, 4, 5, 5, 7, 9 (n = 8)
Step 1. Mean: (2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5
Step 2. Deviations from mean: 2-5=-3, 4-5=-1, 4-5=-1, 4-5=-1, 5-5=0, 5-5=0, 7-5=2, 9-5=4
Step 3. Square each deviation: 9, 1, 1, 1, 0, 0, 4, 16. Sum = 32
Step 4. Population variance: 32 / 8 = 4. Population SD = sqrt(4) = 2
Step 5. Sample variance: 32 / 7 = 4.571. Sample SD = sqrt(4.571) = about 2.138

How It's Calculated

Population SD: sigma = sqrt( sum((x - mean)^2) / n )
Sample SD: s = sqrt( sum((x - mean)^2) / (n - 1) )

The only difference between the two formulas is the denominator. Population SD divides by n, the full count. Sample SD divides by n - 1, a correction named after the statistician Friedrich Bessel that produces an unbiased estimate when your numbers are a sample rather than the entire population. In this worked example the two formulas differ by only a fraction, but on smaller samples the gap between sample and population SD grows noticeably wider.

For more on when to use each formula, see the Wikipedia entry on standard deviation.

Nearby statistics tools

Standard deviation pairs naturally with the mean, median, and mode from the same list.

Straight answers

Common questions on standard deviation

How can I calculate a standard deviation?

Find the mean, subtract it from each value and square the result, average those squared differences, then take the square root. Divide by n for population SD or by n-1 for sample SD. This calculator does each step and shows the working.

Do I use population or sample standard deviation?

Use population standard deviation (sigma) when your data set IS the entire group you care about. Use sample standard deviation (s) when your data is a subset drawn from a larger population. Sample SD divides by n-1 instead of n to correct for the smaller group size.

How do I calculate standard deviation on a calculator?

Paste your numbers into the box above, separated by commas or spaces. The calculator returns population SD, sample SD, mean, and variance with the full steps.

How do I calculate standard deviation in Excel?

Use =STDEV(range) for sample standard deviation or =STDEVP(range) for population standard deviation. In newer versions of Excel, STDEV.S and STDEV.P are the updated equivalents.

Marcus Vance
About the author
Marcus Vance
Contributing Writer, Technology & Data, Encore Editorial

Marcus Vance spent a decade building data pipelines and testing calculation logic before he started writing about the math behind the tools. On MathCalcTools he checks every formula against the source math, then writes out the steps so a reader can follow the same path a calculator takes.