Standard Deviation Calculator

By Ahsan Khan · Last reviewed · How we check our numbers

Quick answer

Standard deviation measures how spread out numbers are around their mean: find the mean, average the squared distances from it, and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5 and the population standard deviation is 2; as a sample it is about 2.138.

Standard deviation

2.13809

Variance4.571429
Mean5
Count (n)8
Sum40
Show the working
  1. Mean = sum ÷ n = 40 ÷ 8 = 5.
  2. Squared deviations: (2 − 5)² = 9; (4 − 5)² = 1; (4 − 5)² = 1; (4 − 5)² = 1; (5 − 5)² = 0; (5 − 5)² = 0; (7 − 5)² = 4; (9 − 5)² = 16.
  3. Sum of squared deviations = 32.
  4. Variance = 32 ÷ (n − 1) = 7 = 4.5714.
  5. Standard deviation = √4.5714 = 2.1381.

Free, with no sign-up and nothing to unlock. Nothing you type leaves your browser.

Separate with commas, spaces or new lines. Up to 5,000 values.

What your result means

A small standard deviation means your values sit close to the mean; a large one means they are spread out. Use the sample version (dividing by n − 1) when your numbers are a subset of a larger group, which is the usual case for homework, surveys and experiments, and the population version (dividing by n) only when you have every value there is.

How to use the Standard Deviation Calculator

  1. Paste or type your numbers, separated by commas, spaces or new lines.
  2. Choose sample or population.
  3. Read the standard deviation, variance, mean, count and sum.
  4. Open "Show the working" to see every step, ready to copy into your notes.

Formula and worked example

mean (x̄)               = Σx ÷ npopulation SD (σ)      = √( Σ(x − x̄)² ÷ n )sample SD (s)          = √( Σ(x − x̄)² ÷ (n − 1) )     ← Bessel’s correctionvariance               = SD²

Worked example: 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5 and the squared deviations add up to 32. As a population, variance = 32 ÷ 8 = 4 and σ = 2. As a sample, variance = 32 ÷ 7 = 4.5714 and s = 2.1381.

Sample vs population standard deviation

DataMeanPopulation σSample s
1, 2, 3, 4, 531.41421.5811
10, 10, 10, 101000
2, 4, 4, 4, 5, 5, 7, 9522.1381
1, 10050.549.570.0036

Computed by the calculator above.

Assumptions and limits

  • Use "sample" when your numbers are a subset of a bigger group (most homework and survey data); use "population" when you have every value.
  • The calculator uses a two-pass method (mean first, then squared deviations), which avoids the rounding errors of the shortcut formula on large numbers.

Frequently asked questions

What is the difference between sample and population standard deviation?

The population formula divides the sum of squared deviations by n, the number of values. The sample formula divides by n − 1, which corrects the tendency of a sample to underestimate the spread of the whole group. With large data sets the two get very close.

How do you calculate standard deviation by hand?

Find the mean, subtract it from each value and square the results, add the squares, divide by n (population) or n − 1 (sample) to get the variance, then take the square root. The working panel shows each of these steps for your data.

What is variance?

Variance is the average of the squared deviations from the mean, which is the standard deviation squared. It is in squared units (for example dollars squared), which is why the standard deviation is usually easier to interpret.

Can standard deviation be zero?

Yes, when every value is the same, because nothing differs from the mean. Standard deviation can never be negative.

How many numbers can I enter?

Up to 5,000 values, separated by commas, spaces, semicolons or new lines. Each value can be negative or a decimal.

More free calculators

About this calculator

Ahsan Khan
Last reviewed

Written and maintained by Ahsan Khan. See how every number is calculated, and the test cases checked on every update, on the methodology page.

Sources

Found an error? Email a correction and include the link from “Copy link” so we can reproduce it.