Standard deviation calculator
Sample or population, with a table of every step
Type or paste your numbers and choose sample or population. The example is the textbook list 2, 4, 4, 4, 5, 5, 7, 9.
–
- Variance
- –
- Mean
- –
- The other kind
- –
- Count
- –
Working, step by step
Table of deviations
| Value x | x − mean | (x − mean)² |
|---|
What standard deviation measures
Standard deviation tells you how spread out numbers are around their mean. A small value means they sit close to the mean; a large one means they are scattered.
The steps
- Find the mean. For 2, 4, 4, 4, 5, 5, 7, 9 it is 40 ÷ 8 = 5.
- Take the mean away from each number: −3, −1, −1, −1, 0, 0, 2, 4.
- Square each result: 9, 1, 1, 1, 0, 0, 4, 16. Squaring makes every distance positive.
- Add the squares: 32.
- Divide to get the variance: by the count for a population (32 ÷ 8 = 4), or by one less than the count for a sample (32 ÷ 7 ≈ 4.571).
- Take the square root: √4 = 2 for the population, √4.571 ≈ 2.138 for the sample.
The table under the result shows every one of these numbers for your list.
Sample or population?
Choose population when your list is the whole group you care about, such as the marks of everyone in one class. Choose sample when the list is part of a bigger group and you want to estimate that group's spread, such as 50 people surveyed from a town. Dividing by n − 1 corrects for a sample tending to be less spread out than the full group. Spreadsheets use STDEV.S for a sample and STDEV.P for a population; the result card shows both.
Exactness
The mean, the deviations and the variance are worked out as exact fractions. Only the final square root is rounded, to 10 significant digits.
Formula and sources
- Variance and standard deviation, sample (n − 1) and population (n): NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.6 (Measures of Scale).
- Checked in test_maths.js: 2, 4, 4, 4, 5, 5, 7, 9 → population SD 2, sample SD √(32/7) ≈ 2.138089935; 1, 2, 3, 4, 5 → sample SD √2.5 ≈ 1.58113883; a single value has population SD 0.