Standard Deviation Explained
Learn what standard deviation measures, the difference between population and sample standard deviation, and how to calculate both with a worked example.
Understanding the Calculation
The mean alone doesn't tell you how consistent a dataset is. Two datasets can share the exact same mean while looking completely different — one tightly clustered, one wildly spread out. Standard deviation is the standard way to quantify that spread.
To find standard deviation, you first find how far each value is from the mean, square those differences (so negative and positive differences don't cancel out), average the squared differences to get the variance, then take the square root to bring the units back to the original scale.
There are two versions: population standard deviation, used when your dataset is the entire group you care about, and sample standard deviation, used when your dataset is a sample drawn from a larger population. They use slightly different divisors.
The Formula
Population: σ = sqrt[ Σ(x - μ)^2 / N ] | Sample: s = sqrt[ Σ(x - x̄)^2 / (n - 1) ]The sample formula divides by (n - 1) instead of n. This correction (called Bessel's correction) compensates for the fact that a sample's own mean tends to sit slightly closer to the sample's values than the true population mean would, which would otherwise make the sample understate the true spread.
Variables & Definitions
- x— Data Value
- Each individual number in the dataset.
- μ / x̄— Mean
- The average of all values (population mean μ, or sample mean x̄).
- N— Population Size
- The total count of values when the dataset is the entire population.
- n— Sample Size
- The count of values when the dataset is a sample drawn from a larger population.
- σ / s— Standard Deviation
- Population standard deviation (σ) or sample standard deviation (s).
Worked Example
Worked Example: Standard Deviation of a Small Dataset
Calculate both the population and sample standard deviation of the dataset: 2, 4, 4, 4, 5, 5, 7, 9.
- Dataset:2, 4, 4, 4, 5, 5, 7, 9
- Count (N or n):8
- 1
Find the mean
Add all 8 values and divide by 8.
(2+4+4+4+5+5+7+9) / 8 = 40 / 8 = 5Result: Mean = 5 - 2
Find each squared deviation from the mean
Subtract the mean from each value and square the result: (-3)^2=9, (-1)^2=1 (x3), 0^2=0 (x2), 2^2=4, 4^2=16.
9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32Result: Sum of squared deviations = 32 - 3
Calculate population standard deviation
Divide the sum of squared deviations by N (8), then take the square root.
σ = sqrt(32 / 8) = sqrt(4) = 2Result: Population SD = 2 - 4
Calculate sample standard deviation
Divide the sum of squared deviations by (n - 1) = 7, then take the square root.
s = sqrt(32 / 7) ≈ sqrt(4.571) ≈ 2.138Result: Sample SD ≈ 2.138
Calculate Your Own Numbers
Put these formulas into practice with our free, in-browser calculators:
Standard Deviation Calculator
Calculate population and sample standard deviation, variance, and mean for any dataset.
Open calculatorVariance Calculator
Calculate population and sample variance directly.
Open calculatorMean, Median & Mode Calculator
Find central tendency measures for a dataset before analyzing its spread.
Open calculatorWhat the Results Mean For You
- A low standard deviation relative to the mean means the data is consistent — most values sit close together. A high standard deviation means the data is volatile or widely spread, even if the average looks the same.
- Standard deviation shares the same units as the original data (dollars, points, degrees), unlike variance, which is in squared units — this is why standard deviation is usually easier to interpret directly.
- Use population standard deviation only when your dataset genuinely is the entire group of interest (every student in a class, every day in a fixed month). Use sample standard deviation whenever the dataset is a subset meant to represent a larger population.
Common Pitfalls & Mistakes
Forgetting to square the deviations before averaging
Averaging the raw (unsquared) differences from the mean always produces zero, because positive and negative deviations cancel out — squaring first is what makes the spread measurable.
Using the wrong divisor for the situation
Dividing by N when the data is actually a sample (or by n-1 when the data is the full population) produces a standard deviation that is systematically off from the intended measure.
Comparing standard deviations across datasets with very different means
A standard deviation of 10 means something different for a dataset averaging 20 than for one averaging 10,000 — relative spread (e.g. coefficient of variation) is often more meaningful when comparing unlike datasets.
Authoritative References & Sources
All formula representations and regulatory context are verified against authoritative public sources:
- Measures of SpreadNIST/SEMATECH e-Handbook of Statistical Methods
Federal statistical reference defining population and sample standard deviation formulas.
Visit source documentation