FreeToGenerate.com

Runs entirely in your browser — your numbers are never uploaded.

Try

One per line, or separated by commas, spaces or tabs — a column pasted from a spreadsheet works as it is.

Both standard deviations

Sample (÷ n−1)

8.715248451

Variance 75.95555556

Use this when your numbers are a sample of something larger — the usual case.

Population (÷ n)

8.268010643

Variance 68.36

Use this when your numbers are the whole group you care about.

The two always differ by exactly the square root of n over n−1. That is not a rounding difference; it is the definition. ×1.054092553

Count
10
Sum
812
Mean
81.2
Median
81
Minimum
68
Maximum
95
Range
27
Spread ÷ mean
0.1018227912

Quartiles, all three ways

Q1MedianQ3IQR
Exclusive73.58188.7515.25
Inclusive74.758187.2512.5
Tukey hinges74818814

On this data the three methods disagree — which is the point.

There is no single definition of a quartile. These are the three in common use, and they are all standard — so a calculator that shows one number is hiding a choice it made for you.

Would the textbook formula have got this right?

Yes. On your numbers the one-pass sum-of-squares formula agrees with the stable one to the last digit a computer can represent.

This tool computes the deviation with Welford's algorithm, which never subtracts two large nearly-equal numbers. The line above says what the formula printed in most textbooks would have produced from the same data.

Also available in: Español · Português · Français · العربية

Standard Deviation Calculator

Paste a column of numbers and see both standard deviations, all three quartile conventions, and whether the formula in your textbook would have got the right answer on your data.

What is a standard deviation calculator?

A standard deviation calculator takes a set of numbers and tells you how spread out they are. The mean says where the numbers sit; the standard deviation says how far a typical one strays from that centre. Two classes with the same average mark can be completely different places to teach — one where everyone scored between 68 and 76, and one where half the room scored 40 and half scored 100 — and the standard deviation is the single number that separates them.

This calculator differs from most in that it refuses to make two choices on your behalf. It shows the sample and the population deviation side by side rather than picking one silently, and it shows all three quartile conventions rather than the one its author happened to learn. Both are places where perfectly standard methods give different answers, and hiding the choice does not make it go away — it just moves the disagreement to the moment your figure fails to match someone else's.

It also does something no other calculator we know of does: it tells you whether the answer you would have got from the formula printed in most textbooks agrees with the one shown. On ordinary data it does, to the last digit a computer can hold. On some perfectly plausible data it does not, and on a little of it the textbook formula returns nothing at all.

How to use the calculator

  1. Paste your numbers. One per line, or separated by commas, spaces or tabs. A column copied straight out of a spreadsheet works as it is, and anything that is not a number is skipped and counted rather than quietly treated as zero.
  2. Read the deviation that matches your question. If your numbers are a sample of something larger — the usual case — take the sample figure. If they are the entire group you care about, take the population one. Both are shown, along with the exact factor between them.
  3. Check the precision line at the bottom. It says whether the textbook sum-of-squares formula would have produced the same answer on your particular numbers, and shows both figures when it would not.

Sample or population: the ÷n−1 that everyone argues about

The two standard deviations differ only in what they divide by. The population version divides the summed squared deviations by n, and is right when your numbers are the whole group — every employee in the company, every day in the month. The sample version divides by n−1, and is right when your numbers are a sample drawn from something bigger that you are trying to describe.

The correction exists because a sample's own mean sits, by construction, closer to the sample than the true mean does, so measuring spread around it understates the real spread. Dividing by n−1 rather than n compensates. This is Bessel's correction, and it is not a rounding detail: the two answers differ by exactly the square root of n divided by n−1, which is 6.9% at eight values and 1.0% at fifty. A calculator that shows one number without saying which is 6.9% wrong for whoever wanted the other, and gives them no way of knowing.

When in doubt, use the sample deviation. Almost every real measurement is a sample of something you cannot measure in full, and every statistics package defaults to it for that reason.

Three quartile conventions, three different answers

There is no single definition of a quartile, and there are three in common use rather than the two usually mentioned. The exclusive method places the lower quartile at position (n+1)÷4 in the sorted data; the inclusive method places it at (n−1)÷4 + 1; and Tukey's hinges — the median of each half, which is what most school textbooks teach — is a third answer distinct from both.

On the eight values 2, 4, 4, 4, 5, 5, 7, 9 the upper quartile is 6.5, 5.5 and 6.0 by the three methods respectively. All three are correct. Try that set with the sample button above and watch the three rows disagree.

The disagreement is easy to miss because hinges coincide with the exclusive method whenever the count is odd, so half of all datasets hide it. It is also easy to miss because the software you use has already chosen for you: spreadsheets ship both of the first two under different function names, statistical languages default to a fourth or fifth variant, and none of them warn you. If your interquartile range does not match a colleague's, this is usually why — and the second sample button loads exactly that case so you can see all three at once.

Would the textbook formula have got this right?

Most textbooks give a one-pass formula for the variance: add up the squares, subtract the square of the sum divided by n, divide by n−1. It is algebraically identical to the definition and it is what almost every calculator implements, because it needs only one pass and two running totals.

It is also unstable. It works by subtracting two large numbers that are nearly equal, and when they are nearly equal enough the difference is mostly the error in the two of them. We measured this rather than assuming it, because the fear of floating point is usually overstated: on exam scores, prices, heights and salaries the textbook formula agrees with the stable one to about one part in a quadrillion, which is nothing at all. On the sensor readings in the third sample above — six values hovering around 1,000,000 and varying by a few hundredths — it is off by 4.5%. On six Unix timestamps spread across a day it is off by two parts in a hundred million; slide the same six readings together so they span ninety seconds instead and the error becomes 6.7% — three million times worse, from numbers that are no larger, only more tightly clustered. On the three values 1,000,000,000 / 1,000,000,001 / 1,000,000,002 it returns exactly zero for data that plainly varies, and on 100,000,000 / 100,000,000.0001 / 100,000,000.0002 it returns nothing — the square root of a negative number.

The thing that decides this is not how big your numbers are but how far they sit from zero relative to how much they vary. Holding that ratio fixed and sweeping the magnitude across eight orders leaves the error unchanged; holding the spread fixed and sliding the numbers away from zero drives it from invisible to fatal. So the useful warning is not 'beware large numbers' but 'beware numbers clustered far from zero' — a thermometer logging 1000.1, 1000.2, 1000.3 already carries only seven significant digits of real signal.

This calculator uses Welford's algorithm, which updates a running mean and never forms that difference, and it prints what the textbook formula would have said on your data. That way 'your numbers are fine' is a measurement of your numbers rather than a general reassurance about somebody else's.

One thing to know about pasting

A comma is read as a separator here, not as a thousands mark. So 1,000 is read as two numbers — one and zero — rather than as one thousand. This is a deliberate trade-off rather than an oversight: the input is a list, where comma separation is by far the commonest convention, and the alternative would silently turn a European decimal comma into a number a thousand times too large. Strip your thousands separators before pasting, or paste from a spreadsheet column, which will not have any.

Underscores are ignored, so 1_000_000 works. Anything else that is not a number is skipped and the count of skipped tokens is shown, so a stray header row or a units column never quietly becomes a zero and drags your mean down.

Why is it free?

Every calculation on this page happens in your browser. Your numbers are not uploaded, not logged and not stored anywhere — closing the tab is all the deletion there is. That means the page costs us nothing per visitor beyond hosting a few kilobytes of JavaScript, so there is nothing to charge for.

No account, no sign-up, no limit on how much data you paste, and no watermark on anything you copy out.