Skip to content

Standard Deviation Calculator: Sample and Population

Calculate sample or population standard deviation and variance with a full table of squared deviations, plus the empirical rule ranges and clear worked examples.

4 min read

Standard deviation measures how spread out a set of numbers is. A small standard deviation means values cluster tightly around the average; a large one means they are widely scattered. It is the most widely used measure of variability in science, finance, quality control and education. Our standard deviation calculator gives the sample or population standard deviation, the variance and the full working. This guide explains the steps and how to interpret the answer.

How to use the calculator

  1. Data: paste or type your numbers, separated by commas, spaces or new lines.
  2. Data is a: sample or population.

With the default data 10, 12, 23, 23, 16, 23, 21, 16 as a sample:

  • Sample SD (s): 5.2372
  • Variance: 27.4286
  • Mean: 18
  • Count: 8

As a population, the SD is 4.8990 and the variance 24.

Step by step

  1. Find the mean. (10 + 12 + 23 + 23 + 16 + 23 + 21 + 16) ÷ 8 = 144 ÷ 8 = 18.
  2. Subtract the mean from each value to get the deviations.
  3. Square each deviation, so negatives do not cancel positives.
  4. Add the squares.
  5. Divide by n for a population or n − 1 for a sample. This gives the variance.
  6. Take the square root to get the standard deviation.
xx − mean(x − mean)²
10−864
12−636
23525
23525
16−24
23525
2139
16−24

The squares add to 192.

  • Population variance: 192 ÷ 8 = 24, so σ = √24 = 4.899.
  • Sample variance: 192 ÷ 7 = 27.43, so s = √27.43 = 5.237.

The formulas

Sample or population?

Use population when your data covers every member of the group you are describing, such as the heights of all players in one team.

Use sample when your data is a subset used to estimate a larger group, such as 50 customers from a customer base of thousands. Dividing by n − 1 (Bessel's correction) makes up for the fact that a sample's values tend to sit a little closer to their own mean than to the true population mean. Most real-world data is a sample, so this is usually the right choice.

The empirical rule

For roughly bell-shaped data:

  • About 68% of values lie within 1 SD of the mean.
  • About 95% lie within 2 SD.
  • About 99.7% lie within 3 SD.

With the default population figures (mean 18, SD 4.90), that is 13.1 to 22.9 for 68%, 8.2 to 27.8 for 95% and 3.3 to 32.7 for 99.7%. The z-score calculator tells you exactly where a single value falls.

Interpreting the size

Standard deviation is in the same units as your data, which makes it easy to read. Two classes might both average 70% on a test, but a class with an SD of 5 points is much more consistent than one with an SD of 20.

To compare spread across different scales, use the coefficient of variation: SD ÷ mean. For the default sample, 5.24 ÷ 18 ≈ 29%.

Real-world uses

  • Investing: standard deviation of returns is the usual measure of volatility and risk. The average return calculator works out the mean return.
  • Manufacturing: a process that keeps parts within ±3 SD of the target is the basis of Six Sigma quality control.
  • Education: test scores are often scaled using the mean and SD.
  • Science: results are reported as mean ± SD, and the SD feeds into confidence intervals.

Common mistakes

  • Forgetting to square the deviations, which makes them sum to zero.
  • Forgetting the square root at the end, which leaves you with the variance.
  • Using population formulas for sample data, which underestimates spread.

For the mean, median, mode and range together, try the statistics calculator.

Frequently asked questions

What is the difference between variance and standard deviation?

Variance is the average squared deviation. Standard deviation is its square root, which brings it back to the original units of the data.

Why divide by n − 1 for a sample?

A sample tends to underestimate the spread of the whole population. Dividing by n − 1 instead of n corrects that bias.

Can the standard deviation be negative?

No. It is a square root of a sum of squares, so it is always zero or positive. Zero means every value is identical.

What is a high standard deviation?

It depends on the context and the scale. Compare it with the mean, or use the coefficient of variation to judge relative spread.

Share

Try it yourself

Run your own numbers with our free tool: Standard deviation calculator. No sign-up, and it works on any device.

Open the calculator