The problem: N or N-1?
Standard deviation has two formulas that differ by one number in the denominator. Divide by N and you get the population standard deviation. Divide by N-1 and you get the sample standard deviation. They give different answers on the same data, and most people don't know which one they need.
Here's the rule: if your data is the entire population — every value that exists, no more — divide by N. If your data is a sample — a subset of a larger population, and you're using it to estimate the spread of that population — divide by N-1. That's Bessel's correction, and it exists because a sample's values are, on average, closer to the sample's own mean than to the true population mean. Dividing by N would systematically underestimate the true spread. Dividing by N-1 corrects for this bias.
Almost all real-world data is a sample. Test scores from one class are a sample of all possible students. Monthly sales from one year are a sample of all possible years. Heights of 50 people are a sample of the population they come from. If you're calculating standard deviation to characterize a larger group, use N-1. The only time you use N is when you genuinely have every data point — a census, a complete inventory, a finite list where nothing is missing.
The tool defaults to sample mode (N-1) because that's what most people need. It also computes population mode simultaneously, so you can see both.
Fastest path
Open the Standard Deviation Calculator, paste your numbers (separated by commas, spaces, tabs, or newlines), and read the results. The tool shows mean, median, mode, range, variance, and standard deviation in both modes, plus a step-by-step table of each value's deviation and squared deviation so you can see the math.
Worked example — six test scores: 4, 8, 15, 16, 23, 42:
Step 1 — Mean: (4+8+15+16+23+42) / 6 = 18.0
Step 2 — Deviations: -14, -10, -3, -2, 5, 24
Step 3 — Squared devs: 196, 100, 9, 4, 25, 576
Step 4 — Sum of squares: 910
Step 5a — Population var: 910 / 6 = 151.67 → σ = 12.32
Step 5b — Sample var: 910 / 5 = 182.00 → s = 13.49
Same data, two answers: 12.32 (population) or 13.49 (sample). The sample value is larger because dividing by N-1 (5) instead of N (6) inflates the result to correct for the bias. Which one you report depends on whether those six scores are all the scores that exist (population) or six scores from a larger class (sample).
The formula, step by step
Population: σ = √( Σ(xi − μ)² / N )
Sample: s = √( Σ(xi − x̄)² / (N−1) )
Both formulas do the same six things in the same order. Only the divisor changes.
1. Find the mean. Add all values, divide by count. This is μ (population mean) or x̄ (sample mean). For the example: 108 / 6 = 18.
2. Calculate each deviation. Subtract the mean from each value. Deviation = xi − mean. These can be negative. The deviations are -14, -10, -3, -2, 5, 24.
3. Square each deviation. This makes everything positive and amplifies large deviations. The squared deviations are 196, 100, 9, 4, 25, 576. Notice that the value furthest from the mean (42, deviation 24) contributes 576 to the sum — more than the other five combined. This is why standard deviation is sensitive to outliers.
4. Sum the squared deviations. Add them all up. This is the sum of squares, SS = 910.
5. Divide by N or N-1. This is the variance. Population: 910 / 6 = 151.67. Sample: 910 / 5 = 182.00.
6. Take the square root. This converts variance (in squared units) back to the original units. Population: √151.67 = 12.32. Sample: √182.00 = 13.49. The square root is what makes it "standard deviation" instead of "variance."
Why the square root matters: variance vs standard deviation
Variance is the number you get at step 5 — the average squared deviation. It's useful in statistical formulas (it's additive for independent variables, and it's what ANOVA and regression work with). But variance is in squared units. If your data is in meters, variance is in square meters. If your data is in dollars, variance is in square dollars. Neither is intuitive.
Standard deviation is the square root of variance, which puts it back in the original units. A standard deviation of 13.49 points on a test means something. A variance of 182 square-points does not. When someone says "the standard deviation is 13," they can picture a band of ±13 around the mean and think about what that means for the data. Variance doesn't give you that picture.
The tool reports both, and you should report standard deviation in prose and variance only when a formula specifically needs it.
What the number tells you (and what it doesn't)
Standard deviation measures spread — how far the typical value sits from the mean. A small SD means the data clusters tightly. A large SD means it's scattered. But "small" and "large" are relative to the mean. A standard deviation of 5 is small if the mean is 1,000 and large if the mean is 10. You can't interpret SD without the mean.
The empirical rule (68-95-99.7) says that for approximately normal distributions, about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three. This is useful when it applies, and it applies to a lot of natural data (heights, measurement errors, standardized test scores). It does not apply to:
- Skewed distributions. Income data is right-skewed — a few high earners pull the mean up, and most people are below the mean. The empirical rule fails badly here. For the example data (4, 8, 15, 16, 23, 42), 42 is an outlier that inflates the SD, and the empirical rule is unreliable on six data points anyway.
- Bimodal distributions. If the data has two peaks, the mean sits between them, and the SD measures the spread across both peaks — which overstates the spread within either group.
- Small samples. The empirical rule is an asymptotic property. With n=6, you don't have enough data for it to hold. It's a guide for n ≥ 30 or so, not a rule.
Gotchas
- Outliers dominate. The squaring step amplifies large deviations. One value that's 10 standard deviations from the mean contributes 100 times as much to the sum of squares as a value that's 1 SD away. This is why SD is not robust — a single outlier can double the standard deviation. If your data has outliers, consider the median absolute deviation (MAD) or interquartile range (IQR) instead.
- Sample SD is undefined for n=1. Dividing by N-1 means dividing by zero when there's only one data point. The tool shows a warning for this. Add a second value or switch to population mode (which is defined for n=1, with SD = 0 since there's no spread).
- Don't compare SDs across different scales. A standard deviation of 5 cm and a standard deviation of 5 inches are not the same spread. Always include the unit and the mean when reporting SD. "Mean 170 cm, SD 5 cm" is meaningful. "SD 5" is not.
- Population SD on a sample underestimates. If your data is a sample and you report population SD, your answer is biased low. The bias is small for large samples (the difference between ÷N and ÷(N-1) shrinks as N grows) but significant for small samples. At n=10, using N instead of N-1 underestimates by about 5%. At n=5, it's about 11%.
- Excel's STDEV functions are confusing.
STDEV.Pcomputes population SD (÷N).STDEV.Scomputes sample SD (÷N-1). The oldSTDEV(without a suffix) computed sample SD. If you're comparing tool output to Excel, make sure you're using the matching function.
Summary
- Population standard deviation divides by N. Use it when you have every data point. Sample standard deviation divides by N-1 (Bessel's correction). Use it when your data is a subset of a larger population. Most real-world data is a sample.
- The formula is six steps: mean, deviations, square, sum, divide, square root. The tool's step-by-step table shows each one.
- Variance is in squared units. Standard deviation is the square root of variance, in original units. Report standard deviation; use variance only when a formula needs it.
- The empirical rule (68-95-99.7) works for approximately normal distributions and n ≥ 30. It fails for skewed, bimodal, or small-sample data.
- Use the Standard Deviation Calculator for the full computation with both modes and a deviation table, the Statistics Calculator for broader descriptive statistics, and the Percentage Calculator for the ratio-based calculations that pair with statistical comparison.