Free tool

Standard deviation calculator, with the steps.

Paste your numbers to get the sample and population standard deviation and variance, the mean, the sum of squares, the standard error, the coefficient of variation and a z-score for every value. A table shows each step (value, deviation, squared deviation), a small plot shows where the numbers sit around the mean, and an optional confidence interval for the mean is there if you need one. Numbers can be split by spaces, commas, tabs or new lines, so a spreadsheet column pastes straight in.

Do the numbers cover

Pick A sample when your numbers are only some of a bigger group, which is the usual case. Pick The whole group when you have every value.

Worked out in your browser. Nothing is sent anywhere.

The maths

How far the numbers sit from the mean.

01 / Deviation

Distance from the mean

Subtract the mean from each value, then square the result so every distance counts as positive.

02 / Variance

The average square

Add the squares and divide by n for a whole group, or by n − 1 for a sample.

03 / Standard deviation

Back to the same units

The square root of the variance, so the spread is in the same units as your numbers.

Guide

How to find standard deviation, with worked examples.

A standard deviation calculator measures how spread out a list of numbers is. A small standard deviation means the numbers sit close to their mean. A large one means they are scattered. This page gives both versions, sample and population, side by side, together with the variance, mean, sum of squares, standard error, coefficient of variation and a z-score for each value. It writes out each step so you can check it against your homework or your spreadsheet.

How to use the standard deviation calculator

  1. Paste or type your numbers in Numbers. Spaces, commas, tabs and new lines all work.
  2. Choose A sample if your numbers are only part of a bigger group, or The whole group if you have every value.
  3. Read the big card for the standard deviation you chose. The other version is in a smaller card.
  4. Open Plot, Steps and the table to see the working. The table lists each value, its distance from the mean, that distance squared and its z-score.
  5. Pick a level under Confidence interval for the mean if you want one, and use Copy result or Copy link to keep or share the answer.

Sample or population: n or n − 1

The two versions differ in one divisor. The population standard deviation divides the sum of squares by n, the number of values. The sample standard deviation divides by n − 1. A sample tends to sit a little closer to its own mean than to the true mean of the whole group, so dividing by n would come out too small. Dividing by n − 1 corrects for that. Use the population version only when your list really is everything, such as the scores of every student in one small class. Use the sample version for survey answers, measurements and test results, which stand in for a larger group.

A worked example

Take 2, 4, 4, 4, 5, 5, 7, 9. There are 8 numbers and they add up to 40, so the mean is 5. The distances from the mean are −3, −1, −1, −1, 0, 0, 2 and 4. Squared, they are 9, 1, 1, 1, 0, 0, 4 and 16, and these add up to 32. That is the sum of squares.

VersionVarianceStandard deviation
Population (divide by 8)32 / 8 = 42
Sample (divide by 7)32 / 7 = 4.57142.1381

The standard error of the mean is the sample standard deviation divided by the square root of n: 2.1381 / √8 = 0.7559. The coefficient of variation is the standard deviation divided by the mean, 2.1381 / 5 = 42.76%, which lets you compare spread between lists with different units or sizes. It is not defined when the mean is 0.

z-scores

A z-score says how many standard deviations a value is from the mean: z = (value − mean) / standard deviation. In the example above the value 9 has a z-score of (9 − 5) / 2.1381 = 1.87 using the sample standard deviation, so it sits about 1.9 standard deviations above the mean. A value equal to the mean has a z-score of 0, and a negative z-score means the value is below the mean. The z-scores use whichever version you chose.

The confidence interval for the mean

A confidence interval gives a range for the true mean of the group that your sample came from. It is the mean plus and minus a margin, and the margin is t times the standard error. The t value comes from Student's t distribution with n − 1 degrees of freedom. The page finds it by inverting that distribution in your browser, so any level and any size of list works. For the example, with 7 degrees of freedom and a 95% level, t is 2.3646, the margin is 2.3646 × 0.7559 = 1.7875, and the interval is 3.2125 to 6.7875. The method assumes your numbers are a random sample from a group that is roughly normal. With a few numbers, treat it as a rough guide.

Common problems

  • One number only: a sample needs at least two, so the page asks for more. The population version of a single number is 0.
  • Spreadsheet differences: the sample version matches Excel's STDEV.S, which uses n − 1, and the population version matches STDEV.P. See Microsoft's STDEV.S page, checked 18 Oct 2026.
  • A number is missing from the count: it may contain a letter or symbol. The page lists anything it skipped.
  • A comma splits numbers here, so type 1200, not 1,200, and use a decimal point, not a decimal comma.

For the mean, median and mode of the same list, use the average calculator. For the square roots and powers by hand, try the scientific calculator.

Questions

Good to know.

How do you calculate standard deviation?

Find the mean, subtract it from each value, square those distances, add them up, divide by n (population) or n − 1 (sample), and take the square root.

What is the difference between sample and population standard deviation?

The sample version divides by n − 1 and the population version divides by n. Use the sample version when your numbers are only part of a bigger group.

Why divide by n − 1?

A sample sits closer to its own mean than to the true mean of the group, which makes the spread look too small. Dividing by n − 1 corrects for that.

What is a good standard deviation?

There is no good or bad value on its own. It is in the same units as your numbers, so compare it with the mean, or use the coefficient of variation.

What is a z-score?

The number of standard deviations a value is above or below the mean. A z-score of 2 means two standard deviations above the mean.

What is variance?

The standard deviation squared. It is the sum of squares divided by n or n − 1. It is shown in the cards next to the standard deviation.

Does it match Excel and Google Sheets?

Yes. The sample version matches STDEV.S and the population version matches STDEV.P, apart from tiny rounding in the last digits.

Can the standard deviation be negative?

No. It is a square root, so it is 0 or more. It is 0 only when every number is the same.

Is my data sent anywhere?

No. The numbers stay in your browser. They are only remembered on your own device so the page is ready next time.