Standard Deviation Calculator
Standard deviation and variance of a data set β sample or population, with every step and a full summary.
8 numbers
Separate numbers with commas, spaces or new lines. A comma always separates, so write 1234, not 1,234.
Part of a larger group: divides by n β 1.
5.237229366
Population standard deviation: 4.898979486
- Variance (sΒ²)
- 27.42857143
- Mean
- 18
- Count (n)
- 8
- Sum
- 144
- Sum of squared deviations
- 192
Summary
- Smallest
- 10
- First quartile (Q1)
- 15
- Median
- 18.5
- Third quartile (Q3)
- 23
- Largest
- 23
- Interquartile range
- 8
- Range
- 13
- Coefficient of variation
- 29.0957187%
- Standard error of the mean
- 1.8516402
- Outliers
- None
Working
| x | x β mean | (x β mean)Β² |
|---|---|---|
| 10 | β8 | 64 |
| 12 | β6 | 36 |
| 23 | 5 | 25 |
| 23 | 5 | 25 |
| 16 | β2 | 4 |
| 23 | 5 | 25 |
| 21 | 3 | 9 |
| 16 | β2 | 4 |
| Ξ£ 144 | 0 | Ξ£ 192 |
Paste or type a data set to get its standard deviation and variance, as a sample or as a population, with the mean, count, sum and sum of squared deviations. A summary adds the quartiles, interquartile range, outliers, coefficient of variation and standard error of the mean. The working shows each step, and a table lists every value with its deviation from the mean and the square of it.
What the standard deviation tells you
The standard deviation is the typical distance of the values from their mean, in the same unit as the data. A small one means the values sit close to the mean; a large one means they are spread out. The variance is its square, in squared units.
For data that follows a normal (bell-shaped) distribution, about 68% of values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. The rule holds only for normal data; skewed data, such as incomes, does not follow it.
The coefficient of variation is the standard deviation as a percentage of the size of the mean, which lets data sets with different units or scales be compared; with a mean of 0 it reads βUndefined when the mean is 0β. The standard error of the mean is the standard deviation shown divided by βn. Outliers are the values more than 1.5 times the interquartile range below Q1 or above Q3.
How to use it
Enter the data as a List, separated by commas, spaces, semicolons, tabs or new lines, or With frequencies, each value once with the whole number of times it occurs. The tool opens on 10, 12, 23, 23, 16, 23, 21, 16. A comma always separates two numbers, so write 1234, not 1,234. A data set can hold up to 100,000 numbers.
Choose Sample when the data is part of a larger group you want to describe, and Population when it is the whole group. The other kind is shown under the result. A sample of one value has no standard deviation (βSample standard deviation needs at least 2 valuesβ).
Quartile method sets how Q1 and Q3 are found; the interquartile range and the outliers follow it. The exclusive method has no quartiles for one or two values (βExclusive quartiles need at least 3 valuesβ). The sample or population choice and the quartile method are remembered on this device. The table lists the first 50 values; its totals cover all of them. Everything runs in your browser.
The formulas
Both formulas add the squared distances from the mean. A population divides that sum by the count n. A sample divides by n β 1, known as Bessel's correction: the mean of a sample is fitted to that sample, so the values lie closer to it than to the true mean of the larger group, and dividing by n would understate the spread.
The tool works from the deviations themselves rather than from the sum of the squared values, which loses its digits when the values are large and close together. Numbers are held in double precision and shown to 10 significant figures.
- Inclusive (Excel QUARTILE.INC) β the value at position (n β 1) Γ p of the sorted data, counting from 0, interpolated between neighbours. Also R's default (type 7).
- Exclusive (Excel QUARTILE.EXC) β the value at position (n + 1) Γ p, counting from 1, interpolated. R's type 6.
- Median of halves β the medians of the lower and upper halves, leaving the middle value out of both when the count is odd. Used by TI-83 and TI-84 calculators and many school textbooks.
- Tukey's hinges β the same, with the middle value of an odd count kept in both halves.
Population variance ΟΒ² = Ξ£(x β mean)Β² Γ· n
Sample variance sΒ² = Ξ£(x β mean)Β² Γ· (n β 1)
Standard deviation = βvariance
Coefficient of variation = standard deviation Γ· |mean| Γ 100
Standard error of the mean = standard deviation Γ· βn
Outliers: below Q1 β 1.5 Γ IQR or above Q3 + 1.5 Γ IQR
Examples
The data set the tool opens with
For 10, 12, 23, 23, 16, 23, 21, 16 as a Sample: the standard deviation is 5.237229366 and the variance 27.42857143. As a population it is 4.898979486.
- Find the mean: the sum divided by the count. 144 Γ· 8 = 18
- Subtract the mean from each value and square the result, as in the table.
- Add the squares. Ξ£(x β mean)Β² = 192
- Divide by one less than the count, as the data is a sample. This is the variance. 192 Γ· 7 β 27.42857143
- Take the square root for the standard deviation. β27.42857143 β 5.237229366
Test scores of a whole class
Seven students are the whole class, so with Population and the scores 62, 70, 75, 75, 81, 88, 95: the mean is 78 and the standard deviation 10.25391911. Treated as a sample of a larger year group, it would be 11.07549848.
- Find the mean: the sum divided by the count. 546 Γ· 7 = 78
- Subtract the mean from each value and square the result, as in the table.
- Add the squares. Ξ£(x β mean)Β² = 736
- Divide by the count, as the data is the whole population. This is the variance. 736 Γ· 7 β 105.1428571
- Take the square root for the standard deviation. β105.1428571 β 10.25391911
Spotting an outlier
For 12, 14, 15, 15, 16, 18, 45 with the default quartile method: Q1 is 14.5, Q3 is 17 and the interquartile range 2.5. The outliers listed: 45. That one value lifts the standard deviation to 11.48497984.
Frequently asked questions
- Inclusive (Excel QUARTILE.INC): Q1 25.5, Q3 42.5
- Exclusive (Excel QUARTILE.EXC): Q1 15, Q3 43
- Median of halves: Q1 15, Q3 43
- Tukey's hinges: Q1 25.5, Q3 42.5
See also
- Average Calculator β for the mode, the weighted mean and the geometric and harmonic means.
- Scientific Calculator β for powers, roots and logs in one expression.