Standard Deviation Calculator

Paste a list of numbers to get the standard deviation and variance for both a sample and a whole population, with a table that shows each value's distance from the mean.

Separate numbers with commas, spaces or new lines. Don't use commas inside numbers.

Most data — a survey, some measurements, a class's test scores used to judge all students — is a sample.

Sample standard deviation (s)
2.138089935
Sample variance (s²)
≈ 4.5714285714
Mean
5
Population standard deviation (σ)
2if these numbers were the whole population
Count (n)
8
Sum of squares
32
  • Step 1, the mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 5.
  • Step 2: subtract the mean from each value to get its deviation, then square each deviation so negatives don't cancel positives (see the table).
  • Step 3, add the squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32. This is the sum of squares.
  • Step 4, sample variance: divide by n − 1 = 7: 32 ÷ 7 ≈ 4.5714285714.
  • Step 5, sample standard deviation: the square root of the variance, √4.5714285714 = 2.138089935.
  • Standard deviations are rounded to 10 significant figures; the variance and mean are exact unless marked ≈.

Deviations from the mean

Value (x)x − mean(x − mean)²
2-39
4-11
4-11
4-11
500
500
724
9416
Total032

What standard deviation tells you

Standard deviation measures how spread out numbers are around their mean. A small standard deviation means the values sit close to the average; a large one means they're scattered. It's in the same units as your data, so a standard deviation of 2 points on a test is easy to interpret.

Variance is the standard deviation squared. It's what you calculate on the way, and statisticians use it in formulas, but because it's in squared units (points squared, dollars squared) the standard deviation is easier to read.

Sample or population: n or n − 1?

If your numbers are every member of the group you care about — all 30 students in your class, every sale this month — use the population formula and divide by n. If they're a sample used to estimate something about a bigger group — 30 students chosen to represent a school, a handful of lab measurements — divide by n − 1 instead.

Dividing by n − 1 (Bessel's correction) makes the sample variance slightly larger. A sample's values are measured from the sample's own mean, which sits closer to them than the true population mean does, so dividing by n would understate the spread on average. The difference matters for small samples and fades as n grows. Spreadsheets reflect the same split: STDEV.S is the sample version and STDEV.P the population version.

Reading the result

For data that roughly follows a bell curve, about 68% of values fall within one standard deviation of the mean and about 95% within two. That rule doesn't hold for skewed data, so look at your numbers too. A single outlier can inflate the standard deviation a lot, because deviations are squared before they're averaged.

The deviations in the table always add up to zero — that's a handy check when you're working by hand, and the reason the deviations are squared before they're added.

Standard deviation formulas

Mean: x̄ = Σx ÷ nPopulation variance: σ² = Σ(x − x̄)² ÷ n; population standard deviation σ = √σ²Sample variance: s² = Σ(x − x̄)² ÷ (n − 1); sample standard deviation s = √s²
  • x = each value
  • x̄ = the mean
  • n = how many values
  • Σ = "add up the following for every value"

Worked example: 2, 4, 4, 4, 5, 5, 7, 9

  1. Mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5.
  2. Deviations from 5: −3, −1, −1, −1, 0, 0, 2, 4. Squared: 9, 1, 1, 1, 0, 0, 4, 16.
  3. Sum of squares: 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
  4. Population: variance = 32 ÷ 8 = 4, so σ = √4 = 2.
  5. Sample: variance = 32 ÷ 7 ≈ 4.5714, so s = √4.5714 ≈ 2.1381.

Frequently asked questions

Should I use sample or population standard deviation?

Use population only when your list contains every member of the group you're describing. If it's a subset used to draw conclusions about a larger group, use the sample standard deviation, which divides by n − 1.

Can standard deviation be negative?

No. It's the square root of an average of squared numbers, so it's always zero or positive. It's zero only when every value is the same.

What's the difference between variance and standard deviation?

Standard deviation is the square root of variance. For 2, 4, 4, 4, 5, 5, 7, 9 the population variance is 4 and the population standard deviation is 2.

Why can't I get a sample standard deviation from one number?

The sample formula divides by n − 1, which is 0 when n = 1. One value tells you nothing about spread. The population standard deviation of a single value is 0.

What is a "good" standard deviation?

There's no universal threshold; it depends on the scale of the data. Comparing it with the mean helps: the coefficient of variation (standard deviation ÷ mean) expresses spread as a fraction of the average, for positive data.

Sources

Last reviewed for 2026. How we calculate.