Standard deviation calculator

Paste a list of numbers to get the standard deviation and variance. Choose sample (divide by n − 1) or population (divide by n); the steps and a table of deviations show how the result is built.

Separate numbers with commas, spaces, semicolons or new lines. Use a dot for decimals, 2.5.
The data is
Standard deviation2.13809
Variance
4.571429
Mean
5
Count (n)
8
Sum of squared deviations
32
Population SD (÷ n)
2

Steps

  1. Mean = 40 ÷ 8 = 5
  2. Sum of squared deviations Σ(x − mean)² = 32
  3. Sample variance = 32 ÷ (n − 1) = 32 ÷ 7 = 4.571429
  4. Standard deviation = √4.571429 = 2.13809
xx − mean(x − mean)²
2-39
4-11
4-11
4-11
500
500
724
9416

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Paste or type the numbers, separated by commas, spaces, semicolons or new lines.
  2. Choose whether the data is a sample or the whole population.
  3. Read the standard deviation, the variance and the steps. The table lists each value’s deviation from the mean (the first 20 rows).

Formulas

  • Mean: x̄ = Σx ÷ n
  • Sum of squares: SS = Σ(x − x̄)²
  • Population variance: σ² = SS ÷ n, standard deviation σ = √σ²
  • Sample variance: s² = SS ÷ (n − 1), standard deviation s = √s²

The calculator first finds the mean and then the squared deviations from it. This two-step method stays accurate even for large values that are close together, where the shortcut Σx² − n·x̄² can lose digits.

Worked example

For 2, 4, 4, 4, 5, 5, 7, 9 (n = 8):

  1. Mean = 40 ÷ 8 = 5.
  2. Deviations: −3, −1, −1, −1, 0, 0, 2, 4; their squares add up to 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32.
  3. Population: 32 ÷ 8 = 4, so σ = √4 = 2.
  4. Sample: 32 ÷ 7 ≈ 4.571429, so s ≈ 2.13809.

How to read it

  • A small standard deviation means the values sit close to the mean; a large one means they are spread out.
  • For roughly bell-shaped data, about two thirds of the values lie within one standard deviation of the mean.
  • One outlier can raise the standard deviation a lot, because deviations are squared. Check the table for a value that stands out.

Frequently asked questions

Sample or population, which one do I need?

Use population when your numbers are every member of the group you care about, for example the marks of all students in one class. Use sample when they are a part from which you want to judge a larger group, for example 50 surveyed customers. Most statistics courses and studies use the sample formula.

Why does the sample formula divide by n − 1?

The deviations are measured from the sample's own mean, which sits closer to the data than the true mean. Dividing by n − 1 instead of n (Bessel's correction) makes up for this, so the variance is not underestimated on average.

What is the difference between variance and standard deviation?

The variance is the mean of the squared deviations, in squared units. The standard deviation is its square root, so it is in the same units as the data and easier to read.

Which spreadsheet functions give the same result?

STDEV.S (or STDEV) matches the sample standard deviation and STDEV.P (or STDEVP) the population one. VAR.S and VAR.P give the variances.

More in Math

All tools in this category: Math ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.