UtilityBase logoUtilityBase

3 min read

How to Calculate Standard Deviation

Learn what standard deviation measures, the difference between sample and population formulas, and how to compute it step by step with a worked example.

What Standard Deviation Tells You

Standard deviation measures how spread out a set of numbers is around their average. A small standard deviation means the values cluster tightly near the mean, while a large one means they are scattered widely. Two data sets can share the same average yet behave very differently - standard deviation is what captures that difference in consistency.

It is expressed in the same units as your data, which makes it easy to interpret. If test scores have a mean of 70 and a standard deviation of 5, most scores fall roughly within 5 points of 70. That interpretability is why standard deviation is preferred over variance, which is in squared units and harder to reason about directly.

Sample Versus Population

There are two versions of the formula, and choosing correctly matters. Use the population standard deviation when your data includes every member of the group you care about. Use the sample standard deviation when your data is a subset drawn from a larger group and you want to estimate the spread of that whole group.

The only computational difference is the divisor. The population formula divides the sum of squared deviations by N, the count of all values. The sample formula divides by N minus 1, a correction known as Bessel correction that compensates for the tendency of a small sample to underestimate the true spread. When in doubt with real-world sampled data, the sample formula is usually the right choice.

Computing It Step by Step

The calculation follows the same sequence every time: find the mean, measure each value distance from it, square those distances, average them, and take the square root. The Standard Deviation Calculator shows each of these steps so you can follow the logic, not just the final number.

  1. 1Open the Standard Deviation Calculator and enter your numbers separated by commas or spaces.
  2. 2Select whether your data is a sample or a full population.
  3. 3Read the mean the tool computes as the reference point for spread.
  4. 4Follow the listed deviations, where each value has the mean subtracted from it.
  5. 5Review the squared deviations and their average, which is the variance.
  6. 6Take the reported square root of the variance as your standard deviation.

A Worked Example

Take the values 2, 4, 4, 6. The mean is 4. The deviations from the mean are minus 2, 0, 0, and 2, and squaring them gives 4, 0, 0, and 4, which sum to 8. For a population, divide 8 by 4 to get a variance of 2, and the square root gives a standard deviation of about 1.41.

If those same four numbers were a sample, you would divide 8 by 3 instead of 4, giving a variance of about 2.67 and a standard deviation of about 1.63. Notice the sample value is larger - that is the N minus 1 correction widening the estimate to account for the uncertainty of working from a subset.

Reading the Result in Context

A standard deviation is only meaningful relative to the mean and the scale of your data. A deviation of 10 is tiny for values in the millions but enormous for values near zero. To compare spread across data sets on different scales, statisticians often use the coefficient of variation, which is the standard deviation divided by the mean.

For many naturally distributed data sets, roughly two thirds of values fall within one standard deviation of the mean and about 95 percent within two, a pattern known as the empirical rule. That rule of thumb only holds for bell-shaped distributions, so treat it as a guide rather than a guarantee, especially with skewed data or heavy outliers.

Frequently asked questions

When should I use sample versus population standard deviation?

Use the population formula when your data covers the entire group. Use the sample formula, which divides by N minus 1, when your data is a subset used to estimate a larger group.

What is the difference between variance and standard deviation?

Variance is the average of the squared deviations from the mean, in squared units. Standard deviation is the square root of the variance, returning it to the original units so it is easier to interpret.

Does a low standard deviation mean the data is better?

Not inherently. A low value means the data is consistent and clustered near the mean, which is desirable for things like manufacturing tolerances but simply describes spread, not quality.

Tools mentioned in this guide

Keep reading