Standard Deviation Calculator
Paste a list of numbers and instantly get the sample and population standard deviation, variance, mean, and sum of squares — with an expandable step-by-step deviation table. Every calculation runs in your browser.
Separate numbers with commas, spaces, or new lines. Pasting a column from a spreadsheet works too.
Enter at least one number to see the standard deviation, variance, mean, and more.
Step-by-step breakdown
| # | Value | Deviation (x − mean) | Squared deviation |
|---|
Every calculation runs in your browser — nothing is sent to a server.
Tap a card to copy the number
Measuring Spread, Not Just the Middle
An average tells you where the center of a dataset sits, but it says nothing about how tightly the numbers cluster around that center. Two classes can both average 75% on a test — one where every student scored between 70 and 80, another where scores ranged from 20 to 100. Standard deviation is the standard way to quantify that difference: a small standard deviation means the data hugs the mean, and a large one means it's spread wide. This calculator computes both the sample and population versions side by side, along with variance, the sum of squares, and a row-by-row breakdown of every deviation.
The Formula, Step by Step
- Mean — add up all the numbers and divide by the count: mean = Σx ÷ n.
- Deviation — for each number, subtract the mean: x − mean.
- Squared deviation — square each deviation so negatives don't cancel positives: (x − mean)².
- Sum of squares (SS) — add up every squared deviation.
- Variance — divide SS by n (population) or by n − 1 (sample).
- Standard deviation — take the square root of the variance, which brings the units back to the original scale.
Worked example. Data: 2, 4, 4, 4, 5, 5, 7, 9 (n = 8). Mean = 40 ÷ 8 = 5. Deviations: −3, −1, −1, −1, 0, 0, 2, 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16. Sum of squares = 32. Population variance = 32 ÷ 8 = 4, so population standard deviation = √4 = 2. Sample variance = 32 ÷ 7 ≈ 4.571, so sample standard deviation ≈ 2.138.
Sample vs. Population — Which One Do You Need?
This is the most common point of confusion, and it comes down to one question: do your numbers represent the entire group you care about, or just a slice of it?
| Situation | Use | Divisor |
|---|---|---|
| Every test score in one class | Population (σ) | n |
| 30 survey respondents standing in for all customers | Sample (s) | n − 1 |
| Every day's temperature in a specific month | Population (σ) | n |
| A handful of lab measurements estimating a true value | Sample (s) | n − 1 |
Dividing by n − 1 instead of n — Bessel's correction — makes the sample formula produce a slightly larger number. This corrects a subtle bias: a sample's own mean is, on average, a bit closer to its own data points than the true population mean would be, which would otherwise make the sample variance an underestimate. When in doubt and your dataset is the whole population you're studying, use population standard deviation; when it's a subset used to infer something bigger, use sample standard deviation.
Reading the Result Cards
- Count (n) and Sum — sanity-check that every number you pasted was actually parsed.
- Mean — the arithmetic average, the center that deviations are measured from.
- Sample / Population standard deviation — the headline numbers, in the same units as your original data.
- Sample / Population variance — the squared version, used as an input to other statistical tests (t-tests, ANOVA, regression) rather than reported directly.
- Sum of squares (SS) — the shared numerator both variances are built from; useful if you're checking your own by-hand calculation.
Common Mistakes
- Using the wrong divisor. Dividing a sample's sum of squares by n instead of n − 1 (or vice versa) is the single most common standard deviation error, and it always makes the population version look identical to a sample that's actually slightly larger.
- Forgetting to square before averaging. Averaging the raw deviations always gives zero — positive and negative deviations cancel out by definition, which is exactly why the deviations are squared first.
- Expecting a sample standard deviation from one data point. With n = 1 the sample formula divides by zero, so it's mathematically undefined — not a rounding error, and not something this calculator can paper over.
- Reporting variance when standard deviation was asked for. Variance is in squared units (dollars², cm²) and is rarely the number people actually want to see or compare.
Sources & further reading
- NIST/SEMATECH e-Handbook of Statistical Methods — standard definitions of variance, standard deviation and sample vs. population estimators
- U.S. Bureau of Labor Statistics Handbook of Methods — how dispersion and standard errors are computed in official survey statistics
- Khan Academy Statistics & Probability — worked examples of sum of squares, variance and the n − 1 correction
Frequently asked questions
What is standard deviation, and how do I calculate it step by step?
Standard deviation measures how spread out a set of numbers is around its mean. Worked example: for 2, 4, 4, 4, 5, 5, 7, 9 the mean is 40 ÷ 8 = 5. Each deviation from the mean is −3, −1, −1, −1, 0, 0, 2, 4; squaring and adding them gives a sum of squares of 32. Dividing by 8 (population) gives a variance of 4, so the population standard deviation is √4 = 2. This calculator does every one of these steps for you and shows them in the expandable breakdown table.
What's the difference between sample and population standard deviation, and why divide by n − 1?
Use population standard deviation when your numbers are the entire group you care about — every student in a class, every day in a month. Use sample standard deviation when your numbers are a subset used to estimate a larger population, like 30 customers standing in for all customers. Dividing by n − 1 instead of n (Bessel's correction) slightly inflates the result to correct for the fact that a sample's own mean is closer to its data than the true population mean would be, which otherwise makes the sample variance an underestimate. For the same dataset, sample standard deviation is always a little larger than population standard deviation.
What is variance, and how does it relate to standard deviation?
Variance is the average of the squared deviations from the mean — standard deviation is simply its square root. Squaring keeps deviations from cancelling out (since positive and negative differences would otherwise sum to zero) but leaves the result in squared units, like dollars² or cm², which is hard to interpret. Taking the square root brings the number back to the original units, which is why standard deviation is usually reported for readability while variance underlies other statistics like ANOVA and confidence intervals.
Can standard deviation be negative or zero, and why does the sample value show N/A for a single number?
Standard deviation can never be negative — it's a square root of squared numbers, which are always zero or positive. It equals exactly zero only when every value in the list is identical, since there's no spread at all to measure. With only one number entered, the sample standard deviation shows N/A because its formula divides by n − 1, which is zero for n = 1 — an undefined division. Population standard deviation still works with a single value (it's simply 0), since its formula divides by n instead.
What number formats are accepted, and is my data sent to a server?
Type or paste numbers separated by commas, spaces, or new lines, in any mix — negative numbers and decimals are both fine, and pasting a column straight from a spreadsheet works the same way. Anything that isn't a valid number is skipped, and the calculator tells you how many entries it ignored. Every calculation runs entirely in your browser — nothing you type or paste is uploaded or shared with anyone. Your last entry is saved only in this browser's local storage, so clearing your browser data removes it completely.