free tool, no sign-up
Standard Deviation Calculator
Calculate the sample and population standard deviation of a list of numbers, with the variance and the steps.
Separate numbers with commas, spaces, or new lines. Decimals and negatives are allowed. Write 1000, not 1,000.
Enter numbers separated by commas, spaces, or new lines.
Enter numbers separated by commas, spaces, or new lines.
This standard deviation calculator finds the sample standard deviation and the population standard deviation of a list of numbers. The sample divides the sum of squared deviations by n − 1, which is the homework default. The population divides by N. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the sum of squared deviations is 32, the population standard deviation is 2, and the sample standard deviation is √(32/7). A list of 30 or fewer values shows each deviation from the mean. The math runs in your browser.
How to calculate standard deviation
Standard deviation measures how far the numbers sit from their mean. Subtract the mean from each value, square those deviations, and add the squares. That total is the sum of squared deviations. Divide it by the count, or by one less than the count, then take the square root. The square of the standard deviation is the variance.
For 2, 4, 4, 4, 5, 5, 7, and 9, the sum is 40 and the mean is 40/8 = 5. The deviations from 5 are −3, −1, −1, −1, 0, 0, 2, and 4. The squared deviations are 9, 1, 1, 1, 0, 0, 4, and 16. Their sum is 32.
Sample standard deviation and population standard deviation
Use the population standard deviation, σ, when the list is the whole group. Divide the sum of squared deviations by N. Here N is 8, so the population variance σ² is 32/8 = 4, and σ is √4 = 2.
Use the sample standard deviation, s, when the list is a sample and you are estimating a larger group. That is the usual homework choice. Divide by n − 1 instead of N. The sample variance s² is 32/7, and the sample standard deviation is √(32/7), which is about 2.1380899 when the decimal is rounded to 8 significant figures. Dividing by n − 1, called Bessel's correction, keeps the variance from running small after the mean itself was estimated from the sample. The square root still uses that same denominator.
A single number has a population standard deviation of 0, because its only deviation is 0. The sample standard deviation is undefined, because n − 1 is 0 and the formula cannot divide by 0. The same is true of the sample variance.
What the standard deviation calculator shows
Paste or type numbers separated by commas, spaces, or new lines. The page shows n, the mean, the sum of squared deviations, both variances, and both standard deviations. Sample s is the lead result. Population σ is beside it. A list of 30 or fewer values lists each value, its deviation from the mean, and the squared deviation. A longer list shortens that row-by-row table and still uses every value in the sums. An entry that is not a number is skipped, and the page names it.
A z-score says how many standard deviations one value sits from the mean. The mean, median, and mode calculator summarizes the center of the same kind of list.
Related calculators
Frequently Asked Questions
How do you calculate standard deviation?
Work out the variance first, then take its square root. The variance is the sum of squared deviations from the mean divided by N for a population, or by n − 1 for a sample. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the sum of squared deviations is 32, and the population standard deviation is √(32/8) = 2.
What is the difference between sample and population standard deviation?
Both start from the same sum of squared deviations. The population standard deviation divides by N, the size of the whole group. The sample standard deviation divides by n − 1. For 2, 4, 4, 4, 5, 5, 7, 9 the population standard deviation is 2 and the sample standard deviation is √(32/7).
How do you interpret a standard deviation?
It is a typical distance from the mean, in the same units as the data. For data shaped roughly like a bell curve, the empirical rule says about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. For 2, 4, 4, 4, 5, 5, 7, 9, with mean 5 and population standard deviation 2, six of the eight values lie between 3 and 7.
What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9?
The mean is 5 and the sum of squared deviations is 32. The population variance is 4 and the population standard deviation is 2. The sample variance is 32/7 and the sample standard deviation is √(32/7), about 2.1380899 rounded to 8 significant figures.
Can the standard deviation be zero, and when is it undefined?
It is 0 when every value equals the mean, including a list of one number under the population formula. The sample standard deviation of one number is undefined, because the formula would divide by 0. A negative standard deviation is not a result of this formula, because it is a square root.