How to Calculate Standard Deviation: A Step-by-Step Guide

How to Calculate Standard Deviation Step by Step

Standard deviation is a measure of how spread out numbers are in a data set. It tells you whether the values are clustered around the mean or scattered widely. This guide walks you through the manual calculation so you understand what the calculator does behind the scenes. For a quick overview, check out our What Is Standard Deviation? page.

You'll Need:

  • A data set (list of numbers)
  • Paper and pen for writing calculations
  • Basic calculator (optional but helpful for arithmetic)

Step-by-Step Instructions

We'll calculate the sample standard deviation (s). The steps are nearly identical for population standard deviation (σ), except the final division. For more on the difference, see our Population vs Sample guide.

  1. Calculate the mean (average). Add all numbers and divide by the count of numbers. The mean is denoted as \(\bar{x}\).
  2. Find each deviation from the mean. Subtract the mean from every data point: \(x_i - \bar{x}\). Each result shows how far that value is from the center.
  3. Square each deviation. Multiply each deviation by itself: \((x_i - \bar{x})^2\). Squaring makes all values positive and gives more weight to larger differences.
  4. Sum the squared deviations. Add up all the squared values: \(\sum{(x_i - \bar{x})^2}\). This total represents the overall variability.
  5. Divide to get the variance. For sample data, divide by \(n - 1\) (where \(n\) is the number of data points). This is the sample variance \(s^2\). For population data, divide by \(n\) to get \(\sigma^2\).
  6. Take the square root. The square root of the variance gives the standard deviation \(s\) (or \(\sigma\)).

For a formal look at the formulas, visit our Standard Deviation Formula page.

Example 1: Sample Standard Deviation

Let's compute the sample standard deviation for the data set: 4, 8, 6, 5, 3.

  1. Mean: (4 + 8 + 6 + 5 + 3) / 5 = 26 / 5 = 5.2
  2. Deviations: 4 - 5.2 = -1.2, 8 - 5.2 = 2.8, 6 - 5.2 = 0.8, 5 - 5.2 = -0.2, 3 - 5.2 = -2.2
  3. Squared deviations: (-1.2)² = 1.44, (2.8)² = 7.84, (0.8)² = 0.64, (-0.2)² = 0.04, (-2.2)² = 4.84
  4. Sum of squares: 1.44 + 7.84 + 0.64 + 0.04 + 4.84 = 14.8
  5. Variance (sample): 14.8 / (5 - 1) = 14.8 / 4 = 3.7
  6. Standard deviation: √3.7 ā‰ˆ 1.92

The sample standard deviation is about 1.92. This means the values typically deviate from the mean by roughly 1.92 units.

Example 2: Population Standard Deviation

Now let's treat a data set as a population: exam scores 78, 85, 93, 88, 76.

  1. Mean: (78 + 85 + 93 + 88 + 76) / 5 = 420 / 5 = 84
  2. Deviations: 78-84 = -6, 85-84 = 1, 93-84 = 9, 88-84 = 4, 76-84 = -8
  3. Squared deviations: 36, 1, 81, 16, 64
  4. Sum of squares: 36 + 1 + 81 + 16 + 64 = 198
  5. Variance (population): 198 / 5 = 39.6
  6. Standard deviation: √39.6 ā‰ˆ 6.29

The population standard deviation is about 6.29 points, indicating moderate spread.

Common Pitfalls to Avoid

  • Using the wrong denominator: Sample standard deviation requires dividing by nāˆ’1, not n. Using n gives a biased estimate that's too small for samples.
  • Forgetting to square: The sum of deviations (without squaring) always equals zero, so you must square them.
  • Rounding too early: Keep as many decimal places as possible during intermediate steps, then round at the end. Otherwise, accuracy suffers.
  • Ignoring outliers: Extreme values can inflate the standard deviation. Consider if they are data errors or genuine outliers.
  • Confusing standard deviation with variance: Variance is the squared value; standard deviation is its square root. Both measure spread but on different scales.

Once you've mastered the manual method, you can use our Statistics Calculator to compute standard deviation instantly and verify your work.

Try the free Statistics Calculator ⬆

Get your Standard deviation as a measure of dispersion result instantly — no signup, no clutter.

Open the Statistics Calculator

Contact Us