Standard deviation is the most widely used measure of spread. It tells you how far, on average, values lie from their mean, in the same units as the data. A small standard deviation means the values cluster tightly around the mean; a large one means they are widely scattered. For data that are roughly bell-shaped, about 68% of values lie within one standard deviation of the mean and about 95% within two.
There are two versions. If your numbers are the entire population, divide the sum of squared deviations by N to get σ. If they are a sample from a larger group, which is usually the case, divide by n − 1 to get s. The n − 1, called Bessel’s correction, compensates for the fact that a sample’s values are always a little closer to their own mean than to the true population mean. Choose the data set type and the calculator gives the matching value as the main result, with the other one listed below.
The step table lists each value, its deviation from the mean and the squared deviation, so you can check homework or see which values contribute most to the spread.
How to use the Standard Deviation Calculator
- Data
- Data set type
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Subtract the mean from each value, square the differences, add them to get the sum of squares, divide by n − 1 (sample) or N (population) to get the variance and take the square root.
Worked example
For 4, 8, 15, 16, 23 and 42 the sum is 108 and the mean 18. The deviations are −14, −10, −3, −2, 5 and 24; their squares 196, 100, 9, 4, 25 and 576 add to 910. Sample variance = 910 ÷ 5 = 182 and s = √182 = 13.49; population variance = 910 ÷ 6 = 151.67 and σ = 12.32. The standard error of the mean is 13.49 ÷ √6 = 5.51.
Sample versus population standard deviation
| Sample (s) | Population (σ) | |
|---|---|---|
| Divide by | n − 1 | N |
| Use when | Data are a subset | Data are the whole group |
| Excel | STDEV.S | STDEV.P |
| Example result | 13.49 | 12.32 |
Formula
Sample s = √(Σ(x − x̄)² ÷ (n − 1)) · Population σ = √(Σ(x − μ)² ÷ N) · shortcut: s² = (Σx² − (Σx)² ÷ n) ÷ (n − 1)
Worked example
Inputs: Data: 4, 8, 15, 16, 23, 42; Data set type: Sample (divide by n − 1).
Results: Standard deviation (chosen type) = 13.490738; Sample standard deviation (s) = 13.490738; Population standard deviation (σ) = 12.315302; Sample variance (s²) = 182; Population variance (σ²) = 151.666667; Mean = 18.
Key terms
- Variance
- The square of the standard deviation, or the average squared deviation.
- Bessel's correction
- Dividing by n − 1 instead of n for a sample.
- Deviation
- The difference between a value and the mean, x − x̄.
- Coefficient of variation
- The standard deviation as a percentage of the mean.
Frequently asked questions
Sample or population?
Use sample (n − 1) when your data are a sample from a larger group; population when you have every value. If in doubt, use the sample version, as it is the default in most software.
Why n − 1?
It corrects the bias of estimating spread from a sample (Bessel's correction). Dividing by n would systematically underestimate the population variance.
What is the standard deviation of 4, 8, 15, 16, 23, 42?
The mean is 18 and the sum of squares 910, so s = √(910 ÷ 5) = 13.49 and σ = √(910 ÷ 6) = 12.32.
What is a "high" standard deviation?
It depends on the mean and the context. Compare it with the mean (coefficient of variation): 13.49 ÷ 18 = 75% is very spread out, while 2 ÷ 100 = 2% is tight.
How is standard deviation related to variance?
Standard deviation is the square root of variance. Variance is in squared units; standard deviation is in the units of the data.
What does the 68–95–99.7 rule say?
For roughly normal data, about 68% of values lie within 1 SD of the mean, 95% within 2 SD and 99.7% within 3 SD.
Can the standard deviation be negative?
No. It is a square root of a sum of squares, so it is 0 when all values are equal and positive otherwise.
Which Excel functions match?
STDEV.S for the sample standard deviation and STDEV.P for the population standard deviation.
Sources
Guides on this topic
- How to Calculate Sample Size for a Survey (Formula + Examples): 385 responses give ±5% at 95% confidence for almost any large population. Here is the formula behind that number and how to adjust it for your survey.
- Standard Deviation Explained: How to Calculate It and What It Means: Standard deviation is the typical distance from the mean. Learn to calculate it by hand, when to divide by n − 1, and how to read it with the 68–95–99.7 rule.
- Percent Error vs Percent Difference: Formulas, Examples and When to Use Each: Percent error divides by a true value; percent difference divides by the average of two measurements. Here is when to use each, with lab examples.