Standard Deviation Calculator

Find the standard deviation, variance and mean of a list of numbers.

Formula explained below

Type of data

Separate numbers with spaces, commas or new lines

Standard deviation

0.715891

Variance
0.5125
Mean
10.525
Count
20
Sum
210.5
Median
10.5
Minimum
9
Maximum
11.5

For 20 numbers with a mean of 10.525, the sample standard deviation is 0.7159.

Calculation breakdown

Step-by-step calculation
StepFormulaResult
Count (n)n20
SumΣx210.5
Mean210.5 ÷ 2010.525
Sum of squared deviationsΣ(x − 10.525)²9.7375
Variance9.7375 ÷ (20 − 1)0.5125
Standard deviation√0.51250.715891

How it works

Paste or type your numbers, choose sample or population, and the result updates as you type.

Mean = Σx ÷ nSample variance = Σ(x − mean)² ÷ (n − 1)Population variance = Σ(x − mean)² ÷ nStandard deviation = √variance

Worked example

The 20 values in the box above come from OpenStax, treated as a sample:

  1. Count: n = 20, sum: 210.5
  2. Mean: 210.5 ÷ 20 = 10.525
  3. Sum of squared deviations from the mean: 9.7375
  4. Sample variance: 9.7375 ÷ (20 − 1) = 0.5125
  5. Sample standard deviation: √0.5125 = 0.7159

Choosing Population instead divides by 20, giving a variance of 0.486875 and a standard deviation of 0.6978.

How the calculator avoids rounding drift

It computes the mean first and then adds up the squared distances from it, instead of using the shortcut Σx² − (Σx)²/n. The shortcut loses accuracy when the numbers are large but close together, such as 1,000,000,004 and 1,000,000,007.

Sources

Frequently asked questions

What is standard deviation?

Standard deviation measures how spread out numbers are around their mean. A small value means the numbers are close to the mean, and a large value means they are widely scattered. It is the square root of the variance.

What is the difference between sample and population standard deviation?

Population standard deviation divides the squared deviations by N and is used when your numbers are the whole group. Sample standard deviation divides by n − 1 and is used when your numbers are a sample drawn from a larger group. OpenStax explains that dividing by n − 1 gives a better estimate of the population variance.

How do you calculate standard deviation by hand?

Find the mean, subtract it from each number and square the result, add those squares, divide by n − 1 (sample) or n (population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the squares add to 32, so the population variance is 4 and the standard deviation is 2.

What is variance?

Variance is the average squared distance from the mean, which is the standard deviation squared. It is expressed in squared units, so standard deviation is usually easier to interpret because it is in the same units as your data.

Can standard deviation be negative or zero?

It cannot be negative, because it is a square root. It is zero only when every number is the same. A population of one number has a standard deviation of 0, but a sample needs at least two numbers.

How many numbers can I enter?

Up to 10,000, separated by spaces, commas, semicolons or new lines. You can paste a column straight from a spreadsheet.