Standard Deviation Calculator
: Find the sample and population standard deviation, variance, mean, standard error and mean absolute deviation of a list of numbers, with the working shownStandard Deviation Calculator
A standard deviation calculator for any list of numbers: paste a column from a spreadsheet or type the numbers with commas or spaces, and it gives the sample standard deviation and the population standard deviation side by side, with the variance, mean, count, sum, sum of squares, standard error of the mean, coefficient of variation and mean absolute deviation. The working is written out step by step with your own numbers, and a table shows each value's difference from the mean. The arithmetic is exact, so the variance never picks up floating-point noise.
How to use the standard deviation calculator
- Type or paste the numbers, separated by commas, spaces, tabs, semicolons or new lines. A column copied from a spreadsheet works, heading and all.
- Under
Data is, pickA samplewhen the numbers are some of a larger group, orA whole populationwhen they are every member of it. Both standard deviations are always shown; the choice decides which one leads and which working is written out. - Read the standard deviation at the top, then the variance, mean and the other figures.
Workingshows the five steps with your numbers. Copybeside a figure takes that number;Copy allorDownloadtakes the figures and the value-by-value table.
Example
The standard deviation of eight numbers, as a sample and as a whole population.
2, 4, 4, 4, 5, 5, 7, 9Standard deviation (sample, s): ≈ 2.13809
Standard deviation (population, σ): 2
Variance (sample, s²): ≈ 4.571429 (32/7)
Variance (population, σ²): 4
Mean: 5
1. Mean: sum ÷ count = 40 ÷ 8 = 5
2. Square each difference from the mean: (2 − 5)² = 9, (4 − 5)² = 1, (4 − 5)² = 1, (4 − 5)² = 1, (5 − 5)² = 0, (5 − 5)² = 0, (7 − 5)² = 4, (9 − 5)² = 16
3. Add them up (the sum of squares): 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
4. Divide by n − 1 = 7: 32 ÷ 7 = 32/7 ≈ 4.571429 (the sample variance, s²)
5. Square root: √(32/7) ≈ 2.13809 (the sample standard deviation, s)Details
- Standard deviation says how far the numbers in a list typically sit from their mean. A small value means they cluster tightly; a large one means they are spread out. Six weights of 50.1, 49.8, 50.3, 49.9, 50.4 and 49.7 g have a sample standard deviation of about 0.280476 g around a mean of 50.033333 g, while test scores of 85, 90, 78, 92, 85, 88, 76 and 95 have one of about 6.577831 around a mean of 86.125.
- How to calculate standard deviation by hand, in five steps: find the mean; subtract it from each number and square the result; add those squares up (the sum of squares); divide by n − 1 for a sample or by n for a population, which gives the variance; take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the sum of squares is 32, and dividing by 8 gives a population variance of 4, so the population standard deviation is 2.
- Sample or population: the sample standard deviation formula divides the sum of squares by n − 1, the population formula by n. Use the sample one (s) when your numbers are a sample drawn from something larger, such as 8 parts measured out of a production run, because dividing by n − 1 corrects for a sample understating the spread of the whole group. Use the population one (σ) when the list is the whole group, such as every student in one class. For the example, s is about 2.13809 and σ is 2; the gap shrinks as the list gets longer. Spreadsheets call them STDEV.S and STDEV.P.
- It is a variance calculator too: the variance is the standard deviation squared, or the sum of squares divided by n − 1 (sample variance) or n (population variance). It is in squared units, which is why the standard deviation, in the same units as the data, is the figure usually quoted. Decimals are kept exact, so the population variance of 0.1, 0.2 and 0.3 is shown as ≈ 0.006667 (1/150) and not a float such as 0.006666666666666668.
- Mean absolute deviation is the average distance from the mean without squaring: take each difference from the mean, drop its sign, and average them. For the example it is 1.5. Squaring makes the standard deviation react more to values far from the mean: change the 9 to 90 and the mean absolute deviation becomes 18.71875 while the sample standard deviation jumps to about 30.28643.
- The standard error of the mean is the sample standard deviation divided by the square root of the count, about 0.755929 for the example. It estimates how far the mean of a sample this size typically lands from the mean of the whole group, and it shrinks as you collect more values.
- The coefficient of variation, also called the relative standard deviation (RSD), is the standard deviation divided by the mean, as a percentage: ≈ 42.76% for the example as a sample and 40% as a population. It compares the spread of lists with different units or sizes, and it is not shown when the mean is 0.
Limits
- Any length of list: a file of up to 50 MB (millions of numbers) is worked out in the background with a progress line and a Cancel button, and over 2 million characters it waits for
Run. Each number can have up to 30 digits; a list with numbers of more than 15 digits, or fractions that never end such as1/3, is limited to 1,000,000 numbers. The value-by-value table lists the first 500; every value counts in the figures. - A sample standard deviation, sample variance and standard error need at least 2 numbers, because they divide by n − 1.
- Numbers can be whole, decimal, negative, fractions (
3/4) or in scientific notation (2.5e-3). Commas always separate numbers, so type 1,250 as1250. - A
$,€or£in front of a number and a%after it are ignored, with a note. Other units or words make an error that names the value; a heading on the first line of a pasted column is skipped. - The mean, sum of squares, variance and mean absolute deviation are exact. Square roots are exact when they come out even (√4 = 2) and are otherwise rounded to 6 decimal places, so a standard deviation far smaller than 0.000001 shows as 0.
- One list of raw values at a time: no frequency table or grouped data as input, no confidence interval or margin of error, and no z-scores.
FAQ
How do you calculate standard deviation?
Find the mean, square each number's difference from it, add the squares, divide by n − 1 (sample) or n (population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9: the mean is 5, the squares add up to 32, 32 ÷ 7 is about 4.571429, and its square root is about 2.13809.
What is the difference between sample and population standard deviation?
Only the divisor: the sample standard deviation divides the sum of squares by n − 1, the population standard deviation by n. Use the sample version when the data is part of a larger group you want to describe, and the population version when you have every member. Unless every value is the same, the sample figure is a little larger: about 2.13809 against 2 for the example.
What is the difference between variance and standard deviation?
The standard deviation is the square root of the variance. The variance is in squared units (cm², dollars²), the standard deviation is in the units of the data, which makes it easier to read next to the mean. For the example the population variance is 4 and the population standard deviation is 2.
Can the standard deviation be 0 or negative?
It is 0 only when every value is the same, and it is never negative, because it is the square root of an average of squares.
Does it match the standard deviation on a TI-84 or in Excel?
Yes. On a TI-84, 1-Var Stats shows Sx (the sample standard deviation) and σx (the population one); in Excel and Google Sheets they are STDEV.S and STDEV.P, with VAR.S and VAR.P for the variances. This page shows the same pairs, to 6 decimal places.
Runs entirely in your browser. Nothing is uploaded.