Understanding and calculating standard deviation

The standard deviation is the average amount of variability in your dataset. It tells you, on average, how far each value lies from the mean.

A high standard deviation means that values are generally far from the mean, while a low standard deviation indicates that values are clustered close to the mean.

What does standard deviation tell you?

Standard deviation is a useful measure of spread for normal distributions.

In normal distributions, data is symmetrically distributed with no skew. Most values cluster around a central region, with values tapering off as they go further away from the center. The standard deviation tells you how spread out from the center of the distribution your data is on average.

Many scientific variables follow normal distributions, including height, standardized test scores, or job satisfaction ratings. When you have the standard deviations of different samples, you can compare their distributions using statistical tests to make inferences about the larger populations they came from.

Example: Comparing different standard deviations
You collect data on job satisfaction ratings from three groups of employees using simple random sampling.

The mean (M) ratings are the same for each group – it’s the value on the x-axis when the curve is at its peak. However, their standard deviations (SD) differ from each other.

The standard deviation reflects the dispersion of the distribution. The curve with the lowest standard deviation has a high peak and a small spread, while the curve with the highest standard deviation is more flat and widespread.

A graph showing the distributions of three samples with different standard deviations

The empirical rule

The standard deviation and the mean together can tell you where most of the values in your distribution lie if they follow a normal distribution.

The empirical rule, or the 68-95-99.7 rule, tells you where your values lie:

  • Around 68% of scores are within 2 standard deviations of the mean,
  • Around 95% of scores are within 4 standard deviations of the mean,
  • Around 99.7% of scores are within 6 standard deviations of the mean.
Example: Standard deviation in a normal distribution
You administer a memory recall test to a group of students. The data follows a normal distribution with a mean score of 50 and a standard deviation of 10.

Following the empirical rule:

  • Around 68% of scores are between 40 and 60.
  • Around 95% of scores are between 30 and 70.
  • Around 99.7% of scores are between 20 and 80.

A graph showing the empirical rule for normal distributions.

The empirical rule is a quick way to get an overview of your data and check for any outliers or extreme values that don’t follow this pattern.

For non-normal distributions, the standard deviation is a less reliable measure of variability and should be used in combination with other measures like the range or interquartile range.

Standard deviation formulas for populations and samples

Different formulas are used for calculating standard deviations depending on whether you have data from a whole population or a sample.

Population standard deviation

When you have collected data from every member of the population that you’re interested in, you can get an exact value for population standard deviation.

The population standard deviation formula looks like this:

Formula Explanation
Formula to find the standard deviation of a population.
  • σ = population standard deviation
  • ∑ = sum of…
  • X = each value
  • μ = population mean
  • N = number of values in the population

Sample standard deviation

When you collect data from a sample, the sample standard deviation is used to make estimates or inferences about the population standard deviation.

The sample standard deviation formula looks like this:

Formula Explanation
Formula to find the standard deviation of a sample.
  • s = sample standard deviation
  • ∑ = sum of…
  • X = each value
  •  = sample mean
  • n = number of values in the sample

With samples, we use n – 1 in the formula because using n would give us a biased estimate that consistently underestimates variability. The sample standard deviation would tend to be lower than the real standard deviation of the population.

Reducing the sample n to n – 1 makes the standard deviation artificially large, giving you a conservative estimate of variability.

While this is not an unbiased estimate, it is a less biased estimate of standard deviation: it is better to overestimate rather than underestimate variability in samples.

Steps for calculating the standard deviation

The standard deviation is usually calculated automatically by whichever software you use for your statistical analysis. But you can also calculate it by hand to better understand how the formula works.

There are six main steps for finding the standard deviation by hand. We’ll use a small data set of 6 scores to walk through the steps.

Data set
46 69 32 60 52 41

Step 1: Find the mean

To find the mean, add up all the scores, then divide them by the number of scores.

Mean (x̅)
= (46 + 69 + 32 + 60 + 52 + 41) ÷ 6 = 50

Step 2: Find each score’s deviation from the mean

Subtract the mean from each score to get the deviations from the mean.

Since  = 50, here we take away 50 from each score.

Score Deviation from the mean
46 46 – 50 = -4
69 69 – 50 = 19
32 32 – 50 = -18
60 60 – 50 = 10
52 52 – 50 = 2
41 41 – 50 = -9

Step 3: Square each deviation from the mean

Multiply each deviation from the mean by itself. This will result in positive numbers.

Squared deviations from the mean
(-4)2 = 4 × 4 = 16
192 = 19 × 19 = 361
(-18)2 = -18 × -18 = 324
102 = 10 × 10 = 100
22 = 2 × 2 = 4
(-9)2 = -9 × -9 = 81

Step 4: Find the sum of squares

Add up all of the squared deviations. This is called the sum of squares.

Sum of squares
16 + 361 + 324 + 100 + 4 + 81 = 886

Step 5: Find the variance

Divide the sum of the squares by n – 1 (for a sample) or N (for a population) – this is the variance.

Since we’re working with a sample size of 6, we will use  n – 1, where n = 6.

Variance
 886 ÷ (6 – 1) = 886 ÷ 5 = 177.2

Step 6: Find the square root of the variance

To find the standard deviation, we take the square root of the variance.

Standard deviation
√177.2 = 13.31

From learning that SD = 13.31, we can say that each score deviates from the mean by 13.31 points on average.

Why is standard deviation a useful measure of variability?

Although there are simpler ways to calculate variability, the standard deviation formula weighs unevenly spread out samples more than evenly spread samples. A higher standard deviation tells you that the distribution is not only more spread out, but also more unevenly spread out.

This means it gives you a better idea of your data’s variability than simpler measures, such as the mean absolute deviation (MAD).

The MAD is similar to standard deviation but easier to calculate. First, you express each deviation from the mean in absolute values by converting them into positive numbers (for example, -3 becomes 3). Then, you calculate the mean of these absolute deviations.

Unlike the standard deviation, you don’t have to calculate squares or square roots of numbers for the MAD. However, for that reason, it gives you a less precise measure of variability.

Let’s take two samples with the same central tendency but different amounts of variability. Sample B is more variable than Sample A.

Values Mean Mean absolute deviation Standard deviation
Sample A 66, 30, 38, 64 50 15 17.5
Sample B 51, 21, 79, 49 50 15 21.1

For samples with equal average deviations from the mean, the MAD can’t differentiate levels of spread. The standard deviation is more precise: it is higher for the sample with more variability in deviations from the mean.

By squaring the differences from the mean, standard deviation reflects uneven dispersion more accurately. This step weighs extreme deviations more heavily than small deviations.

However, this also makes the standard deviation sensitive to outliers.

Frequently asked questions about standard deviation

What are the 4 main measures of variability?

Variability is most commonly measured with the following descriptive statistics:

What does standard deviation tell you?

The standard deviation is the average amount of variability in your data set. It tells you, on average, how far each score lies from the mean.

In normal distributions, a high standard deviation means that values are generally far from the mean, while a low standard deviation indicates that values are clustered close to the mean.

What is a normal distribution?

In a normal distribution, data is symmetrically distributed with no skew. Most values cluster around a central region, with values tapering off as they go further away from the center.

The measures of central tendency (mean, mode and median) are exactly the same in a normal distribution.

What is the empirical rule?

The empirical rule, or the 68-95-99.7 rule, tells you where most of the values lie in a normal distribution:

  • Around 68% of values are within 2 standard deviations of the mean.
  • Around 95% of values are within 4 standard deviations of the mean.
  • Around 99.7% of values are within 6 standard deviations of the mean.

The empirical rule is a quick way to get an overview of your data and check for any outliers or extreme values that don’t follow this pattern.

What’s the difference between standard deviation and variance?

Variance is the average squared deviations from the mean, while standard deviation is the square root of this number. Both measures reflect variability in a distribution, but their units differ:

  • Standard deviation is expressed in the same units as the original values (e.g., minutes or meters).
  • Variance is expressed in much larger units (e.g., meters squared).

Although the units of variance are harder to intuitively understand, variance is important in statistical tests.

Is this article helpful?
Pritha Bhandari

Pritha has an academic background in English, psychology and cognitive neuroscience. As an interdisciplinary researcher, she enjoys writing articles explaining tricky research concepts for students and academics.

Comment or ask a question.

Please click the checkbox on the left to verify that you are a not a bot.