Statistics
Mean, variance and standard deviation calculator
Mean, variance and standard deviation are three steps of one calculation. Enter your data to get all three, then follow the table below to see how each one is built from the one before it.
Separate numbers with commas, spaces or new lines, or paste a spreadsheet column.
Decimals and negatives are fine; write 10:3 for a value that occurs 3 times.
Your results will appear here: the standard deviation first, then the rest of the summary and a chart.
Standard deviation (sample)
2.16025
Your values typically sit about 2.16 above or below their mean of 6.333, in the same units as your data. 4 of 6 values (67%) fall between 4.173 and 8.494, within one standard deviation of the mean; for normally distributed data about 68% would.
Population SD (σ): 1.97203, if these values are the whole group.
- Count (n)
- 6
- Mean (x̄)
- 6.33333
- Variance (s²)
- 4.66667
- Standard error
- 0.881917
- Minimum
- 3
- Q1 (25%)
- 5.25
- Median
- 6.5
- Q3 (75%)
- 7.75
- Maximum
- 9
- Range
- 6
More statistics (5)
- Relative SD (%RSD)
- 34.1092%
- Coefficient of variation
- 0.341092
- Sum (Σx)
- 38
- Sum of squares, Σ(x − x̄)²
- 23.3333
- IQR (Q3 − Q1)
- 2.5
Data distribution
Shaded bands mark ±1, ±2 and ±3 SD from the mean. 4 of 6 values (67%) fall within ±1 SD.
Chart as text
Mean 6.33333, sample standard deviation s = 2.16025, from 6 values between 3 and 9.
- Within ±1 SD (4.173 to 8.494): 4 of 6 values (67%). About 68% for normal data.
- Within ±2 SD: 6 (100%). About 95% for normal data.
- Within ±3 SD: 6 (100%). About 99.7% for normal data.
Show the working, step by step
How the three connect
mean: x̄ = Σx ÷ n variance: s² = Σ(x − x̄)² ÷ (n − 1) SD: s = √s²
Nothing new enters after the first line: the variance is the mean of the squared deviations (with the n − 1 correction for a sample), and the standard deviation is its square root.
The full worked table
A courier logs deliveries per hour across six hours: 6, 9, 3, 8, 7, 5.
Step 1 — the mean. Σx = 38 over n = 6, so x̄ = 6.3333.
Step 2 — deviations and their squares.
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 6 | −0.3333 | 0.1111 |
| 9 | 2.6667 | 7.1111 |
| 3 | −3.3333 | 11.1111 |
| 8 | 1.6667 | 2.7778 |
| 7 | 0.6667 | 0.4444 |
| 5 | −1.3333 | 1.7778 |
| Σ = 38 | 0 | 23.3333 |
The middle column sums to zero, as it must. The right-hand column sums to the sum of squares, 23.3333.
Step 3 — the variance.
sample: s² = 23.3333 ÷ 5 = 4.66667 population: σ² = 23.3333 ÷ 6 = 3.88889
Step 4 — the standard deviation.
sample: s = √4.66667 = 2.16025 population: σ = √3.88889 = 1.97203
So the courier averages 6.33 deliveries an hour, with a standard deviation of 2.16 deliveries (sample). The variance, 4.67, is in deliveries² and is mostly a stepping stone.
Which of the three to report
| Statistic | Units | Use it for |
|---|---|---|
| Mean | Same as data | The typical level |
| Standard deviation | Same as data | Describing spread to a reader |
| Variance | Squared | Further calculation: ANOVA, adding independent variances, pooling, portfolio risk |
Variances add; standard deviations do not. That is the main reason to keep the variance around. Standard deviation vs variance goes into when each is the right report.
Related calculators
-
Standard deviation calculator
The general calculator, with both modes and a dot plot.
-
Variance and standard deviation
The pair side by side, sample and population.
-
Sum of squares
Σ(x − x̄)², the column total this table builds.
-
How to calculate it
The same steps on more examples, with practice problems.
Common questions
In what order do you calculate mean, variance and standard deviation?
Mean first, because the variance needs it; variance second, because the standard deviation is its square root. Each is one step on from the one before, which is why a single table with columns for x, x − x̄ and (x − x̄)² produces all three.
Why is the variance in squared units?
Because it averages squared deviations. If the data is in hours, each (x − x̄)² is in hours², and so is their average. Taking the square root brings the standard deviation back to hours, which is why it is the one people quote.
Should the deviations add up to zero?
Yes, exactly — before squaring. The positive and negative deviations from the mean always cancel. If your x − x̄ column does not sum to zero (allowing for rounding), the mean is wrong, and everything after it will be too. It is the quickest check on a hand calculation.
Is there a shortcut that avoids the deviation column?
Yes: Σ(x − x̄)² = Σx² − (Σx)² ÷ n. For the table on this page, Σx² = 264 and (Σx)² ÷ n = 1444 ÷ 6 = 240.667, giving 23.333 as before. It is quicker by hand but loses precision on a computer when the values are large and close together, so this calculator uses the deviation method.