Standard deviation calculator

This standard deviation calculator finds the sample and population standard deviation of a list of numbers, along with the variance, mean and sum of squares. It shows the formula with your numbers and a table of every deviation.

  • Paste numbers separated by commas, spaces or new lines
  • Sample (n − 1) and population (N) side by side
  • Step-by-step working with a deviation table

Last updated

Find the standard deviation

Your data is a
Sample standard deviation (s) 2.1381 x̄ = 40 ÷ 8 = 5
Σ(x − x̄)² = 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32
s² = 32 ÷ (8 − 1) = 4.5714
s = √4.5714 = 2.1381
Count (n)
8
Mean (x̄)
5
Sum
40
Sum of squares
32
Sample SD (s)
2.1381
Sample variance (s²)
4.5714
Population SD (σ)
2
Population variance (σ²)
4
Show the deviation for every value

How to use the standard deviation calculator

  1. Type or paste your numbers. Separate them with commas, spaces or line breaks; a column copied from a spreadsheet works.
  2. Choose sample if your numbers are a sample from a larger group, or population if they are every member of the group.
  3. Read the standard deviation. The working underneath shows the mean, the sum of squares, the variance and the square root.
  4. Open “Show the deviation for every value” to check each line of a hand calculation.

The standard deviation formula

Standard deviation measures how spread out numbers are around their mean. It is the square root of the variance, which is the average squared distance from the mean.

sample: s = √( Σ(x − x̄)² ÷ (n − 1) )    population: σ = √( Σ(x − μ)² ÷ N )

Σ(x − x̄)² is the sum of squares: subtract the mean from each value, square the result, and add them up. The sample formula divides by n − 1 instead of n (Bessel’s correction), because a sample’s own mean sits closer to its values than the true population mean does, and dividing by n would understate the spread.

Worked example

Find the standard deviation of 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 the mean: −3, −1, −1, −1, 0, 0, 2, 4.
  3. Squared: 9, 1, 1, 1, 0, 0, 4, 16. Sum of squares = 32.
  4. Sample variance: 32 ÷ (8 − 1) = 4.5714. Sample standard deviation: √4.5714 = 2.1381.
  5. Population variance: 32 ÷ 8 = 4. Population standard deviation: √4 = 2.

Sample or population?

Use the population formula only when your data includes every member of the group you care about, such as the test scores of every student in one class when you only care about that class. Use the sample formula when your numbers are a subset used to describe a bigger group, such as 50 surveyed customers out of thousands. In homework and lab reports, sample is the usual default.

SamplePopulation
Symbolsσ (sigma)
Mean symbolx̄μ (mu)
Divide byn − 1N
Excel / SheetsSTDEV.SSTDEV.P

Common questions

How do you calculate standard deviation?

Find the mean, subtract it from each value, square the results, add them up, divide by n − 1 (sample) or N (population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 that gives s = √(32 ÷ 7) = 2.14.

What is the difference between sample and population standard deviation?

Population standard deviation divides the sum of squares by N; sample standard deviation divides by n − 1. The sample value is always a little larger: 2.14 versus 2.00 for the eight numbers above.

What is the relationship between variance and standard deviation?

Standard deviation is the square root of variance. A variance of 4.5714 gives a standard deviation of 2.1381. Standard deviation is in the same units as the data; variance is in squared units.

What does a standard deviation tell you?

How far values typically sit from the mean. For data that follows a normal (bell-shaped) distribution, about 68% of values fall within one standard deviation of the mean and about 95% within two.

How do I calculate standard deviation in Excel?

Use =STDEV.S(A1:A8) for a sample or =STDEV.P(A1:A8) for a population.

Can standard deviation be negative or zero?

It can never be negative, because it is a square root of squared distances. It is zero only when every value is the same.

Sources

See the methodology page for how Studyfigure builds and checks its calculators.