Menu

Standard Deviation Calculator

The deviation table row by row - the part you are actually marked on.

By Nethanel Bar, Co-founder & CEO

Last updated

Want to solve these without the calculator?

The Coddy math course teaches the method itself - you work each step on an interactive board and get told exactly where a move went wrong.

A standard deviation is an average distance from the mean

Take a list of numbers and its mean. Every value sits some distance from that mean, and the standard deviation is roughly the typical size of those distances. It cannot be their plain average, because the distances above and below the mean always cancel exactly to zero - so each one is squared first, the squares are averaged, and the square root at the end undoes the squaring so the answer is back in the original units.

That is the whole formula, and the part you are actually marked on is the middle: the table of every value minus the mean, and every one of those differences squared. This page prints that table in full, with the total that both variances divide. Competing calculators print sigma and stop, which is the one part a student could have worked out with a phone.

There are two divisors and the difference matters. Divide the total by n when your numbers ARE the whole group - the population. Divide by n − 1 when they are a sample standing in for something bigger, because a sample's own mean sits slightly too close to its own values and dividing by one less compensates. Both are shown here, always, so the divisor is a choice you make rather than one a page makes for you.

What to notice

  • The deviations always sum to zero. That is not a coincidence - it is what the mean IS, and it is why squaring is needed before averaging.
  • Variance is the answer before the square root, and its units are squared: pounds become square pounds, which is why the root is taken to get back to pounds.
  • The population divisor is n and the sample divisor is n − 1. The sample answer is always the larger of the two, and the gap shrinks as the list grows.
  • Standard deviation is never negative, and it is zero only when every value is identical - there is no spread to measure.
  • It carries the same units as the data, unlike variance. That is the practical reason it is the number usually quoted.
  • A single outlier moves it a lot, because the distance is squared before being counted. That sensitivity is a feature when you want to notice outliers and a nuisance when you do not.

How to find a standard deviation by hand

  1. Find the mean

    Add every value and divide by how many there are. Keep it exact - if the mean is 7/3, do not write 2.33, because that error is about to be squared.

  2. Subtract the mean from every value

    These are the deviations. Some are negative, and that is fine; as a check, they should add up to exactly zero.

  3. Square each deviation

    Squaring removes the signs and weights the big distances more heavily. Add the squares up: that total is the sum of squares.

  4. Divide by n, or by n − 1

    By n if these values are the entire group you care about; by n − 1 if they are a sample from something larger. The result is the variance.

  5. Take the square root

    That is the standard deviation. It is in the same units as your original data, which the variance was not.

Population against sample, on the same lists

The same numbers under both divisors. Notice how the gap between the two answers narrows as the list gets longer.

ValuesMeanSum of squaresσ (population)s (sample)
2, 4, 4, 4, 5, 5, 7, 953222.138
1, 2, 3, 42.551.1181.291
10, 12, 23, 23, 16, 23, 21, 16182105.1235.477
3, 3, 33000
1, 2, 47/314/31.1061.528
5, 15105057.071
2, 4, 6, 8, 106402.8283.162
100, 100, 100, 200125750043.30150

Worked examples

The textbook list: 2, 4, 4, 4, 5, 5, 7, 9

plain
2, 4, 4, 4, 5, 5, 7, 9

The eight values total 40, so the mean is 5. The deviations are −3, −1, −1, −1, 0, 0, 2, 4 (summing to zero, as they must), and their squares total 32. Divided by n = 8 that is a variance of 4, and the square root is exactly 2. As a sample it would be 32/7, giving about 2.138.

Why the sample divisor is bigger: 1, 2, 3, 4

plain
1, 2, 3, 4

The mean is 2.5 and the sum of squares is 5. Divided by 4 the variance is 5/4 and the standard deviation is √5/2 ≈ 1.118; divided by 3 it is 5/3 and about 1.291. The sample answer is always larger, because a sample's own mean hugs its own values a little too closely.

An exact answer that is not a decimal: 1, 2, 4

plain
1, 2, 4

The mean is 7/3, not 2.33. The deviations are −4/3, −1/3 and 5/3, and their squares are 16/9, 1/9 and 25/9, totalling 14/3. Rounding the mean first would have thrown away a digit before the squaring even began - which is why every row of the table here is a fraction.

No spread at all: 3, 3, 3

plain
3, 3, 3

Every deviation is zero, so the sum of squares is zero and so is the standard deviation. That is the only way a standard deviation can be zero: not "the numbers are small" but "every value is the same".

What an outlier does: 100, 100, 100, 200

plain
100, 100, 100, 200

Three values agree exactly and one does not, and the standard deviation is about 43 - larger than a quarter of the whole range. Squaring the distances is what gives that single far value so much weight, which is exactly why the measure is good at flagging outliers.

Common mistakes

  • Averaging the deviations without squaring. They add up to zero for every list ever written, so the answer would always be zero.
  • Rounding the mean before subtracting. If the mean is 7/3, working with 2.33 corrupts every square that follows - keep it exact until the end.
  • Dividing by the wrong count. n is for a whole population and n − 1 for a sample; using n on sample data understates the spread every time.
  • Reporting the variance as the standard deviation. The variance is the step before the root, and its units are squared - one is not a rounder version of the other.
  • Forgetting the root altogether. If your answer looks far too big for the data, this is usually why.
  • Treating a negative deviation as an error. Half of them should be negative; if none are, the mean has been calculated wrongly.

Standard deviation FAQ

What is the difference between population and sample standard deviation?
The divisor. A population standard deviation divides the sum of squares by n, because the values are the whole group. A sample divides by n − 1, because a sample's mean sits slightly too close to its own values and dividing by one less compensates for that. The sample answer is always the larger of the two.
Which one should I use?
If your numbers are everything you care about - the marks of the whole class, the heights of all six children - use the population formula. If they are a sample chosen to represent something bigger, use n − 1. Most statistics coursework asks for the sample version, and most exam questions say which they want.
How do I calculate standard deviation by hand?
Find the mean, subtract it from every value, square each of those differences, add the squares, divide by n (or n − 1), and take the square root. This page prints that whole table so you can compare each row with your own working, not just the final number.
Why do we square the deviations?
Because they always add to exactly zero otherwise - the positive and negative distances cancel by the definition of the mean. Squaring removes the signs, and it also gives the big distances more weight, which is why one far outlier moves a standard deviation so much.
What is the difference between variance and standard deviation?
The variance is the average of the squared deviations; the standard deviation is its square root. The variance's units are squared - square pounds, square centimetres - which is hard to interpret, so the root is taken to put the answer back in the units of the data.
Can a standard deviation be negative or zero?
Never negative: it is a square root of an average of squares. Zero only when every value is identical, since that is the one case with no distance from the mean to measure. If you get a negative number, a sign was dropped somewhere in the table.
What does the standard deviation actually tell me?
Roughly how far a typical value sits from the mean. For data with a bell-shaped distribution, about two thirds of the values lie within one standard deviation of the mean and about 95% within two - which is what makes it the standard yardstick for "is this value unusual?"
Why does this page show fractions instead of decimals?
Because they are the exact answers. The mean of 1, 2 and 4 is 7/3, and every square built on 2.33 instead is slightly wrong. The decimal is offered beside the exact value rather than instead of it, and it is labelled as an approximation whenever the root is irrational.

More math tools

Coddy programming languages illustration

Learn math with Coddy

GET STARTED