Skip to content

Standard deviation calculator with working

Sample and population standard deviation and variance from any list of numbers, with the full deviation table, the formula and a dot plot.

  • Runs in your browser
  • Nothing you enter is sent
  • Free, no account
Your data
Paste numbers separated by commas, spaces, tabs or newlines — a spreadsheet column pastes straight in.

20 values recognised

Which formula?

Use this when your numbers are a subset drawn from a bigger group — the usual case.

Sample standard deviation (s)

3.06078765
Mean 7 · variance 9.368421 · n = 20

Mean (x̄)

7

Count (n)

20

Σ(x − x̄)²

178

sum of squares

Sample variance (s²)

9.36842105

Sample SD (n − 1)

3.06078765

Population SD (n)

2.98328678

Standard error of the mean

0.68441293

s ÷ √n

Coefficient of variation

43.7255%

s ÷ |mean|

mean 7212+1σ−1σ
Each dot is one value; identical values stack upward. The dashed line is the mean and the shaded bands are one and two standard deviations either side of it.

Step-by-step working

  1. Find the mean of the data.

    x̄ = (9 + 2 + 5 + 4 + 12 + 7 + …) ÷ 20 = 7
  2. Subtract the mean from each value to get its deviation.

    9 − 7 = 2 2 − 7 = -5 5 − 7 = -2 4 − 7 = -3 … and 16 more (see the table below)

    Deviations always add up to zero, which is exactly why they get squared before being averaged.

  3. Square every deviation and add them up.

    Σ(x − x̄)² = 178
  4. Divide the sum of squares by n − 1 to get the sample variance.

    s² = 178 ÷ 19 = 9.36842105

    Dividing by n − 1 (the Bessel correction) compensates for measuring deviations from the sample mean rather than the true mean.

  5. Take the square root of the variance.

    s = √9.36842105 = 3.06078765

Deviation table

Each value, its deviation from the mean, and that deviation squared
#xx − x̄(x − x̄)²
1924
22-525
35-24
44-39
512525
6700
7811
811416
9924
103-416
11700
124-39
1312525
145-24
154-39
161039
17924
186-11
19924
204-39
Σ = 140Σ ≈ 0Σ = 178

How to use it

  1. Paste your numbers. Any separator works — commas, spaces, tabs or one value per line.
  2. Choose the sample formula (÷ n − 1) or the population formula (÷ n).
  3. Read the standard deviation, then check the deviation table and the step list to see exactly how it was produced.

Both versions are always shown side by side in the results grid, so you can compare them without switching back and forth.

Sample or population?

This is the only decision the tool asks you to make, and it matters:

Sample Population
Symbolsσ (sigma)
Divide byn − 1n
Use whenYour numbers are a subset of a bigger groupYour numbers are the entire group
Typical caseA survey of 200 customersThe marks of all 30 pupils in one class, when that class is the whole question

If you are unsure, use the sample formula. Almost all real data is a sample, and dividing by n − 1 errs on the side of reporting slightly more spread rather than less.

Why n − 1? The Bessel correction

Deviations are measured from the sample mean, and the sample mean is by construction the point that makes the sum of squared deviations as small as it can possibly be. Measured from the unknown true population mean, the squares would be larger. Dividing by n − 1 instead of n inflates the result just enough to cancel that bias, giving an unbiased estimate of the population variance. With large n the difference is negligible; with n = 5 it is a 12% difference in the variance, which is not.

The formula, step by step

  1. Find the mean: x̄ = Σx ÷ n.
  2. Subtract the mean from every value to get each deviation, x − x̄.
  3. Square each deviation, so that positive and negative distances both count.
  4. Add the squares: Σ(x − x̄)².
  5. Divide by n − 1 (sample) or n (population) to get the variance.
  6. Take the square root, which returns the answer to the original units.

The deviations always sum to zero — that is a useful check, and it is also the reason step 3 exists. Without squaring, the positive and negative deviations would cancel and every data set would have a spread of zero.

Reading the extra statistics

  • Variance — the standard deviation squared. It lives in squared units (squared pounds, squared seconds), which is why the square root is taken for reporting.
  • Standard error of the mean — s ÷ √n. How much the sample mean itself would wobble if you drew another sample of the same size. Quadrupling the sample size halves it.
  • Coefficient of variation — s ÷ |mean|, as a percentage. Lets you compare the spread of quantities measured in different units.
  • Sum of squares — the raw Σ(x − x̄)² before any division. Statistical software reports it constantly, and it is the quantity every variance formula divides.

What the dot plot shows

Each value appears as a dot on a number line, with identical values stacked upward. The dashed line marks the mean and the shaded bands cover one and two standard deviations either side of it. For roughly bell-shaped data you should expect about 68% of the dots inside the inner band and about 95% inside the outer one — the empirical rule. If the dots are lopsided or clustered at one end, the mean and standard deviation are describing the data poorly and the median with the interquartile range is a better summary.

A worked example

Take 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 ÷ 8 = 5. The deviations are −3, −1, −1, −1, 0, 0, 2, 4 and their squares are 9, 1, 1, 1, 0, 0, 4, 16, summing to 32. The population variance is 32 ÷ 8 = 4, so σ = 2. The sample variance is 32 ÷ 7 ≈ 4.571, so s ≈ 2.138. Paste those eight numbers into the tool and the deviation table will show precisely those rows.

Performance and privacy

The mean and sum of squares are computed in a single pass, so tens of thousands of values are handled instantly. The deviation table renders the first 200 rows to keep the page responsive, while the totals row and every headline statistic always cover the entire data set. Nothing leaves your device.

Questions

Should I use the sample or the population formula?

Use the sample formula, dividing by n − 1, when your numbers are a subset drawn from a larger group. Use the population formula, dividing by n, only when you have measured every member.

Why divide by n − 1 for a sample?

Deviations are measured from the sample mean rather than the unknown true mean, which makes them slightly too small. Dividing by n − 1, the Bessel correction, removes that bias.

What does the dot plot show?

Each value as a point on a number line, with the mean marked and shaded bands at one and two standard deviations, so you can see how spread out and how symmetric the data is.

How many numbers can I paste?

Tens of thousands are fine — the calculation runs in your browser in a single pass. The deviation table shows the first 200 rows so the page stays responsive.

Is the standard error included?

Yes. The standard error of the mean is the sample standard deviation divided by the square root of n, and it is reported alongside variance and the coefficient of variation.