Standard deviation tells you how spread out the values in a dataset are from the mean. A small standard deviation means values cluster tightly around the average. A large one means they are widely scattered. It is one of the most important tools in statistics — used in science, finance, quality control, and everyday data analysis.

What Is Standard Deviation?

Standard deviation measures the typical distance between each data point and the mean of the dataset. It answers the question: "On average, how far are the values from the average?"

Consider two classes with the same average score of 75:

📝 Two classes — same mean, very different spreads
Class A scores73, 74, 75, 75, 76, 77
Class B scores40, 55, 70, 80, 95, 100
Both means75
Class A std dev ≈ 1.3 — Class B std dev ≈ 20.6Very different spread
✅ Same mean — completely different distributions. Standard deviation captures this difference.

Population vs Sample Standard Deviation

There are two versions of the standard deviation formula depending on whether your data represents an entire population or just a sample from a larger group.

Population
σ
σ = √[ Σ(x − μ)² ÷ N ]

Use when you have data for every member of the group. Divide by N. Example: heights of all students in one specific class.

Sample
s
s = √[ Σ(x − x̄)² ÷ (N−1) ]

Use when your data is a subset of a larger group. Divide by N−1 (Bessel's correction). Example: surveying 100 people to estimate a country's average height.

💡 Why N−1 for Samples?

Dividing by N−1 instead of N is called Bessel's correction. When you take a sample, the sample values tend to cluster closer to the sample mean than they do to the true population mean. Dividing by N would underestimate the true population variance. Subtracting 1 corrects for this bias, giving a better estimate of the population variance from a sample.

The Formula Broken Down

σ = √[ Σ(x − μ)² ÷ N ]
σ = population standard deviation
Σ = sum of (add up all the following)
x = each individual value
μ = mean of all values
N = total number of values

For sample: replace μ with x̄ (sample mean) and N with N−1

The formula looks intimidating but breaks into four clear operations — and those operations are always the same, in the same order.

Step-by-Step Computation

Step 1

Calculate the mean (average)

Add all values and divide by the count: μ = Σx ÷ N. This is your reference point — the center that every deviation is measured from.

Step 2

Subtract the mean from each value (find deviations)

For each value x, compute (x − μ). Some deviations will be positive (values above the mean) and some negative (values below). Note: if you add all deviations together they always sum to zero — this is a good check.

Step 3

Square each deviation

Compute (x − μ)² for each value. Squaring serves two purposes: it eliminates negative signs (so positives and negatives don't cancel out) and it gives more weight to values far from the mean.

Step 4

Find the average of the squared deviations (variance)

Sum all the squared deviations, then divide by N (population) or N−1 (sample). This result is called the variance — it is standard deviation before the final square root step.

Step 5

Take the square root

Take the square root of the variance. This converts the result back to the original units of the data — if your data is in kilograms, your standard deviation is also in kilograms.

Worked Example — Population Standard Deviation

📝 Dataset: 2, 4, 4, 4, 5, 5, 7, 9 (a complete population)
Step 1: Mean (μ) = (2+4+4+4+5+5+7+9) ÷ 840 ÷ 8 = 5
Value (x) x − μ (deviation) (x − μ)² (squared)
22 − 5 = −39
44 − 5 = −11
44 − 5 = −11
44 − 5 = −11
55 − 5 = 00
55 − 5 = 00
77 − 5 = +24
99 − 5 = +416
Sum of deviations = 0 ✓ Σ(x−μ)² = 32
📐 Completing the calculation
Step 4: Variance (σ²) = Σ(x−μ)² ÷ N = 32 ÷ 84
Step 5: σ = √42
✅ Population Standard Deviation σ = 2

Worked Example — Sample Standard Deviation

Now let's treat the same 8 numbers as a sample taken from a larger population.

📝 Same dataset as a sample: 2, 4, 4, 4, 5, 5, 7, 9
Step 1: Sample mean (x̄)40 ÷ 8 = 5
Step 3: Σ(x − x̄)²32 (same as above)
Step 4: Sample variance (s²) = 32 ÷ (N−1) = 32 ÷ 74.571
Step 5: s = √4.571≈ 2.138
✅ Sample Standard Deviation s ≈ 2.138 — slightly larger than σ = 2 due to Bessel's correction

Another Worked Example — Scores

📝 Exam scores: 70, 80, 85, 90, 75 (treat as population)
Step 1: Mean(70+80+85+90+75) ÷ 5 = 400 ÷ 5 = 80
Score (x) x − 80 (x − 80)²
70−10100
8000
85+525
90+10100
75−525
Sum = 0 ✓ Σ = 250
📐 Completing
Variance σ² = 250 ÷ 550
σ = √50≈ 7.07
✅ σ ≈ 7.07 — on average, scores are about 7 points from the mean of 80

🧮 Standard Deviation Calculator

Enter numbers separated by commas or spaces. Get population σ, sample s, and variance.

Pop. Std Dev (σ)
Sample Std Dev (s)
Pop. Variance (σ²)
Mean (x̄)

Variance vs Standard Deviation

Variance (σ²) and standard deviation (σ) measure the same thing — the spread of data around the mean. The relationship is simply:

📐 The Relationship

Variance = Standard Deviation²
Standard Deviation = √Variance

Variance is in squared units (e.g. kg²). Standard deviation converts back to original units (e.g. kg) by taking the square root — which is why standard deviation is more commonly reported and easier to interpret.

The 68-95-99.7 Rule (Empirical Rule)

For data that follows a normal distribution (bell curve), standard deviation has a precise relationship with the percentage of data that falls within each range. This is called the empirical rule or the 68-95-99.7 rule.

68 — 95 — 99.7 Rule (Normal Distribution)
Within of the mean (μ ± 1σ)
68%
Within of the mean (μ ± 2σ)
95%
Within of the mean (μ ± 3σ)
99.7%
📝 Exam example: mean = 75, σ = 10
68% of students scored between65 and 85 (75 ± 10)
95% of students scored between55 and 95 (75 ± 20)
99.7% of students scored between45 and 105 (75 ± 30)
✅ Only 0.3% of students score outside the 45–105 range

What the Value Means

Standard DeviationWhat It MeansExample
σ = 0 No variation — all values are identical 10, 10, 10, 10
Small σ Values cluster tightly around the mean 9, 10, 10, 11
Large σ Values are widely spread from the mean 1, 5, 10, 50, 100
σ = mean Very high relative spread (CV = 100%) Often seen in skewed distributions

Coefficient of Variation (CV)

The coefficient of variation (CV) expresses standard deviation as a percentage of the mean. It lets you compare variability across datasets with different units or scales.

CV = (σ ÷ μ) × 100%
A CV of 10% means the standard deviation is 10% of the mean.
Lower CV = more consistent data. Higher CV = more variable data.
📝 Comparing two investments: which is more consistent?
Investment A — mean return 10%, σ = 2%CV = 2÷10 × 100 = 20%
Investment B — mean return 50%, σ = 15%CV = 15÷50 × 100 = 30%
Investment A has lower CVMore consistent relative to its mean
✅ Investment A is relatively more consistent even though Investment B has a higher absolute return

Practice Problems

DatasetMeanPopulation σSample s
1, 2, 3, 4, 5 3 1.414 1.581
10, 10, 10, 10 10 0 0
2, 4, 4, 4, 5, 5, 7, 9 5 2.000 2.138
70, 80, 85, 90, 75 80 7.071 7.906
100, 200, 300 200 81.65 100.00
✅ Key Takeaways

1. Standard deviation measures how spread out values are from the mean
2. Population σ: divide by N — use when you have all the data
3. Sample s: divide by N−1 — use when your data is a sample
4. 5 steps: mean → deviations → square → average (variance) → square root
5. Sum of all deviations always equals zero — use as a check
6. Variance = σ² — standard deviation is its square root
7. 68-95-99.7 rule: in a normal distribution, 68% of data falls within 1σ, 95% within 2σ, 99.7% within 3σ
8. CV = (σ ÷ μ) × 100% compares variability across different scales


σ Try the Standard Deviation Calculator

Get population and sample standard deviation, variance, and a full step-by-step deviation table for any dataset.

Try the Calculator →