Statistics Standard Deviation Formula- Complete Guide

What Is Standard Deviation?

Standard deviation measures how spread out numbers are in a dataset. It's the square root of variance. That's the short version.

Most people get stuck here. They memorize formulas without understanding what they're actually measuring. Let me fix that.

Imagine you have two classrooms:

Both classes have the same mean (70). But Class A is identical. Class B varies wildly. Standard deviation captures this difference in a single number.

Class A has a standard deviation of 0. Class B has a standard deviation around 14.14. The higher the number, the more spread out your data is.

The Standard Deviation Formula

There are actually two formulas—one for populations and one for samples. Using the wrong one gives you wrong answers.

Population Standard Deviation Formula

σ = √[Σ(xi - μ)² / N]

Where:

Sample Standard Deviation Formula

s = √[Σ(xi - x̄)² / (n-1)]

Where:

The difference is n-1 instead of n. This correction (Bessel's correction) accounts for the fact that a sample underestimates the true spread of a population.

Population vs. Sample: Which One Do You Use?

This trips up a lot of people. Here's the rule:

Real-world example: If you're analyzing test scores for every student in a specific school, that's your population. If you're analyzing scores for 50 students chosen from that school to estimate how the whole district performs, that's a sample.

In research and statistics work, samples are far more common. You'll use the sample formula most often.

Step-by-Step: How to Calculate Standard Deviation

Let's work through an example. You have the following dataset: 4, 8, 6, 5, 3

Step 1: Find the Mean

Add all values and divide by the count.

(4 + 8 + 6 + 5 + 3) / 5 = 26 / 5 = 5.2

Step 2: Find the Deviations from the Mean

Subtract the mean from each value:

Step 3: Square Each Deviation

Step 4: Sum the Squared Deviations

1.44 + 7.84 + 0.64 + 0.04 + 4.84 = 14.8

Step 5: Divide by N (or n-1)

For a population: 14.8 / 5 = 2.96

For a sample: 14.8 / 4 = 3.7

Step 6: Take the Square Root

Population SD: √2.96 = 1.72

Sample SD: √3.7 = 1.92

That's it. Six steps. Practice this process until it becomes automatic.

Standard Deviation vs. Variance

Variance is the average of squared deviations from the mean. Standard deviation is the square root of variance.

So why use standard deviation instead of variance?

Because variance gives you squared units. If your data is in dollars, variance is in dollars squared. That's not useful for interpretation. Standard deviation brings the units back to the original measurement, making it interpretable.

In the example above, variance was 2.96 (dollars squared), but standard deviation is 1.72 (dollars). You can actually say "values typically deviate from the mean by about $1.72" instead of making no sense.

Quick Reference: When to Use Which Formula

Situation Formula Denominator
Analyzing entire population Population σ N
Sample from larger population Sample s n-1
Quality control (all products) Population N
Research study (subset of people) Sample n-1
Known mean, all data points Population N
Estimated mean from sample Sample n-1

Common Mistakes to Avoid

How to Calculate Standard Deviation in Excel or Google Sheets

You don't need to do this by hand every time. Spreadsheets have built-in functions.

For a Sample:

Use =STDEV.S(range)

For a Population:

Use =STDEV.P(range)

That's the simplest way. Just plug in your data range and you get the answer instantly.

Standard Deviation in the Real World

Where does this actually show up?

The 68-95-99.7 Rule (Empirical Rule)

For normally distributed data, standard deviation has predictable relationships to the mean:

If exam scores average at 75 with an SD of 10, about 68% of students scored between 65 and 85. About 95% scored between 55 and 95.

This only works for roughly normal distributions. Skewed data doesn't follow this rule.

Getting Started: Your Action Plan

  1. Identify your data type. Population or sample? This determines your formula.
  2. Calculate the mean. Sum all values, divide by count.
  3. Subtract the mean from each value. This gives you deviations.
  4. Square each deviation. No negatives to deal with.
  5. Sum all squared deviations. Add them up.
  6. Divide by N or n-1. Get the variance.
  7. Take the square root. That's your standard deviation.

Do this manually for a few datasets until you understand what's happening. Then use spreadsheet functions for anything real.

Bottom Line

Standard deviation tells you how spread out your data is. The formula looks intimidating but it's just six straightforward steps. Population data uses N in the denominator. Samples use n-1. Get this right and you're set for most statistical work.