Toolstia / Standard deviation calculator

Standard deviation calculator

Paste a list of numbers and this calculator returns the standard deviation straight away, in both its sample and population versions, along with the mean, median, range, variance, standard error and coefficient of variation. It accepts values separated by spaces, commas, semicolons or new lines, so a column copied from a spreadsheet works.

For lists of up to 30 values, you can open the working and see each value, its difference from the mean and its square, which is the same table taught in statistics courses. That makes the tool useful for checking homework and for seeing how one extreme value changes the spread.

Any text that is not a number is skipped and listed so you can fix it. Results are shown to ten significant digits.

Enter at least one number.

Use the sample version when your numbers are a sample from a larger group, and the population version when they are the whole group.

How it works

  1. Enter your numbers separated by spaces, commas or new lines.
  2. Read the sample and population results.
  3. Open Show the working to see each deviation and its square.

Sample or population

Use the population standard deviation (σ) when your numbers are every value in the group you care about. Use the sample standard deviation (s) when your numbers are only a sample from a bigger group. The sample version divides by n − 1 instead of n to correct for the fact that a sample tends to underestimate the spread.

How it is worked out

Find the mean. Subtract it from each value and square the result. Add up the squares. Divide by n (population) or n − 1 (sample) to get the variance. The standard deviation is the square root of the variance.

Standard error and CV

The standard error of the mean is the sample standard deviation divided by the square root of n. It tells you how precisely the sample mean estimates the true mean. The coefficient of variation is the standard deviation as a percentage of the mean, which lets you compare spread across data with different units.

Reading the result

In data shaped like a bell curve, about 68% of values lie within one standard deviation of the mean and about 95% within two. A larger standard deviation means the values are more spread out.

A classic dataset, worked through

Take 2, 4, 4, 4, 5, 5, 7, 9. The mean is 5 and the squared deviations add up to 32. The population variance is 32 / 8 = 4, so the population standard deviation is exactly 2. The sample variance is 32 / 7 = 4.5714 and the sample standard deviation is 2.1381.

Those two numbers differ because the sample version divides by one fewer than the count. The difference is large for small lists and fades as n grows.

A second example with the other statistics

For 10, 12, 23, 23, 16, 23, 21, 16 the mean is 18 and the median is 18.5. The sample standard deviation is 5.237, the population version is 4.899, and the standard error of the mean is 1.852.

The coefficient of variation is 29.1 percent, computed as the sample standard deviation divided by the mean. It is shown as an unavailable value when the mean is zero.

What one outlier does

Change the 9 in the first dataset to 900 and the mean jumps from 5 to 116.4, the median stays near 4.5, and the sample standard deviation leaps from 2.14 to 316.6.

The standard deviation squares each deviation, so extreme values dominate it. If your list may contain data-entry errors, compare the mean and median before trusting the spread.

Entering numbers correctly

Commas are separators, not thousands marks. If you type 1,250 the tool reads two values, 1 and 250. Remove the thousands separators first. Decimals use a point, and scientific notation such as 1.5e3 is accepted. A leading plus or minus sign is fine.

The tool needs at least two numbers for the sample standard deviation and shows a note instead when you have only one. With a single value, the population version is zero.

Choosing between sample and population

If your numbers are every member of the group you care about, for example the scores of all 30 students in one class, use the population figure. If they are a sample taken to learn about a larger group, such as 30 customers chosen out of thousands, use the sample figure.

When in doubt, the sample version is the safer default in practice, because most datasets are samples.

Limits of the tool

It treats the numbers as one flat list. It does not handle grouped data with frequencies, weighted values or two separate groups. It also does not test for normality, so the usual 68 and 95 percent rules only apply when your data is roughly bell shaped.

Questions

Why does the sample version need two numbers?

It divides by n − 1. With one value that would be zero, so the sample standard deviation is not defined.

Can I paste a column from a spreadsheet?

Yes. Line breaks are treated as separators.

Is anything uploaded?

No. Your numbers stays in your browser and is never sent anywhere.

Why is my standard deviation different in a spreadsheet?

Spreadsheets often offer two functions, one for samples and one for populations. Check that you are comparing the same version.

What does a standard deviation of zero mean?

All values are identical. There is no spread at all.

Is a smaller standard deviation always better?

Not always. It means less variation, which is good for consistency but is neither good nor bad on its own.

Can the standard deviation be negative?

No. It is a square root of a non-negative number.

How many numbers can I paste?

There is no hard limit set by the tool, but the step-by-step table only appears for lists of 30 values or fewer.