Standard Deviation Calculator
Paste a list of numbers, or enter a frequency table, and get the standard deviation, variance and mean. Switch between sample and population, see how your values spread around the average, and follow every step of the working.
Your result
Enter some numbers above to see the result.
How your values are spread
The dashed line is the mean. The shaded band runs from one standard deviation below the mean to one above it.
Where your values fall
Step by step
The working table is only shown for up to 30 different values.
For learning and quick checks. Results are rounded to the decimal places you choose, but the calculation itself uses full precision. The 68-95-99.7 comparison only applies to roughly bell-shaped data.
What standard deviation tells you
An average on its own can hide a lot. Two classes can both score 70 on average, yet in one almost everyone is close to 70 and in the other the marks run from 40 to 100. Standard deviation is the number that tells those two situations apart. It measures how far values typically sit from their mean.
A small standard deviation means the numbers are bunched up near the average, so the average is a good description of the whole set. A large one means the values are scattered, and the average on its own is a poor summary. It is measured in the same units as your data, which is what makes it so handy.
How to use this calculator
- Choose List of numbers and type or paste your values, or choose Frequency table if you have counts, such as 3 people scored 4.
- Pick Sample if your numbers are a selection from a bigger group, or Population if they are every value there is.
- Read the standard deviation at the top. Below it you will find the variance, mean, standard error, coefficient of variation, a chart, and the full working.
- Open Find the z-score to see where one particular value sits compared with the rest.
Sample or population: which one to pick
The only difference is the number you divide by. For a population you divide by n, the number of values. For a sample you divide by n minus 1.
Why the difference? When you only have a sample, the values naturally sit a little closer to their own mean than to the true mean of the whole group, so dividing by n would underestimate the spread. Dividing by n minus 1 corrects for this. With a handful of values the gap is large. With hundreds it is tiny.
If you measured every item you care about, such as every student in one class or every month in a year, use population. If you measured some items to learn about a larger group, such as 40 customers out of thousands, use sample. If you are not sure, sample is the safer choice for real-world data.
The formulas
Mean: μ = sum of values ÷ n
Population variance: σ² = Σ(x − mean)² ÷ n
Sample variance: s² = Σ(x − mean)² ÷ (n − 1)
Standard deviation = square root of the variance
Standard error of the mean = s ÷ √n
Coefficient of variation = standard deviation ÷ mean × 100
z-score = (x − mean) ÷ standard deviation
Worked examples
By hand, step by step
Take the eight numbers 2, 4, 4, 4, 5, 5, 7, 9. Their sum is 40, so the mean is 5. The differences from the mean are −3, −1, −1, −1, 0, 0, 2 and 4. Squared, these become 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32.
If this is the whole population, the variance is 32 / 8 = 4 and the standard deviation is 2. If it is a sample, the variance is 32 / 7 = 4.571 and the standard deviation is 2.138. The standard error of the mean is 2.138 / √8 = 0.756.
Same mean, very different spread
Class A scored 68, 69, 70, 70, 71 and 72. Class B scored 40, 55, 70, 70, 85 and 100. Both classes average exactly 70. In class A the sample standard deviation is only 1.41, so almost everyone is within a couple of marks of the average. In class B it is 21.21, so the average hides a huge range of results. Without the standard deviation you would never know.
Reading a z-score
In the first example the value 9 is 4 above the mean of 5. With a sample standard deviation of 2.138 its z-score is 4 / 2.138 = 1.87. It sits nearly two standard deviations above the average, so it is high for this data set, though not extreme.
The 68-95-99.7 rule
When data forms a bell shape, with most values near the middle and fewer at the extremes, about 68 percent of the values land within one standard deviation of the mean, about 95 percent within two, and about 99.7 percent within three. Heights, measurement errors and many test scores follow this pattern closely.
The table in the results compares those figures with what actually happens in your numbers. If your data is lopsided, has two peaks, or contains a few extreme values, the real percentages can be quite different. That is useful information in itself: it tells you the bell-curve rule of thumb should not be applied.
Comparing spread with the coefficient of variation
A standard deviation of 5 means one thing for values around 20 and something quite different for values around 2,000. The coefficient of variation divides the standard deviation by the mean and shows it as a percentage, so you can compare the relative spread of data sets that have different averages or even different units. It is only meaningful when the values are all positive and the mean is not close to zero.
Common mistakes
- Using the population formula for a small sample, which understates the spread.
- Reading the standard deviation as a typical or average distance from the mean. It is close to that idea but slightly larger, because the squaring gives extra weight to bigger gaps.
- Ignoring outliers. A single extreme value can inflate the result dramatically, so check your data for typing errors.
- Applying the 68-95-99.7 rule to data that is not bell-shaped.
- Entering decimals with a comma. Use a full stop, since commas separate the numbers.
Frequently asked questions
What is standard deviation?
Standard deviation is a single number that tells you how spread out a set of values is around its average. A small standard deviation means the values sit close to the mean. A large one means they are scattered widely. It is measured in the same units as the data, so the standard deviation of heights in centimetres is also in centimetres.
What is the difference between sample and population standard deviation?
Use the population version when your list contains every value you care about, such as the scores of all 30 students in one class. Use the sample version when your list is only a selection from a larger group, such as 30 customers surveyed out of thousands. The population formula divides by n, the sample formula divides by n minus 1. Most real-world data is a sample, so the sample figure is the usual choice.
Why does the sample formula divide by n minus 1?
A sample tends to sit a little closer to its own mean than to the true mean of the whole population, so dividing by n would slightly understate the spread. Dividing by n minus 1 corrects for that and gives a better estimate. The adjustment matters a lot for small samples and very little once you have hundreds of values.
How do I calculate standard deviation by hand?
Find the mean. Subtract the mean from every value and square each difference. Add up the squares, then divide by n for a population or by n minus 1 for a sample. That result is the variance. The square root of the variance is the standard deviation. The calculator shows each of these steps for your numbers in the table under the result.
What is the difference between variance and standard deviation?
Variance is the average of the squared differences from the mean, so it is in squared units, such as square metres for lengths in metres. The standard deviation is its square root, which brings the figure back to the original units and makes it much easier to interpret.
Is a high or low standard deviation better?
Neither is better in itself. It depends on what you are measuring. For the weight of packaged flour you want a very low standard deviation, because that means consistent packing. For a creative writing contest you might want a wide spread of ideas. To compare spread between data sets with different averages or units, use the coefficient of variation, which divides the standard deviation by the mean.
Can the standard deviation be zero or negative?
It can be zero, and that happens when every value is identical, so there is no spread at all. It can never be negative, because it is the square root of an average of squared numbers.
What is the 68-95-99.7 rule?
For data that follows a roughly bell-shaped, normal distribution, about 68 percent of values fall within one standard deviation of the mean, about 95 percent within two, and about 99.7 percent within three. The calculator shows these ranges for your data next to how many of your actual values fall inside each. If your data is skewed or has a few extreme values, the real shares can differ a lot.
What is a z-score?
A z-score says how many standard deviations a value is above or below the mean. A z-score of 2 means the value is two standard deviations above average, and a score of minus 1 means one standard deviation below. Type a value into the z-score box under More options to see it for your data.
What is the difference between standard deviation and standard error?
Standard deviation describes the spread of individual values in your data. Standard error of the mean describes how precisely the sample mean estimates the true mean, and equals the sample standard deviation divided by the square root of n. Collecting more data does not change the standard deviation much, but it does shrink the standard error.
How do outliers affect standard deviation?
A lot. Because differences are squared, one extreme value can pull the standard deviation up sharply. If your data has outliers, check them for errors, and consider reporting the median and the interquartile range alongside the standard deviation.
Is anything I type saved or sent anywhere?
No. The sums run in your browser and nothing you enter is uploaded or stored on our servers.
Related calculators
For the mean, median, mode and outliers of the same data, try the average calculator. For quick percentage sums, there is the percentage calculator, and for anything heavier, the scientific calculator.