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.

Every calculation runs in your browser — nothing is sent to a server.

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

  1. Mean — add up all the numbers and divide by the count: mean = Σx ÷ n.
  2. Deviation — for each number, subtract the mean: x − mean.
  3. Squared deviation — square each deviation so negatives don't cancel positives: (x − mean)².
  4. Sum of squares (SS) — add up every squared deviation.
  5. Variance — divide SS by n (population) or by n − 1 (sample).
  6. 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?

SituationUseDivisor
Every test score in one classPopulation (σ)n
30 survey respondents standing in for all customersSample (s)n − 1
Every day's temperature in a specific monthPopulation (σ)n
A handful of lab measurements estimating a true valueSample (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

Common Mistakes

Sources & further reading

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.