What Is Standard Deviation?
Standard deviation measures how far the values in a data set typically sit from their mean. When the numbers cluster tightly around the average, it is small. When they scatter, it is large. It carries the same units as the data, so heights in centimetres give a standard deviation in centimetres.
How to Calculate Standard Deviation
Find the mean first. Subtract it from each value to get the deviations, then square them so that gaps above and below the mean stop cancelling each other out. Add the squares. Divide by n − 1 for a sample or by N for a population, which gives the variance. The square root of the variance is the standard deviation.
Standard Deviation Formula
The standard deviation formula in statistics comes in two forms. They differ only in the denominator.
Population standard deviation
σ = √( Σ(x − μ)² / N )
Here x is each value, μ is the population mean and N is the number of values in the population.
Sample standard deviation
s = √( Σ(x − x̄)² / (n − 1) )
Here x̄ is the sample mean and n is the number of values in the sample. Everything under the root sign is the variance.
Sample Standard Deviation vs. Population Standard Deviation
Use the population version when your data holds every member of the group you are describing, such as all the scores in one class or every unit in a finished batch.
Use the sample version when your data is a subset drawn to learn about a larger group, such as 40 surveyed customers out of thousands.
For the same numbers the sample figure comes out slightly larger, and the gap shrinks as the data set grows. If you cannot decide, ask whether you are describing the values in front of you or inferring something beyond them.
How to Calculate Mean and Standard Deviation
The two numbers are usually reported together as mean ± SD, because the mean alone hides spread. The sets 4, 5, 6 and 0, 5, 10 both have a mean of 5. Their population standard deviations are about 0.8165 and 4.0825, which shows at once that the second set is far more scattered.
Standard Deviation and Variance
Variance is the average squared deviation, and standard deviation is its square root. Squaring leaves variance in squared units, such as square metres for data measured in metres. Taking the root brings the result back to the original units. That is why people quote the standard deviation and keep variance for use inside other formulas.
Standard Deviation vs. Mean Absolute Deviation
Mean absolute deviation (MAD) averages the absolute distances from the mean: Σ|x − mean| / n. It never squares anything, so a gap of 4 counts exactly twice as much as a gap of 2.
Standard deviation squares first, so that same gap of 4 counts four times as much. It therefore reacts more strongly to values far from the mean and is never smaller than the MAD. The calculator divides by n for MAD in both sample and population mode.
Standard Deviation Example
Take the eight values 2, 4, 4, 4, 5, 5, 7 and 9. Their sum is 40, so the mean is 40 ÷ 8 = 5.
| Value x | Deviation x − 5 | Squared deviation |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Total | 0 | 32 |
Treat the eight numbers as a whole population and the variance is 32 ÷ 8 = 4, so the population standard deviation is √4 = 2.
Treat them as a sample and the variance is 32 ÷ 7 ≈ 4.5714, so the sample standard deviation is √4.5714 ≈ 2.1381.
The absolute deviations add up to 12, so the mean absolute deviation is 12 ÷ 8 = 1.5. That is below the standard deviation of 2.
Understanding 1, 2 and 3 Standard Deviations
Adding and subtracting one, two or three standard deviations from the mean marks out bands around the centre. With a mean of 5 and a population SD of 2, one standard deviation covers 3 to 7, two cover 1 to 9, and three cover −1 to 11.
For data that is roughly bell shaped, the empirical rule says about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. It is an approximation. Skewed data can depart from it badly, and small sets rarely match it closely: in the example above, 6 of the 8 values (75%) fall between 3 and 7.
A z-score restates a single value in the same units: (x − mean) ÷ SD. A z-score of 2 means the value is two standard deviations above the mean. The calculator flags values with |z| of 2 or more as somewhat unusual and 3 or more as stronger. Treat the flag as a quick screen, not a formal outlier test.
How to Calculate Standard Deviation from a Frequency Table
When values repeat, list each distinct value x with its count f. The number of observations is n = Σf, the mean is Σ(f · x) ÷ n, and the sum of squares is Σ f · (x − mean)². From there, divide by n − 1 or N and take the root as usual. The example data set above, written as 2 (×1), 4 (×3), 5 (×2), 7 (×1), 9 (×1), returns the same results.
Grouped data gives only class intervals, such as 10 to 20 with a frequency. Each class midpoint stands in for the values inside it, so the answer is an estimate and not an exact figure.
How to Interpret Standard Deviation
A low standard deviation means the values cluster near the mean, so the mean describes a typical value well. A high one means the values are spread out and the mean says less about any single observation. A standard deviation of zero means every value is identical.
What counts as high or low depends on the scale. A standard deviation of 5 is large for marks out of 20 and tiny for annual salaries. The coefficient of variation, the SD divided by the absolute mean as a percentage, helps when you compare data on different scales, provided the mean is not near zero.
Limitations of Standard Deviation
Squared deviations make standard deviation sensitive to outliers. One extreme value can drag the mean and inflate the result, so look at the median and the individual deviations when a few values sit far out.
It also says nothing about the shape of the distribution. Skewed or multimodal data can share a standard deviation with symmetric data, and a sample SD from very few values is itself uncertain.