Standard Deviation Calculator

Enter a data set to find its standard deviation and variance, with every step shown in a table. For example, 2, 4, 4, 4, 5, 5, 7, 9 has a sample standard deviation of s = 2.13809 and a population standard deviation of σ = 2.

  • Free
  • No sign-up
  • Shows the working
  • Works on phones

Separate values with commas, spaces or new lines. Decimals and negatives are fine. Write 1200, not 1,200. Up to 10,000 values.

Data type

Sample: your data is part of a bigger group (most class surveys and experiments).

Sample standard deviation
s = 2.13809
Standard deviation (s)
2.13809
Variance (s²)
4.571429
Mean (x̄)
5
Count (n)
8
Sum (Σx)
40
Sum of squares Σ(x − x̄)²
32
Population SD (σ)
2

Step by step

  1. Find the mean: x̄ = 40 ÷ 8 = 5
  2. Subtract the mean from each value to get x − x̄ (see the table).
  3. Square each difference to get (x − x̄)².
  4. Add the squares: Σ(x − x̄)² = 32
  5. Divide by n − 1 (sample) to get the variance: s² = 32 ÷ (8 − 1) = 32 ÷ 7 = 4.571429
  6. Take the square root: s = √4.571429 = 2.13809
Deviations from the mean (x̄ = 5)
#xx − x̄(x − x̄)²
12-39
24-11
34-11
44-11
5500
6500
7724
89416
Σ = 40032

Values in the table are rounded to 6 decimal places for display. The totals use full precision.

How to calculate standard deviation

  1. Find the mean: add the values and divide by how many there are.
  2. Subtract the mean from each value, then square each result.
  3. Add up the squares to get the sum of squares, Σ(x − mean)².
  4. Divide by n − 1 for a sample or N for a population. This is the variance.
  5. Take the square root of the variance to get the standard deviation.

What is standard deviation?

Standard deviation measures how spread out numbers are from their mean. A small standard deviation means the values sit close to the mean, and a large one means they are spread out. It is in the same units as the data, so if heights are in centimeters, the standard deviation is in centimeters too. Variance is the standard deviation squared.

Sample or population: which should you use?

Use the population formula when your data includes every member of the group you care about, such as the test scores of everyone in one class when you only want to describe that class. Use the sample formula when your data is a sample from a bigger group and you want to estimate the spread of that bigger group, such as surveying 30 students to learn about the whole school. If you are not sure, the sample formula is the usual choice in science and statistics classes.

Population standard deviation (σ, sigma):

σ = √( Σ(x − μ)² / N )

Sample standard deviation (s):

s = √( Σ(x − x̄)² / (n − 1) )

Here x is each value, μ or x̄ is the mean, N or n is the number of values, and Σ means "add them all up". The variance is the same formula without the square root.

How do you calculate standard deviation by hand?

Here is a worked example for the data set 6, 8, 10, 12, 14.

  1. Find the mean: (6 + 8 + 10 + 12 + 14) ÷ 5 = 50 ÷ 5 = 10.
  2. Subtract the mean from each value and square the result:
xx − 10(x − 10)²
6-416
8-24
1000
1224
14416
Sum040
  1. Add the squares: the sum of squares is 40.
  2. Divide. As a sample: 40 ÷ (5 − 1) = 10 (sample variance). As a population: 40 ÷ 5 = 8 (population variance).
  3. Take the square root: s = √10 ≈ 3.162278 and σ = √8 ≈ 2.828427.

Notice that the differences in the middle column always add up to 0. That is a handy way to check your mean before you go on.

Common mistakes

  • Forgetting to square the differences. Without squaring, the positive and negative differences cancel out to 0.
  • Forgetting the square root. If you stop after dividing, you have the variance, not the standard deviation.
  • Using the wrong divisor. Divide by n − 1 for a sample and N for a population. Calculators label these s (or Sx) and σ (or σx).
  • Rounding the mean too early. Keep full precision until the last step, or your answer can drift.

Need the mean, median, mode, quartiles and a box plot as well? Use the statistics calculator, which works out all of them from the same data.

Frequently asked questions

How do you calculate standard deviation?

Find the mean, subtract it from each value, square each difference, add the squares, divide by n − 1 (sample) or N (population), then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9, the sample standard deviation is 2.13809 and the population standard deviation is 2.

What is the difference between sample and population standard deviation?

Population standard deviation (σ) divides by N and is used when you have data for every member of the group. Sample standard deviation (s) divides by n − 1 and is used when your data is a sample from a bigger group. The sample version is always a little larger, and the gap shrinks as n grows.

Why do you divide by n − 1 for a sample?

A sample's values tend to sit closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1 (called Bessel's correction) fixes this on average and gives an unbiased estimate of the population variance.

What is the difference between variance and standard deviation?

Standard deviation is the square root of the variance. Variance is measured in squared units (such as cm²), while standard deviation is in the same units as the data, which makes it easier to interpret. If the variance is 25, the standard deviation is 5.

Can standard deviation be zero or negative?

Standard deviation can be zero but never negative. It is zero only when every value is the same, such as 7, 7, 7, 7, because no value is any distance from the mean. It cannot be negative because it is the square root of a sum of squares.

What does a large standard deviation mean?

A large standard deviation means the values are spread far from the mean, and a small one means they are bunched close to it. Compare it with the mean: for test scores with a mean of 75, a standard deviation of 3 means most scores are close together, while 15 means they vary a lot.

Last reviewed November 27, 2026 by the ChalkStation team.