How standard deviation is calculated
The standard deviation measures how far the values typically lie from their mean. The calculator uses the formulas in the NIST/SEMATECH e-Handbook of Statistical Methods: square each value's distance from the mean, add the squares, divide, and take the square root.
σ² = Σ(x − x̄)² ÷ n σ = √σ²
- x̄
- The mean of the values
- n
- How many values there are
- s, σ
- Sample and population standard deviation
Dividing by n − 1 (Bessel's correction) makes the sample variance an unbiased estimate of the variance of the larger group the sample came from. The standard error of the mean is s ÷ √n.
Worked example
| Mean40 ÷ 8 | 5 |
|---|---|
| Sum of squared deviations9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 | 32 |
| Population variance σ²32 ÷ 8 | 4 |
| Population standard deviation σ | 2 |
| Sample variance s²32 ÷ 7 | 4.5714 |
| Sample standard deviation s | 2.1381 |
This classic data set has a population standard deviation of exactly 2; as a sample, the estimate is a little larger, 2.1381.
How to read your results
- Small standard deviation: values cluster near the mean. A large one means they are spread out.
- Same units: the standard deviation is in the units of the data (points, kilograms, dollars); the variance is in squared units.
- Normal data: for roughly bell-shaped data, about two-thirds of the values fall within one standard deviation of the mean and about 95% within two.
- Coefficient of variation is the standard deviation as a percentage of the mean (42.76% here), useful to compare data on different scales.
For the mean, median and mode on their own, or a weighted average, use the average calculator.
Assumptions
- Up to 1,000 numbers, separated by commas, spaces, semicolons or new lines.
- A sample needs at least two values; a population can be a single value.
- Deviations are computed from the mean directly, which stays precise for large values.
Limitations
- Every value counts once; grouped data with frequencies must be typed out in full.
- The standard deviation is sensitive to outliers; check the deviation table for values far from the mean.
- The rule of thumb about two-thirds and 95% holds only for roughly normal data.
Frequently asked questions
Should I use the sample or population standard deviation?
Use the sample formula (n − 1) when your numbers are a sample of a larger group, such as 30 customers out of thousands. Use the population formula (n) only when you have every member of the group, such as the scores of all students in one class.
What is the difference between variance and standard deviation?
The variance is the average squared deviation from the mean; the standard deviation is its square root, which brings it back to the units of the data. For the example data the variance is 4 and the standard deviation 2.
What is the standard error of the mean?
It is the sample standard deviation divided by √n and estimates how much the mean of a sample would vary between samples: 0.7559 for the example.
Sources
Definitions and rules referenced on this page. Calcendium is not affiliated with these publishers.
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.1: Measures of Location
National Institute of Standards and Technology · International · Checked October 29, 2026
The mean is the sum of the values divided by their count; the median has half the values below and half above it (the mean of the two middle values for an even count); the mode is the most frequent value and need not be unique.
- NIST/SEMATECH e-Handbook of Statistical Methods, §1.3.5.6: Measures of Scale
National Institute of Standards and Technology · International · Checked October 29, 2026
Sample variance s² = Σ(x − x̄)² ÷ (N − 1); the standard deviation is the square root of the variance.