Math

Standard Deviation Calculator

Paste a set of numbers to get the mean, variance, and both the population and sample standard deviation at once.

Calculation inputs

Separate values with commas, spaces, or new lines.

Example: 12, 15, 9, 20, 14

Results

No result yet

Complete the fields and select Calculate to show results here.

About this calculator

This calculator takes a list of numbers and returns the mean, variance, and standard deviation, calculated both as a population and as a sample. It is useful for students, researchers, and anyone summarizing how spread out a data set is around its average.

How the calculation works

  • Mean = sum of values ÷ count
  • Population variance = Σ(value − mean)² ÷ n
  • Sample variance = Σ(value − mean)² ÷ (n − 1)
  • Standard deviation is the square root of the variance

Notes and assumptions

Use the population figure when your numbers are the entire group, and the sample figure when they are a sample drawn from a larger group.

How it works in plain English

After you paste in a list of numbers, the calculator first finds the mean by adding every value and dividing by how many values there are. It then measures how far each value sits from that mean, squares each of those differences so negatives and positives do not cancel out, and adds the squared differences together.

That total is divided by the count of values to get the population variance, or by the count minus one to get the sample variance. Dividing by one less value for the sample case corrects for the fact that a sample tends to underestimate the true spread of the larger group it was drawn from. Standard deviation is simply the square root of whichever variance applies, which brings the units back in line with the original data instead of squared units.

The calculator also reports the median, minimum, maximum, range, and sum alongside the main figures, giving a fuller picture of the data set's shape in one place.

The formula

  • Mean = sum of values / count
  • Population variance = sum of (value - mean)^2 / n
  • Sample variance = sum of (value - mean)^2 / (n - 1)
  • Standard deviation = square root of variance

Worked example

Take the data set 12, 15, 9, 20, 14, 18, 11. Adding these seven values gives 99, so the mean is 99 / 7, about 14.14. Squaring the difference between each value and the mean and adding those squares gives a total of roughly 84.86.

Dividing by 7 for the population variance gives about 12.12, so the population standard deviation is the square root of that, about 3.48. Dividing the same total by 6 for the sample variance gives about 14.14, so the sample standard deviation is about 3.76.

The calculator would also report the median as 14, the minimum as 9, the maximum as 20, the range as 11, and the sum as 99 alongside these figures. Comparing the two standard deviations shows how the sample version, at 3.76, runs a bit higher than the population version, at 3.48, which reflects the small correction applied whenever you are treating the seven numbers as a sample rather than the complete group.

Frequently asked questions

Should I use population or sample standard deviation?

Use the population version when your numbers represent the entire group you care about, with nothing left out. Use the sample version when your numbers are a subset drawn from a larger group you are trying to describe, since it corrects slightly for the extra uncertainty that comes from only having a sample.

What does a high standard deviation mean?

A high standard deviation means the values in your data set are spread out widely around the mean, with many points far from average. A low standard deviation means the values cluster closely together near the mean, so the data set is more consistent.

Why is variance in squared units?

Variance is calculated by squaring the difference between each value and the mean before averaging, which is necessary so positive and negative differences do not cancel each other out. That squaring step also changes the units, which is why standard deviation, the square root of variance, is usually reported instead for easier interpretation.

Can I calculate standard deviation with just one number?

A single value has a population standard deviation of zero, since there is no spread around its own mean. Sample standard deviation cannot be calculated with only one value because the formula divides by the count minus one, which would mean dividing by zero.

How should I format the numbers I paste in?

Separate your values with commas, spaces, or new lines in any combination, and the calculator will read them as a list. Decimals and negative numbers are both accepted, so you can paste in raw data exactly as you have it recorded.

Related tools