What Standard Deviation Calculator does
Standard deviation measures how far a set of numbers typically sits from its mean. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared deviations add up to 32, the population standard deviation is exactly 2 and the sample standard deviation is 2.1381. Enter any list here and you get both versions side by side, so you do not have to rerun anything if you picked the wrong one. The page also returns both variances, the mean, count, sum, range, sum of squared deviations and standard error of the mean, a row-by-row step table, and the working written out in five lines you can copy.
Standard deviation formulas for a sample and a population
Sample: s = √( Σ(x - x̄)² / (n - 1) ) Population: σ = √( Σ(x - μ)² / N )
x is each value, x̄ or μ is the mean, and n or N is the count. Σ(x - mean)² is the sum of squared deviations, shown in the results under that name. The expression inside the square root is the variance: s² for a sample and σ² for a population. Dividing by n - 1 instead of n is called Bessel's correction. A sample's values sit closer to their own mean than to the true mean of the larger group, so dividing by n would underestimate the spread; n - 1 compensates. The standard error of the mean, also reported, is s / √n.
Step table for 2, 4, 4, 4, 5, 5, 7, 9
This is the table the page produces for its starting data. The mean is 40 / 8 = 5. Each deviation is the value minus 5, and the last column squares it.
| Value (x) | Deviation (x - mean) | Squared deviation |
|---|---|---|
| 2 | -3 | 9 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 4 | -1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total (n = 8) | 0 | 32 |
Population: 32 / 8 = 4, and √4 = 2. Sample: 32 / 7 = 4.5714, and √4.5714 = 2.1381. The deviations always total 0, which is a quick check on the mean.
Worked examples with sample and population results
All results below are at 4 decimal places unless stated.
Seven test scores
72, 85, 90, 66, 78, 95, 88
Sample standard deviation 10.4083, population 9.6362, mean 82, sum 574, range 29 (66 to 95), sum of squared deviations 650
Sample variance is 650 / 6 = 108.3333 and population variance is 650 / 7 = 92.8571. The standard error of the mean is 3.934.
Five values as a whole population, 2 decimal places
600, 470, 170, 430, 300
Population standard deviation 147.32, variance 21,704, mean 394. The sample version is 164.71 with variance 27,130.
Decimals
98.6 99.1 97.9 98.4 100.2 98.8
Sample standard deviation 0.7815, population 0.7134, mean 98.8333, range 2.3
Negative numbers centered on zero
-3, -1.5, 0, 1.5, 3
Sample standard deviation 2.3717, population 2.1213, mean 0, sum of squared deviations 22.5
Large values close together
1000000 1000001 1000002
Sample standard deviation 1, population 0.8165, mean 1,000,001
Adding a constant to every value shifts the mean but leaves the standard deviation unchanged: 0, 1, 2 gives the same spread.
A single value
5
Population standard deviation 0. The sample standard deviation is shown as a dash with a note, because dividing by n - 1 would be dividing by zero.
Sample vs population: which divisor to use
| Sample | Population | |
|---|---|---|
| Use it when | The data is a subset used to estimate a larger group | The data is every member of the group |
| Divide the sum of squares by | n - 1 | n |
| Symbol | s (variance s²) | σ (variance σ²) |
| Spreadsheet function | STDEV.S | STDEV.P |
| Result for 2, 4, 4, 4, 5, 5, 7, 9 | 2.1381 | 2 |
| Result for 4, 8, 6, 5, 3 | 1.9235 | 1.7205 |
| Minimum number of values | 2 | 1 |
The gap between the two shrinks as the count grows, since n - 1 and n become nearly the same.
Reading the result
A standard deviation is in the same units as your data, so it reads directly against the mean. Test scores with a mean of 82 and a sample standard deviation of 10.4083 are spread widely; the lowest score, 66, is about one and a half standard deviations below the mean. Body temperatures with a mean of 98.8333 and a standard deviation of 0.7815 are tightly clustered.
For data that follows a normal, bell-shaped distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. That rule of thumb does not hold for skewed data or small lists, and this page does not test whether your data is normal.
Because deviations are squared, one extreme value has a large effect. In the eight-number example, the single 9 contributes 16 of the 32 squared units. If one outlier is driving the result, the range and the step table make that easy to see.
Input rules and limits
- Commas, spaces, semicolons and line breaks all separate values, so do not use thousands separators. 1,200 is read as two numbers, 1 and 200.
- Use a period for the decimal point. 3,5 is read as 3 and 5.
- Anything that is not a number, such as a unit or a stray letter, stops the calculation with a message naming it.
- Scientific notation such as 1.5e3 is accepted.
- The step table lists the first 200 values. Longer lists are still calculated in full, and the Total row covers every value.
- Grouped data and frequency tables are not supported. Repeat each value as many times as it occurs.
- Median, mode and quartiles are not shown here. The average calculator covers median and mode.
Step by step
- 1
Type or paste your data into Numbers, separated by commas, spaces, semicolons or new lines.
- 2
Set Data is a to Sample if the numbers are a subset of a larger group, or Population if they are the whole group. Both results appear either way; this choice decides which one the written steps follow.
- 3
Pick the Decimal places to round to: 2, 4, 6 or 8.
- 4
Read the results panel, then use the Step table to see each value, its deviation from the mean and the squared deviation.
- 5
Copy the Steps box if you need to show your working.