Standard Deviation Calculator with Steps
Paste your numbers and choose sample or population. You get the standard deviation and variance, and a table that shows each deviation from the mean and its square.
Last reviewed
Sample standard deviation
2.138089935
variance 4.571428571 = 32 ÷ 7
- Count
- 8
- Mean
- 5
- Sum of squared deviations
- 32
- The population standard deviation
- 2
| Value x | x − mean | (x − mean)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
Use the sample figure when your numbers are a sample of a larger group, and the population figure when they are the whole group.
What standard deviation measures
The mean says where the middle of your numbers is. The standard deviation says how far the numbers typically sit from it. Two sets can share a mean of 50 and differ completely: one might run from 48 to 52, the other from 0 to 100. The standard deviation tells them apart.
How to calculate it
- Find the mean: add the numbers and divide by how many there are.
- Find each deviation: subtract the mean from each number.
- Square each deviation. Squaring makes every term positive, so highs and lows do not cancel.
- Add the squares. This is the sum of squared deviations, SS.
- Divide to get the variance. Divide SS by n − 1 for a sample, or by N for a population.
- Take the square root of the variance. That is the standard deviation.
In symbols, from the OpenStax textbook on introductory statistics, the sample standard deviation is s = √[Σ(x − x̄)² ÷ (n − 1)] and the population standard deviation is σ = √[Σ(x − μ)² ÷ N].
Sample or population?
Use the population figure when your numbers are every value in the group you care about, such as the marks of every student in one class. Use the sample figure when they are a sample of a larger group, such as a survey of 200 people drawn from a city. OpenStax explains that the sample denominator is the sample size minus 1, which corrects for the fact that a sample’s deviations are measured from the sample’s own mean.
Worked example
The numbers 2, 4, 4, 4, 5, 5, 7, 9.
| Value x | x − mean | (x − mean)² |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
The mean is 40 ÷ 8 = 5, and the sum of squared deviations is 32.
- Population: variance = 32 ÷ 8 = 4, so the standard deviation is 2.
- Sample: variance = 32 ÷ 7 = 4.5714, so the standard deviation is 2.1381.
A second check from the textbook
The textbook’s Example 2.32 has the ages of twenty fifth graders: 9, 9.5, 9.5, 10, 10, 10, 10, 10.5, 10.5, 10.5, 10.5, 11, 11, 11, 11, 11, 11, 11.5, 11.5, 11.5. The mean is 10.525, the sum of squared deviations is 9.7375, the sample variance is 9.7375 ÷ 19 = 0.5125, and the sample standard deviation is 0.7159. The calculator reproduces each of these figures.
Reading the result
- A standard deviation of zero means every number is the same.
- It is in the same units as the data, so 2 kg of spread is easy to picture, while a variance of 4 kg² is not.
- It is sensitive to outliers, because the deviations are squared. A single extreme value can raise it a lot.
- It compares spread only when the means are similar. To compare very different scales, divide by the mean.
Common mistakes
- Using n when you have a sample. That understates the spread.
- Using n − 1 for a whole population. That overstates it.
- Forgetting to take the square root. That gives the variance.
- Rounding the mean early. The working here is exact, so the answer is not thrown off by a rounded mean.
- Entering 1,000 as a number. Leave out thousands separators.
The statistics calculator adds the median, quartiles and outliers. For the mean alone, use the average calculator. To find how many standard deviations a value is from the mean, use the z-score calculator.
How it is calculated
Everything is exact decimal arithmetic to 50 digits, and results are shown to 12 significant figures. The table shows the first 40 numbers when there are more, and the totals use all of them.
Frequently asked questions
How do you calculate standard deviation?
Find the mean, subtract it from each number, square each difference and add the squares. Divide by n − 1 for a sample or by N for a population to get the variance, then take the square root.
What is the difference between sample and population standard deviation?
Population standard deviation divides the sum of squared deviations by N and applies when you have every value. Sample standard deviation divides by n − 1 and applies when your numbers are a sample of a larger group.
Why divide by n − 1 for a sample?
Deviations from the sample's own mean are on average smaller than deviations from the true mean, so dividing by n would understate the spread. OpenStax says the denominator for the sample standard deviation is the sample size minus 1.
What does a large standard deviation mean?
The numbers are spread out widely around the mean. A small standard deviation means they are clustered close to it. A standard deviation of zero means every number is the same.
Can the standard deviation be negative?
No. It is the square root of the variance, which is a sum of squares and cannot be negative. The smallest possible value is zero, when all the numbers are equal.
What is the difference between variance and standard deviation?
The variance is the average squared deviation, in squared units. The standard deviation is its square root, so it is in the same units as your data, which makes it easier to read.
Related calculators
- Statistics CalculatorEnter your numbers, separated by commas, spaces or new lines.
- Average CalculatorPaste a list of numbers to get the average, with the sum, count, smallest and largest.
- Z-Score CalculatorEnter a value, the mean and the standard deviation.
- Confidence Interval CalculatorChoose a mean with the standard deviation from your sample (t), a mean with a known standard deviation (z), or a proportion.
- Percent Error CalculatorEnter the value you measured and the accepted value.
- Percentage CalculatorPick the question you are actually asking.