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.

Chris Terry
By Chris Terry, Editor
Updated June 20, 2026

Enter your data

Results

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

Standard deviation formula

Standard deviation measures how spread out values are from the mean. A low value means the data clusters tightly; a high value means it is more scattered.

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 called Bessel's correction that produces an unbiased estimate when you have a sample rather than the entire population.

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

This is the classic Wikipedia 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

For more on when to use each formula, see Standard deviation on Wikipedia.

More free math tools

Calculate an average with mean, median, and mode, or find the mean square error with the square root calculator.

Good to know

Frequently asked questions

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.

Chris Terry
About the author
Chris Terry
Editor, Encore Editorial

Editor at Encore Editorial, Chris Terry sets the editorial standards here and turns dense topics into plain English. He has written widely on education, finance, and consumer markets.