Skip to content
FiftyCalc Free calculators for all 50 states

How Do You Calculate Standard Deviation?

To calculate the sample standard deviation, find the mean of the data, add up the squared distance of each value from the mean, divide that sum by the number of values minus 1, and take the square root. This is the definition in the NIST/SEMATECH e-Handbook of Statistical Methods of the National Institute of Standards and Technology (NIST), where the variance is the sum divided by N − 1 and the standard deviation is the square root of the variance. For the values 4, 8, 6 and 2, the mean is 5 and the calculator shows a standard deviation of 2.582, rounded.

Open the Standard Deviation Calculator

How it is calculated

Paste or type the numbers in the calculator, separated by commas, spaces or new lines. The calculator first takes the mean, the sum of the values divided by their count.

It then squares the distance of each value from the mean, since NIST describes the variance as roughly the arithmetic average of the squared distance from the mean. Squaring gives more weight to values far from the mean: in NIST's words, a point 2 units from the mean adds 4 to the above sum while a point 10 units from the mean adds 100 to the sum. For the sample variance, the sum of the squared distances is divided by N − 1, the number of values minus 1.

The standard deviation is the square root of the variance, and NIST notes that it restores the units of the spread to the original data units. For the values 4, 8, 6 and 2, the calculator also shows a population standard deviation of 2.2361, besides the sample standard deviation of 2.582.

Worked example

Assumptions: the values 4, 8, 6 and 2, treated as a sample. Their mean is (4 + 8 + 6 + 2) ÷ 4 = 5, and their distances from the mean are −1, 3, 1 and −3. The squared distances add up to 1 + 9 + 1 + 9 = 20, and 20 divided by 4 − 1 = 3 gives the sample variance the calculator shows, 6.6667, rounded. The calculator shows a sample standard deviation of 2.582, the square root of the sample variance shown as 6.6667, rounded, and a population standard deviation of 2.2361.

Numbers (separated by commas, spaces or new lines)4, 8, 6, 2
Sample standard deviation (s)2.582
Population standard deviation (σ)2.2361
Sample variance6.6667
Mean5
Count4

Figures computed by this site's calculator from the inputs above. Run your own numbers: Standard Deviation Calculator

Frequently asked questions

What is the difference between variance and standard deviation?

NIST defines the standard deviation as the square root of the variance, which restores the units of the spread to the original data units.

Which variance formula does NIST use?

The NIST definition of the variance divides the sum of squared distances by N − 1, and the calculator labels the result the sample standard deviation.

Sources

General information drawn from the official sources above, not tax or legal advice. Amounts change from year to year: check the source for your tax year.

Related

See all Statistics & Probability Calculators