Standard Deviation: What It Is, Formula & How to Calculate It
Plain-English explanation of standard deviation. Population vs sample formula, step-by-step calculation, and a free SD calculator.
Introduction
If you have ever looked at a set of numbers and wondered how spread out they really are, standard deviation is the tool you need. It is one of the most widely used statistics in the world — showing up in school grade reports, financial risk models, scientific research, quality control on factory floors, and sports analytics.
Yet most explanations make it feel more complicated than it actually is.
This guide cuts through the noise. You will learn exactly what standard deviation means, see both formulas written out plainly, walk through a complete worked example by hand, and understand the mistakes that trip people up most often. By the end, you will be able to calculate standard deviation yourself and know when to use each version of the formula.
What Standard Deviation Actually Measures
Standard deviation (SD) tells you how much the values in a dataset typically differ from the mean (average). A small standard deviation means the values cluster tightly around the mean. A large standard deviation means the values are spread far apart.
Think of two classes taking the same exam:
- Class A scores: 70, 71, 72, 69, 68 — Mean: 70, SD: ~1.4
- Class B scores: 40, 55, 70, 85, 100 — Mean: 70, SD: ~22.4
Both classes have the same average score, but Class B is wildly inconsistent while Class A performs almost identically. Standard deviation captures that difference in a single number.
This is why SD is useful anywhere consistency matters — investment returns, manufacturing tolerances, test reliability, clinical trial outcomes.
Population vs Sample: Two Versions of the Formula
This is where most people get confused, and it matters. There are two standard deviation formulas, and using the wrong one gives you a misleading result.
Population Standard Deviation (σ)
Use this when your dataset is the entire group you care about — every single member is included.
Formula:
σ = √[ Σ(xᵢ - μ)² / N ]
Where:
- σ (sigma) = population standard deviation
- Σ = “sum of”
- xᵢ = each individual value
- μ (mu) = population mean
- N = total number of values in the population
Sample Standard Deviation (s)
Use this when your dataset is a sample taken from a larger population — which is the case in almost all real-world research.
Formula:
s = √[ Σ(xᵢ - x̄)² / (n - 1) ]
Where:
- s = sample standard deviation
- x̄ (x-bar) = sample mean
- n = number of values in the sample
- n - 1 = “Bessel’s correction” — the reason the denominator is smaller
Why n - 1 Instead of n?
When you measure a sample rather than the full population, your sample values tend to cluster closer to the sample mean than the full population’s values cluster around the true population mean. Dividing by n would therefore underestimate the true spread. Subtracting 1 from the denominator corrects for this bias, giving a more accurate estimate of the population’s variability.
In plain terms: if you are working with a sample (which you almost always are), use n - 1.
Step-by-Step Worked Example
Let’s calculate the sample standard deviation for this dataset:
Dataset: 4, 7, 13, 2, 9
Step 1: Find the Mean
Add all the values and divide by how many there are.
Mean (x̄) = (4 + 7 + 13 + 2 + 9) / 5
= 35 / 5
= 7
Step 2: Subtract the Mean from Each Value
Find each value’s deviation from the mean.
| Value (xᵢ) | Deviation (xᵢ - x̄) |
|---|---|
| 4 | 4 - 7 = -3 |
| 7 | 7 - 7 = 0 |
| 13 | 13 - 7 = 6 |
| 2 | 2 - 7 = -5 |
| 9 | 9 - 7 = 2 |
Step 3: Square Each Deviation
Squaring removes negative signs and emphasizes larger deviations.
| Deviation | Squared (xᵢ - x̄)² |
|---|---|
| -3 | 9 |
| 0 | 0 |
| 6 | 36 |
| -5 | 25 |
| 2 | 4 |
Step 4: Sum the Squared Deviations
Σ(xᵢ - x̄)² = 9 + 0 + 36 + 25 + 4 = 74
Step 5: Divide by n - 1
Since this is a sample (n = 5):
74 / (5 - 1) = 74 / 4 = 18.5
This result — 18.5 — is called the variance.
Step 6: Take the Square Root
s = √18.5 ≈ 4.30
The sample standard deviation is approximately 4.30.
This means each value in the dataset differs from the mean of 7 by about 4.30 units on average.
Understanding Variance vs Standard Deviation
You may have noticed Step 5 produced something called the variance (18.5 in our example). Variance and standard deviation are closely related:
- Variance = the average of squared deviations from the mean
- Standard Deviation = the square root of variance
So why use standard deviation instead of variance? Because variance is in squared units. If your original data is in dollars, variance is in dollars-squared — which has no intuitive meaning. Standard deviation brings the result back to the original unit, making it directly interpretable alongside your data.
Common Mistakes When Calculating Standard Deviation
Even people comfortable with math make these errors. Watch out for all of them.
Mistake 1: Using n Instead of n - 1 for Sample Data
This is the most common mistake. If your dataset is a sample (not the entire population), always divide by n - 1, not n. Using n will systematically underestimate the true variability.
When to use n: You have data for every single member of the group — every student in a specific class, every product in a specific batch.
When to use n - 1: You collected data from a subset and want to draw conclusions about a larger group — survey respondents, clinical trial participants, randomly sampled products.
Mistake 2: Forgetting to Square the Deviations
If you just added up the raw deviations (without squaring), you would always get zero — the positive and negative differences cancel out exactly. Squaring is not arbitrary; it is mathematically essential.
Mistake 3: Taking the Square Root Too Early
Variance and standard deviation are different things. Make sure you complete the division step before taking the square root. The correct order is: subtract → square → sum → divide → then square root.
Mistake 4: Confusing Standard Deviation with Standard Error
Standard error (SE) measures how much a sample mean is likely to differ from the true population mean. It equals the standard deviation divided by the square root of n. Standard deviation describes spread within a dataset; standard error describes precision of an estimate. These are not interchangeable.
Mistake 5: Treating SD as a Complete Picture of Spread
Standard deviation works best when data is roughly bell-shaped (normally distributed). For heavily skewed data or data with extreme outliers, SD can be misleading. In those cases, the interquartile range (IQR) is often a better measure of spread.
Frequently Asked Questions
1. What does a standard deviation of 0 mean?
A standard deviation of exactly 0 means every value in the dataset is identical — there is no variation at all. For example, if five people all scored 85 on a test, the SD is 0.
2. Can standard deviation be negative?
No. Because deviations are squared before being summed, the result before the square root is always zero or positive. And the square root of a non-negative number is always non-negative. SD is always ≥ 0.
3. What is a “good” standard deviation?
There is no universal answer — it entirely depends on context. A standard deviation of 5 might be tiny for national income data but enormous for a precision manufacturing component measured in millimeters. Always interpret SD relative to the mean and the scale of your data.
4. How does standard deviation relate to the normal distribution (bell curve)?
In a perfectly normal distribution, a reliable pattern holds:
- About 68% of values fall within 1 SD of the mean
- About 95% fall within 2 SDs
- About 99.7% fall within 3 SDs
This is called the empirical rule or 68-95-99.7 rule. It is why SD is so powerful: once you know the mean and SD, you can quickly estimate where most data points will fall.
5. How is standard deviation used in finance?
In investing, standard deviation is a primary measure of risk. A stock with a high SD has returns that jump around dramatically — higher potential reward, but also higher potential loss. A stock with a low SD delivers more predictable, stable returns. Portfolio managers use SD (and its cousin, variance) to optimize the balance between risk and expected return — the foundation of modern portfolio theory.
Quick Reference: Choosing the Right Formula
| Situation | Formula to Use | Denominator |
|---|---|---|
| Data covers the entire population | Population SD (σ) | N |
| Data is a sample from a larger group | Sample SD (s) | n - 1 |
| Calculator or spreadsheet | STDEV.P() for population, STDEV.S() for sample | — |
Conclusion
Standard deviation is not just an abstract statistical concept — it is a practical tool that answers one of the most important questions you can ask about any dataset: how spread out is it?
The calculation follows a clear six-step process: find the mean, subtract it from each value, square those differences, sum them up, divide by N (or n - 1 for a sample), and take the square root. Once you have done it by hand once, the logic behind the formula becomes intuitive rather than mysterious.
The key distinctions to remember:
- Use population SD only when you have data for every member of the group
- Use sample SD (with n - 1) for almost all real-world datasets
- Standard deviation is in the same units as your original data, making it directly interpretable
- SD assumes roughly symmetrical data — check for outliers and skew before relying on it
If you want to skip the manual calculation and verify your work, the free tools at NovaCalculator let you input your dataset and get instant results — including mean, variance, and both population and sample standard deviation — so you can focus on understanding what the numbers mean rather than grinding through arithmetic.
Whether you are analyzing test scores, comparing investment risk, running a science experiment, or just curious about a set of numbers, standard deviation gives you the clearest single-number summary of variability that statistics has to offer.
Frequently Asked Questions
What does a standard deviation of 0 mean? +
A standard deviation of exactly 0 means every value in the dataset is identical — there is no variation at all. For example, if five people all scored 85 on a test, the SD is 0.
Can standard deviation be negative? +
No. Because deviations are squared before being summed, the result before the square root is always zero or positive. And the square root of a non-negative number is always non-negative. SD is always ≥ 0.
When should I use population vs sample standard deviation? +
Use population SD (σ) only when your dataset covers every single member of the group. Use sample SD (s, with n − 1 in the denominator) for almost all real-world datasets where you collected data from a subset.
What is the difference between variance and standard deviation? +
Variance is the average of squared deviations from the mean. Standard deviation is the square root of variance. SD is preferred because it is expressed in the same units as the original data, making it directly interpretable.
How is standard deviation used in finance? +
In investing, standard deviation is a primary measure of risk. A stock with a high SD has returns that jump around dramatically. A stock with a low SD delivers more predictable, stable returns. Portfolio managers use SD to optimize the balance between risk and expected return.
NovaCalculator Editorial Team
NovaCalculator Editorial Team
Our writers combine mathematical expertise with clear writing to make calculations accessible to everyone. Content is peer-reviewed for accuracy against authoritative sources including NIST, WHO, and CFPB.
Try the Calculator
Standard Deviation Calculator
Use the free tool to calculate instantly — no signup needed.