Standard Deviation Calculator

Paste a data set to get its standard deviation, variance, mean, sum and count — with the working shown, confidence intervals at eight levels, and a frequency table.

Just enter your values below — results update automatically.
Your data

Separate with commas, spaces, semicolons or line breaks — a column pasted from a spreadsheet works as it is. Decimals and negatives are fine.

Is this a population or a sample?
Result
The two formulas
Population, σ√( Σ(xᵢ − μ)² / N ) — divide by N
Sample, s√( Σ(xᵢ − x̄)² / (N − 1) ) — divide by N − 1
VarianceThe same thing before the square root
MeanΣx / N — the sum divided by how many
Standard errorσ / √N — how far the mean itself might be out
Margin of errorz × standard error, for the z of your confidence level
Confidence levels and their multipliers
68.3%1 × the standard error — one standard error either side
90%1.645
95%1.960 — the level most journals and reports use
99%2.576
99.9%3.291
99.99%3.891
99.999%4.417
99.9999%4.892

What standard deviation actually measures

An average tells you where a data set sits. It says nothing about how tightly the numbers cluster around that point, and two very different sets can share one. Consider two classes whose test scores both average 70:

  • Class A: 68, 69, 70, 71, 72 — everyone is close to the average.
  • Class B: 40, 55, 70, 85, 100 — nobody is near it.

Standard deviation is the number that separates them. It is, roughly, the typical distance between a value and the mean. Class A's is about 1.4; Class B's is about 21. Same average, entirely different story, and only the second number tells you which class needs looking at.

It shares the units of the original data, which is what makes it readable. If the numbers are heights in centimetres, the standard deviation is in centimetres too, and “typically about 8 cm from the average” is a sentence anyone can act on.

Population or sample: the one choice that changes the answer

This is the setting people get wrong, and unlike a typo it produces a plausible number rather than an obvious error.

Population means your numbers are the entire group you are describing. The exam marks of all thirty students in one class, when the class is what you are talking about. Divide by N.

Sample means your numbers are a subset, and you want to say something about the larger group they came from. Thirty students surveyed to describe a whole year group. Divide by N − 1.

Why the minus one? The mean you subtract is the sample's own mean, and a sample always sits slightly closer to its own mean than to the population's real one. That makes the raw spread come out a little too small every time. Dividing by N − 1 instead of N inflates it by exactly enough to cancel the bias. It is called Bessel's correction.

The gap shrinks as the data set grows. On eight values, switching from population to sample raises the answer by about 7%. On a thousand, it moves the fourth decimal place. That is why it matters most for the small data sets that turn up in homework and lab work.

If you genuinely do not know which you have, ask what you want the number to describe. Describing only the numbers in front of you? Population. Using them to reason about something bigger? Sample.

Working it out by hand

Five steps, and the calculator shows each of them for whatever you type.

  1. Find the mean. Add everything up, divide by how many values there are.
  2. Subtract the mean from each value. These are the deviations. Some are negative.
  3. Square each one. This removes the signs, so they cannot cancel out.
  4. Add the squares and divide — by N for a population, by N − 1 for a sample. That result is the variance.
  5. Take the square root. That is the standard deviation.

Worked through on 10, 12, 23, 23, 16, 23, 21, 16 as a population: the sum is 144 and there are 8 values, so the mean is 18. The squared deviations add to 192. Divided by 8 that is a variance of 24, and the square root of 24 is about 4.899.

Treat the same numbers as a sample and only step four changes: 192 divided by 7 is about 27.43, and the square root of that is about 5.237. Same data, larger answer, because a sample is being asked to speak for a population it cannot fully see.

Variance, and why we bother squaring

Variance is the number just before the final square root — the mean of the squared deviations. Standard deviation is its square root, and each is trivially recoverable from the other.

The obvious question is why we square at all. Without it, the deviations sum to exactly zero every time: that is what a mean is, the balance point where the positives and negatives cancel. Squaring makes them all positive so they can accumulate. It also weights large deviations far more heavily than small ones, which is usually what you want — one value far out really is more remarkable than several close in.

The cost is units. Squaring centimetres gives square centimetres, which is meaningless here, so the square root at the end brings the answer back to something you can compare against the original data. That is the whole reason standard deviation gets quoted more often than variance, despite variance being the more natural quantity mathematically.

Standard error and the margin of error table

Standard deviation describes the spread of your values. The standard error of the mean describes something different and more subtle: how far your calculated average might be from the true one.

It is the standard deviation divided by the square root of the count, σ / √N. Notice the square root — to halve your uncertainty about the average, you need four times as much data, not twice. That single fact governs how expensive studies get.

The table multiplies the standard error by a factor for each confidence level. At 95% the factor is 1.960, so the interval is the mean plus or minus 1.96 standard errors. The honest reading is this: if you repeated the whole exercise many times, about 95% of the intervals built this way would contain the true average. It is a statement about the method's long-run reliability, not a probability that this particular interval is right.

The error bars alongside are the same numbers drawn to scale, so you can see at a glance how much wider 99.9% is than 68.3%.

Reading a standard deviation sensibly

A standard deviation is only meaningful next to its mean. Eight points of spread is tiny on a scale averaging 5,000 and enormous on one averaging 20. When you need to compare spread across different scales, divide by the mean to get the coefficient of variation and compare that instead.

For data that follows the familiar bell shape, three rough landmarks are worth carrying:

  • About 68% of values fall within one standard deviation of the mean.
  • About 95% fall within two.
  • About 99.7% fall within three.

These hold only when the data is roughly bell-shaped. Income, waiting times and anything with a hard floor at zero are usually skewed, and the rule overstates how neatly they behave. The frequency table beside your result is worth a glance for exactly this reason — if the values pile up at one end, treat the landmarks with suspicion.

Where people go wrong

  • Wrong mode. Population where a sample was meant, or the reverse. It is the most common error and it never announces itself.
  • Dropping repeats. If 23 appears three times, it must be entered three times. Deduplicating changes the answer.
  • Rounding the mean before subtracting. A mean of 18.333 rounded to 18 pushes error into every one of the squared deviations.
  • Comparing standard deviations across different units or scales. Use the coefficient of variation instead.
  • Confusing standard deviation with standard error. The first describes the data, the second describes the reliability of its average. The second is always smaller.
  • Assuming the bell curve. The 68–95–99.7 landmarks depend on it, and plenty of real data does not oblige.

Frequently asked questions

Should I choose population or sample?

Choose Population when your numbers are every member of the group you care about, such as the test scores of all thirty students in one class. Choose Sample when they are a subset you are using to say something about a larger group, such as thirty students standing in for a whole year. Sample divides by N minus one instead of N, which makes the answer slightly larger and corrects a bias that would otherwise understate the spread.

Why does the sample formula divide by N minus one?

Because the mean you subtract is the sample's own mean, not the true mean of the population, and a sample always sits slightly closer to its own mean than to the real one. Dividing by N minus one inflates the result just enough to compensate. The correction is called Bessel's correction, and it matters most with small samples: with eight values it raises the answer by about seven percent, with a thousand it is negligible.

What is the difference between variance and standard deviation?

Variance is the average of the squared distances from the mean, and standard deviation is its square root. Squaring is what stops positive and negative distances cancelling out, but it also leaves variance in squared units, so a data set measured in centimetres has a variance in square centimetres. Taking the square root returns the answer to the original units, which is why standard deviation is the figure usually quoted.

What does the margin of error table tell me?

It shows how far the true average could plausibly sit from the average you measured. The standard error of the mean is the standard deviation divided by the square root of how many values you have, and each row multiplies it by the factor for that confidence level. A 95 percent row means that if you repeated the sampling many times, about 95 percent of the intervals built this way would contain the real average.

Can standard deviation be zero or negative?

Zero yes, negative never. A standard deviation of zero means every value in the set is identical, so there is no spread at all. It cannot be negative because it is a square root of a sum of squares, and both of those are always zero or positive. If you ever see a negative one, something has gone wrong with the calculation rather than with the data.

How do I enter my data?

Paste or type the numbers separated by commas, spaces, semicolons or line breaks, in any mix. That means a column copied straight out of a spreadsheet works without reformatting. Decimals and negative numbers are both fine, and repeated values should be entered every time they occur because each one counts.

This calculator is provided for education and general reference. Results are computed in standard double-precision arithmetic and displayed to fourteen significant digits. The confidence intervals assume the sampling distribution of the mean is approximately normal, which is reasonable for reasonably sized samples but less reliable for very small or heavily skewed data sets — for those, a method based on the t-distribution is more appropriate. Learn more about how we build and check these tools, or read our privacy policy.