Skip to content

Standard Deviation Calculator with Steps

Paste or type your numbers to get both the sample and the population standard deviation, the variance, mean, count, sum and range, plus a table showing each value's deviation and squared deviation.

Runs in your browserFree, no sign-upLast reviewed

Settings

Decimals and negative numbers are fine. Do not use thousands separators.

Both results are always shown; this picks the one worked through in the steps.

Results update automatically as you type.

Standard deviation

Sample standard deviation (s)
2.1381
divides by n - 1
Population standard deviation (σ)
2
divides by n
Sample variance (s²)
4.5714
Population variance (σ²)
4
Mean
5
Count (n)
8
Sum
40
Range
7
2 to 9
Sum of squared deviations
32
Standard error of the mean
0.7559
s ÷ √n

Step table

Value (x)Deviation (x - mean)Squared deviation
2-39
4-11
4-11
4-11
500
500
724
9416
Total (n = 8)032

Steps (sample)

1. Mean = sum ÷ count = 40 ÷ 8 = 5 2. Subtract the mean from each value and square the result (see the step table). 3. Sum of squared deviations = 32 4. Variance = 32 ÷ (8 - 1) = 32 ÷ 7 = 4.5714 5. Standard deviation = √4.5714 = 2.1381

Quick answers

How do you calculate standard deviation?
Find the mean, subtract it from each value, square each difference and add the squares. Divide that sum by n for a population or by n - 1 for a sample to get the variance, then take the square root. For 4, 8, 6, 5, 3: 14.8 / 4 = 3.7, and √3.7 = 1.9235.
What is the difference between sample and population standard deviation?
Only the divisor. Population standard deviation divides the sum of squared deviations by n. Sample standard deviation divides by n - 1, which makes it slightly larger. For 2, 4, 4, 4, 5, 5, 7, 9 the population figure is 2 and the sample figure is 2.1381.
Should I use sample or population standard deviation?
Use population when your list contains every member of the group you care about, such as all 30 students in one class. Use sample when the list is a subset used to estimate a larger group, such as 30 students standing in for a whole school. When unsure, sample is the usual default.
What is the standard deviation of 10, 12, 23, 23, 16, 23, 21, 16?
The sample standard deviation is 5.237229 and the population standard deviation is 4.898979. The mean is 18 and the squared deviations sum to 192, giving variances of 192 / 7 = 27.428571 and 192 / 8 = 24.
Is variance the same as standard deviation?
No. Variance is the average squared deviation, and standard deviation is its square root. Standard deviation is in the same units as the data, which makes it easier to interpret. A variance of 4 corresponds to a standard deviation of 2.
Can standard deviation be zero or negative?
It can be zero but never negative. It is zero only when every value is identical: 7, 7, 7, 7 has a mean of 7 and a standard deviation of 0. Any spread at all gives a positive result because the deviations are squared.

What Standard Deviation Calculator does

Standard deviation measures how far a set of numbers typically sits from its mean. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared deviations add up to 32, the population standard deviation is exactly 2 and the sample standard deviation is 2.1381. Enter any list here and you get both versions side by side, so you do not have to rerun anything if you picked the wrong one. The page also returns both variances, the mean, count, sum, range, sum of squared deviations and standard error of the mean, a row-by-row step table, and the working written out in five lines you can copy.

Standard deviation formulas for a sample and a population

Sample: s = √( Σ(x - x̄)² / (n - 1) ) Population: σ = √( Σ(x - μ)² / N )

x is each value, x̄ or μ is the mean, and n or N is the count. Σ(x - mean)² is the sum of squared deviations, shown in the results under that name. The expression inside the square root is the variance: s² for a sample and σ² for a population. Dividing by n - 1 instead of n is called Bessel's correction. A sample's values sit closer to their own mean than to the true mean of the larger group, so dividing by n would underestimate the spread; n - 1 compensates. The standard error of the mean, also reported, is s / √n.

Step table for 2, 4, 4, 4, 5, 5, 7, 9

This is the table the page produces for its starting data. The mean is 40 / 8 = 5. Each deviation is the value minus 5, and the last column squares it.

Value (x)Deviation (x - mean)Squared deviation
2-39
4-11
4-11
4-11
500
500
724
9416
Total (n = 8)032

Population: 32 / 8 = 4, and √4 = 2. Sample: 32 / 7 = 4.5714, and √4.5714 = 2.1381. The deviations always total 0, which is a quick check on the mean.

Worked examples with sample and population results

All results below are at 4 decimal places unless stated.

Seven test scores

72, 85, 90, 66, 78, 95, 88

Sample standard deviation 10.4083, population 9.6362, mean 82, sum 574, range 29 (66 to 95), sum of squared deviations 650

Sample variance is 650 / 6 = 108.3333 and population variance is 650 / 7 = 92.8571. The standard error of the mean is 3.934.

Five values as a whole population, 2 decimal places

600, 470, 170, 430, 300

Population standard deviation 147.32, variance 21,704, mean 394. The sample version is 164.71 with variance 27,130.

Decimals

98.6 99.1 97.9 98.4 100.2 98.8

Sample standard deviation 0.7815, population 0.7134, mean 98.8333, range 2.3

Negative numbers centered on zero

-3, -1.5, 0, 1.5, 3

Sample standard deviation 2.3717, population 2.1213, mean 0, sum of squared deviations 22.5

Large values close together

1000000 1000001 1000002

Sample standard deviation 1, population 0.8165, mean 1,000,001

Adding a constant to every value shifts the mean but leaves the standard deviation unchanged: 0, 1, 2 gives the same spread.

A single value

5

Population standard deviation 0. The sample standard deviation is shown as a dash with a note, because dividing by n - 1 would be dividing by zero.

Sample vs population: which divisor to use

SamplePopulation
Use it whenThe data is a subset used to estimate a larger groupThe data is every member of the group
Divide the sum of squares byn - 1n
Symbols (variance s²)σ (variance σ²)
Spreadsheet functionSTDEV.SSTDEV.P
Result for 2, 4, 4, 4, 5, 5, 7, 92.13812
Result for 4, 8, 6, 5, 31.92351.7205
Minimum number of values21

The gap between the two shrinks as the count grows, since n - 1 and n become nearly the same.

Reading the result

A standard deviation is in the same units as your data, so it reads directly against the mean. Test scores with a mean of 82 and a sample standard deviation of 10.4083 are spread widely; the lowest score, 66, is about one and a half standard deviations below the mean. Body temperatures with a mean of 98.8333 and a standard deviation of 0.7815 are tightly clustered.

For data that follows a normal, bell-shaped distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. That rule of thumb does not hold for skewed data or small lists, and this page does not test whether your data is normal.

Because deviations are squared, one extreme value has a large effect. In the eight-number example, the single 9 contributes 16 of the 32 squared units. If one outlier is driving the result, the range and the step table make that easy to see.

Input rules and limits

  • Commas, spaces, semicolons and line breaks all separate values, so do not use thousands separators. 1,200 is read as two numbers, 1 and 200.
  • Use a period for the decimal point. 3,5 is read as 3 and 5.
  • Anything that is not a number, such as a unit or a stray letter, stops the calculation with a message naming it.
  • Scientific notation such as 1.5e3 is accepted.
  • The step table lists the first 200 values. Longer lists are still calculated in full, and the Total row covers every value.
  • Grouped data and frequency tables are not supported. Repeat each value as many times as it occurs.
  • Median, mode and quartiles are not shown here. The average calculator covers median and mode.

Step by step

  1. 1

    Type or paste your data into Numbers, separated by commas, spaces, semicolons or new lines.

  2. 2

    Set Data is a to Sample if the numbers are a subset of a larger group, or Population if they are the whole group. Both results appear either way; this choice decides which one the written steps follow.

  3. 3

    Pick the Decimal places to round to: 2, 4, 6 or 8.

  4. 4

    Read the results panel, then use the Step table to see each value, its deviation from the mean and the squared deviation.

  5. 5

    Copy the Steps box if you need to show your working.

Frequently asked questions

Why divide by n - 1 for a sample?
A sample's mean is calculated from the same values, so those values sit a little closer to it than to the true mean of the larger group. Dividing by n would understate the spread on average. Dividing by n - 1, known as Bessel's correction, makes the sample variance an unbiased estimate.
What does the Data is a setting change?
Only the copyable Steps box. Sample and population standard deviation and both variances are always shown in the results panel. The setting picks which divisor the five written steps use, so you can paste working that matches your assignment.
What is the sum of squared deviations?
It is the total of every value's squared distance from the mean, often written SS. It is the numerator of both variance formulas. For 72, 85, 90, 66, 78, 95, 88 it is 650.
What is the standard error of the mean?
It estimates how much a sample mean would vary from sample to sample, and equals the sample standard deviation divided by the square root of the count. For the seven test scores it is 10.4083 / √7 = 3.934.
Which result matches Excel or Google Sheets?
STDEV.S and the older STDEV match the sample figure. STDEV.P matches the population figure. VAR.S and VAR.P match the two variances in the same way.
How many decimal places should I use?
A common convention is one more decimal place than the original data, but follow your course or style guide. The page offers 2, 4, 6 or 8 places and drops trailing zeros, so an exact result such as 2 is shown as 2 rather than 2.0000.
Does the order of the numbers matter?
No. Every statistic here depends only on the values, not their order. The step table keeps the order you typed so you can check each row against your source.
Is my data uploaded anywhere?
No. The calculation runs in your browser and the numbers are not sent to a server.

Looking for something else? Browse all calculators or see every tool.