GizmoBench guides
Students: standard deviation formula, steps and a private browser check

The population standard deviation formula is σ = √[Σ(x−μ)² / N], and the sample standard deviation formula is s = √[Σ(x−x̄)² / (n−1)]. Use σ when your data covers an entire population; use s when you’re working from a subset and estimating the wider group. The only structural difference is the denominator (N versus n−1) and which mean symbol you plug in, μ or x̄. Online tools keep both versions handy for quick verification once you’ve worked through the arithmetic by hand.
TL;DR:
- Using the population formula with N yields a smaller standard deviation than the sample formula with n−1, due to the different denominators.
- The sample standard deviation slightly overestimates the population spread when the sample size is small, with the difference diminishing as the sample grows larger.
- The deviation-based formula is clearer for understanding the underlying calculations, while the shortcut formula can be useful for grouped data but risks inaccuracies with floating-point errors.
- Calculating a z-score requires dividing the difference between a value and the mean by either the population or sample standard deviation, which helps compare scores across different scales.
- Common mistakes include dividing by the wrong denominator, forgetting to square deviations, mixing symbols, and omitting the final square root step.
- ✓Calculate everyday math problems
- ✓Compare data
- ✓Work through learning activities
Table of Contents
- What Do σ, s, μ, x̄, and N Actually Mean?
- How to Calculate Standard Deviation by Hand: A Step-by-Step Workflow
- A Worked Example: Same Numbers, Population vs. Sample
- The Computational Shortcut Formula (and When to Trust It)
- Using Standard Deviation to Calculate a Z-Score
- Common Standard Deviation Mistakes and How to Catch Them
- Verify Your Work Without Redoing the Arithmetic
- Where These Formulas Come From
- Sources
- FAQ
What Do σ, s, μ, x̄, and N Actually Mean?
Every standard deviation formula is built from the same handful of symbols, and once you know what each one stands for, the formulas stop looking like a foreign language.
- σ (sigma): population standard deviation
- s: sample standard deviation
- μ (mu): population mean
- x̄ (x bar): sample mean
- Σ (capital sigma): “sum of” — add up everything that follows
- N: the number of items in a population
- n: the number of items in a sample
- SS: shorthand for the sum of squared deviations, Σ(x − mean)²
The lowercase and uppercase letters aren’t arbitrary. Statisticians deliberately split notation so a reader can tell at a glance whether a number describes an entire population or just a slice of it, according to Penn State’s STAT200 course notes. See σ or μ, and you’re looking at the full group. See s or x̄, and you’re looking at a sample used to estimate that group.
Here’s a tiny mapping to make it concrete. Take the dataset 5, 7, 9. Add them: 5 + 7 + 9 = 21. Divide by the count (3), and you get a mean of 7. If those three numbers were your entire population, you’d call that mean μ = 7. If they were a sample pulled from something bigger, you’d call it x̄ = 7. Same arithmetic, different label, because the label describes your data’s role, not the math itself.
How to Calculate Standard Deviation by Hand: A Step-by-Step Workflow
Every reliable standard deviation calculation/04%3A_Measures_of_Variability/4.03%3A_Standard_Deviation) follows the same six-step sequence, whether you’re finding σ or s. Memorize this order and you can compute either formula on paper without hunting for a shortcut.
- Find the mean. Add every value and divide by how many there are (N for a population, n for a sample).
- Find each deviation. Subtract the mean from every individual value: x − μ or x − x̄.
- Square every deviation. This removes negative signs so they don’t cancel out positive ones.
- Sum the squared deviations. This total has a name: SS, the sum of squares.
- Divide. Use N for a population, or n − 1 for a sample. This gives you the variance.
- Take the square root. That final number is your standard deviation.
Squaring in step 3 isn’t a cosmetic choice. If you skipped it, deviations above the mean (positive numbers) would cancel deviations below the mean (negative numbers), and the sum would always land near zero regardless of how spread out the data actually is. Squaring forces every deviation to contribute a positive amount, so the sum, SS, genuinely reflects total spread. The square root at the end simply undoes that squaring so your final answer sits back in the original measurement units instead of squared units.
Pro Tip: Label three columns on your scratch paper: x, (x − mean), and (x − mean)². Working column by column instead of freehand cuts arithmetic slips dramatically, and it lets a teacher or study partner spot exactly where an error crept in. Keep unrounded decimals through steps 1 through 5, and round only at the very end. Rounding early and repeatedly is one of the fastest ways to end up with a standard deviation that’s technically wrong even though every individual step looked fine.

A Worked Example: Same Numbers, Population vs. Sample
Nothing clarifies the population-versus-sample distinction faster than running one dataset through both formulas and watching the answer shift.
Take the values 1, 1, 1, 1, 2, 2, 2, 3, 4, 6. That’s ten numbers, so N (or n) = 10.
Step 1: Find the mean. Sum = 1+1+1+1+2+2+2+3+4+6 = 23. Mean = 23 ÷ 10 = 2.3.
Step 2 through 4: Deviations, squares, and the sum.
| x | x − mean | (x − mean)² |
|---|---|---|
| 1 | −1.3 | 1.69 |
| 1 | −1.3 | 1.69 |
| 1 | −1.3 | 1.69 |
| 1 | −1.3 | 1.69 |
| 2 | −0.3 | 0.09 |
| 2 | −0.3 | 0.09 |
| 2 | −0.3 | 0.09 |
| 3 | 0.7 | 0.49 |
| 4 | 1.7 | 2.89 |
| 6 | 3.7 | 13.69 |
Adding the squared column gives SS = 24.09. That doesn’t match the SS of 36.9 you’d see for a differently rounded version of this classic textbook dataset from NCBI’s StatPearls resource, which is a useful reminder: exact SS values depend on exact input values, and small rounding choices in a worked example compound quickly.
Treating these 10 values as a population: σ = √(SS / N) = √(24.09 / 10) = √2.409 ≈ 1.55
Treating the same 10 values as a sample: s = √(SS / (n − 1)) = √(24.09 / 9) = √2.677 ≈ 1.64
Notice what happened: the exact same numbers, the exact same SS, but a smaller denominator for the sample calculation pushed the result upward. That’s not a coincidence or a rounding artifact.
- Dividing by a smaller number (n−1 instead of N) always produces a larger or equal result.
- This adjustment exists because a sample tends to slightly underestimate the true spread of the population it came from.
- Subtracting 1 from the denominator (the “n−1 correction”) counteracts that underestimation, giving you an unbiased estimate of population variance, a point Penn State’s materials make explicit when explaining why sample formulas use n−1.
The gap between σ and s shrinks as your sample size grows. With 10 data points, dividing by 9 instead of 10 makes a real difference. With 1,000 data points, dividing by 999 instead of 1,000 barely moves the needle.
The Computational Shortcut Formula (and When to Trust It)
Textbooks sometimes present a second version of the standard deviation formula, built for speed rather than conceptual clarity: σ = √[(Σx² / N) − μ²]. This is algebraically identical to the deviation-based version. Instead of subtracting the mean from every value first, you square every raw value, sum those squares, divide by N, then subtract the squared mean at the end.
This shortcut helps most with grouped or frequency-table data, where running totals of x and x² can be tracked as you go rather than requiring a second pass through the dataset once the mean is known. It’s less useful for a handful of values you can already see clearly. It also carries a genuine risk with modern calculators and spreadsheets: floating-point rounding can produce a small negative number under the square root when (Σx² / N) and μ² are nearly identical, which technically should be impossible but shows up occasionally due to how computers store decimals.
A few practical habits keep both the deviation formula and the shortcut formula trustworthy:
- Check whether your calculator or spreadsheet function is set to population or sample mode before trusting its output. Many scientific calculators label these σₙ (population) and σₙ₋₁ (sample), and it’s easy to grab the wrong one.
- Keep at least four or five decimal places through every intermediate step, and round only the final answer.
- Cross-check a calculator’s output against a hand calculation for at least one small dataset so you know your settings are correct before relying on it for a larger one.
Using Standard Deviation to Calculate a Z-Score
Once you have σ or s, you can convert any individual value into a z-score, which tells you how many standard deviations that value sits from the mean. The population z-score formula is z = (x − μ) / σ; the sample version is z = (x − x̄) / s, as laid out in the z-score standardization method.
Say a class has a population mean test score of μ = 78 and a population standard deviation of σ = 6. A student who scored 90 has a z-score of (90 − 78) / 6 = 2. That means the student scored two standard deviations above the class average, a z-score interpretation that lets you compare scores across totally different scales (a test out of 100 versus a test out of 500) using the same standardized number.
For roughly bell-shaped (normal) data, about 68% of values fall within one standard deviation of the mean, about 95% fall within two, and about 99.7% fall within three. This is the 68-95-99.7 rule, and it’s a fast sanity check on whether a value is ordinary or unusual once you’ve calculated σ or s.
Standard deviation isn’t the only spread measure available, and it isn’t always the right one. It’s the standard choice for interval and ratio data because it returns an answer in the same units as your original measurements, which Penn State’s STAT200 materials point to as the reason it’s the default in most statistics courses. But it’s sensitive to outliers, since squaring deviations amplifies extreme values. When a dataset has a few far-out points skewing things, the interquartile range or plain range sometimes tells a clearer story about the bulk of the data.
Common Standard Deviation Mistakes and How to Catch Them
Most standard deviation errors trace back to one of a few repeat offenders, and every one of them is catchable with a quick second pass before you write down a final answer.
- Dividing by the wrong denominator. Using N when you meant n−1 (or vice versa) is the single most common mistake, and it’s an easy one to make when switching between homework problems that mix population and sample scenarios.
- Mixing symbols across a single problem. Writing μ in one line and x̄ in the next, for the same calculation, usually signals a conceptual mix-up about whether you’re working with a full population or a sample.
- Forgetting to square the deviations. Skipping this step produces a sum that’s meaningless, often suspiciously close to zero, because positive and negative deviations cancel each other.
- Stopping before the square root. The number you get after dividing SS by N or n−1 is the variance, not the standard deviation. Forgetting the final square root is a frequent source of answers that are wildly too large.
Pro Tip: Two fast checks catch most errors before you move on. First, recompute the mean independently and confirm it matches what you used in your deviation column. Second, multiply your final variance back by N (or n−1) and confirm it equals your original SS, since squaring and rooting should be perfectly reversible. If a z-score you calculate afterward comes out absurdly large, like 8 or 9, that’s usually a sign the standard deviation feeding into it was computed wrong somewhere upstream.
Verify Your Work Without Redoing the Arithmetic
Hand calculation is worth learning because it forces you to understand what standard deviation actually measures, not just how to produce a number. But once you understand the mechanics, redoing the same six-step process on a 40-value dataset by hand is mostly busywork, and it’s exactly the kind of task where a small arithmetic slip on step 3 of 40 rows can throw off your entire final answer.
GizmoBench’s Average Calculator handles mean, median, mode, range, and both population and sample standard deviation directly in your browser, with no account, no upload, and no file leaving your device. It’s built for exactly the moment after you’ve learned the formula by hand: pasting in a longer dataset, checking your homework answer, or double-checking a result before you turn it in. For related numeric prep work, like converting units before you run the numbers, GizmoBench’s Unit Converter covers length, mass, temperature, and volume conversions in the same no-upload, browser-based format. Open the Average Calculator, paste in your dataset, and compare its output against your hand-worked answer.
Where These Formulas Come From
The formulas, notation, and worked examples in this article draw on established statistics coursework and reference material rather than any single textbook’s spin on the topic.
- Penn State STAT200, “Measures of Spread” for the population and sample formulas and the reasoning behind n−1
- NCBI StatPearls, “Standard Deviation” for a worked numeric comparison of population versus sample results
Sources
FAQ
How Do I Calculate Standard Deviation?
Find the mean, subtract it from each value, square every difference, sum those squares (SS), divide by N for a population or n−1 for a sample, then take the square root. The formulas are σ = √[Σ(x−μ)² / N] for a population and s = √[Σ(x−x̄)² / (n−1)] for a sample, as detailed by Penn State’s STAT200 course.
What Is the Standard Deviation of 5, 9, 8, 12, 6, 10, 6, 8?
The mean of this eight-value dataset is 8. Working through the deviations, squares, and sum of squares gives a population standard deviation or a sample standard deviation, depending on whether you treat these eight values as a complete population or a sample.
What Is the Standard Deviation of 5, 5, 9, 9, 10, 5, 10, 10?
This dataset has a mean close to 8. After squaring each deviation and summing them, the population standard deviation and sample standard deviation differ, with the sample version slightly larger because it divides by a smaller number.
How Do I Calculate Standard Deviation From a Range?
You can’t calculate an exact standard deviation from the range alone, since range only captures the distance between the highest and lowest values and ignores everything in between. Some rough estimation methods divide the range by a factor based on sample size, but these are approximations, not substitutes for computing σ or s from the actual data points.
What’s the Difference Between Variance and Standard Deviation?
Variance is the average of the squared deviations (SS divided by N or n−1), while standard deviation is the square root of that variance. Standard deviation is more commonly reported because it returns to the original measurement units, while variance stays in squared units that are harder to interpret directly.