How to use the standard deviation calculator
- Type or paste your numbers into Data set, separated by commas, spaces, semicolons or new lines. Use a period for decimals and leave out thousands commas, so write 1500 and not 1,500.
- Both answers are always shown. Pick Sample (s) when your numbers are a subset of a bigger group, or Population (σ) when they are every value in the group. The choice sets the headline result, the steps and the shaded band on the plot.
- Read the standard deviation, variance, mean, median, mode and range. Anything that is not a number is skipped and listed under the box.
- Press Reset to the example to bring back the starting data, or Clear to start fresh.
How standard deviation is calculated
First find the mean, then square each value's distance from it and add the squares. Divide by N for a population or by n - 1 for a sample, then take the square root. In symbols, σ = √(Σ(x - x̄)² ÷ N) and s = √(Σ(x - x̄)² ÷ (n - 1)); the n - 1 divisor is Bessel's correction, which stops a sample from understating the spread of the group it came from. These are the definitions in the NIST/SEMATECH e-Handbook of Statistical Methods.
Worked example with the starting data
The page opens with 4, 8, 6, 5, 3, 7, 8, 9, 2, 10. There are 10 values that add up to 62, so the mean is 6.2. The squared distances from 6.2 add up to 63.6. For a sample, 63.6 ÷ 9 = 7.0667 and s = 2.65832027. For a population, 63.6 ÷ 10 = 6.36 and σ = 2.52190404. The median is 6.5, the mode is 8 and the range is 8.
Limits and edge cases
A sample standard deviation needs at least two values, because it divides by n - 1, so with one number it shows a message and the population figure is 0. When every value is the same the standard deviation is 0. The tool reads up to 200,000 numbers, shows the first 20 rows of the working, and switches the plot from dots to a histogram above 300 values. Numbers such as 1e3 are accepted, and words, hex codes and Infinity are skipped and listed. Results keep 12 significant digits. Standard deviation is sensitive to outliers, so check the range and plot first. For a plain mean or a weighted average use the average calculator, for chance and odds the probability calculator, and for quick sums the scientific calculator.
Source: NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6 Measures of Scale.
Standard deviation FAQ
What is the difference between sample and population standard deviation?
Population standard deviation (σ) divides by N and is used when your data is every value in the group. Sample standard deviation (s) divides by n - 1 and is used when your data is only a subset. The sample figure is always a little larger.
Why does the sample formula divide by n - 1?
A sample sits closer to its own mean than to the true mean of the whole group, so dividing by n would understate the spread. Dividing by n - 1, known as Bessel's correction, removes that bias from the variance.
What does a high or low standard deviation mean?
A low standard deviation means the values cluster close to the mean, and a high one means they are spread out. For roughly bell-shaped data, about 68% of values fall within one standard deviation of the mean and about 95% within two.
Can standard deviation be negative or zero?
It is never negative, because it is a square root. It is zero only when every value is identical, so there is no spread at all.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean, and standard deviation is its square root. The standard deviation is in the same units as your data, so it is easier to read. For the starting data the sample variance is 7.0667 and s is 2.65832027.