Sample vs Population Standard Deviation: How to Calculate Each

Understand what standard deviation measures, when to divide by n or n − 1, how to calculate it step by step, and how to read variance and standard error.

Updated September 29, 2026 6 min read

Use the free Standard Deviation CalculatorSample and population SD, variance, mean, median, mode and range

Two sets of numbers can share the same average and still look nothing alike. Daily orders of 14, 14, 14, 14, 14 and daily orders of 5, 25, 9, 20, 11 both average 14, but only one of them makes planning easy. Standard deviation is the number that captures that difference: how far values typically sit from the mean.

This guide explains what standard deviation measures, walks through the calculation by hand, and clears up the question that confuses most people: whether to use the sample or the population formula. It also covers variance, standard error and common reading mistakes.

What standard deviation measures

Standard deviation (SD) is a measure of spread. A small SD means values cluster tightly around the mean; a large SD means they are scattered. It is in the same units as your data, so an SD of 2.7 orders a day is directly interpretable.

For data that is roughly bell-shaped (normally distributed), a common rule of thumb says that about 68% of values fall within one SD of the mean and about 95% within two. For skewed data, that rule does not hold, but SD is still a useful summary of spread.

The calculation, step by step

Take five days of orders: 12, 15, 11, 18, 14.

1. Find the mean. (12 + 15 + 11 + 18 + 14) ÷ 5 = 70 ÷ 5 = 14

2. Subtract the mean from each value and square the result.

Value (x) x − mean (x − mean)²
12 −2 4
15 1 1
11 −3 9
18 4 16
14 0 0
Sum of squares 30

Squaring makes every deviation positive and gives larger deviations more influence.

3. Divide to get the variance. This is where sample and population differ:

  • Population variance: 30 ÷ N = 30 ÷ 5 = 6
  • Sample variance: 30 ÷ (n − 1) = 30 ÷ 4 = 7.5

4. Take the square root to get the standard deviation.

  • Population SD (σ): √6 ≈ 2.4495
  • Sample SD (s): √7.5 ≈ 2.7386

Sample or population: which one?

Population (divide by N)

Use it when your data includes every member of the group you care about. If these five days are the only days the pop-up shop was open, and you only want to describe those days, they are the whole population.

Sample (divide by n − 1)

Use it when your data is a subset used to estimate something about a larger group. If these five days are a sample from a year of trading, and you want to estimate the typical daily variation, use the sample SD.

Why n − 1?

A sample's own mean sits, by definition, in the middle of that sample, so deviations measured from it tend to be slightly smaller than deviations from the true population mean. Dividing by n − 1 instead of n (known as Bessel's correction) inflates the variance just enough to compensate on average. The difference is large for small samples and becomes negligible as n grows.

In practice, most real-world data is a sample, so the sample formula is the more common choice. If in doubt, ask: "Am I describing only these numbers, or using them to say something about more?"

Standard error: a different question

The standard error of the mean (SE) is:

SE = sample SD ÷ √n

For our data: 2.7386 ÷ √5 ≈ 1.2247.

SD describes how spread out individual values are. SE describes how much the sample mean would vary if you repeated the sampling. SE shrinks as the sample grows, while SD does not. Confusing the two is a frequent reporting error.

Calculate it with our tool

The Standard Deviation Calculator shows the full working, which makes it useful for checking homework as well as analysis. It runs in your browser.

  1. Open the Standard Deviation Calculator. Type or paste numbers into Data set, separated by commas, spaces, tabs or new lines, or click Sample data to try an example.
  2. Under Your data is a, choose Sample (n − 1) or Population (N). Both are always calculated; the choice controls which one is highlighted and explained, and the other appears as Other SD.
  3. Read the standard deviation, Variance, Mean, Median, Mode, Min, Max, Range, Sum, Count and Std. error.
  4. Scroll to How it was calculated and open the deviation table to see x − mean and (x − mean)² for each value (up to 500 values).
  5. Click Copy summary to copy all statistics as text.

If any entries could not be read as numbers, the tool tells you which were ignored.

Other ways to calculate standard deviation

Spreadsheets

Spreadsheets have separate functions for each version:

=STDEV.S(A2:A6)   sample SD   → 2.7386
=STDEV.P(A2:A6)   population SD → 2.4495
=VAR.S / VAR.P    the matching variances

Older functions called STDEV and STDEVP correspond to the sample and population versions. A spreadsheet is the better choice for large datasets that already live in a sheet.

Scientific calculators

Many handheld calculators have a statistics mode that shows both σx (population) and sx (sample). Check which symbol your calculator uses; they are easy to mix up.

Statistical software

Tools such as R and Python libraries default to one version or the other, and the default is not always the same between packages. Always check the documentation.

Common mistakes

Using the wrong divisor

Using the population formula on a small sample understates the spread. With five values, the difference here is about 12%.

Treating SD as a percentage

SD is in the units of your data. To compare spread between datasets with different averages, divide SD by the mean to get the coefficient of variation.

Ignoring outliers

Because deviations are squared, one extreme value can inflate SD dramatically. Look at the data, and report the median and range alongside SD when outliers are present.

Needing at least two values

A sample SD with one value is undefined, since n − 1 = 0. The population SD of one value is simply 0.

For plain averages, the Average Calculator is quicker. To compare conversion rates between two groups, the A/B Test Calculator applies the right significance test, and the Scientific Calculator handles one-off square roots and powers.

Frequently asked questions

What is the difference between sample and population standard deviation?

Population SD divides the sum of squared deviations by N and describes a complete group. Sample SD divides by n − 1 to estimate the spread of a larger population from a subset.

Which standard deviation should I use?

Use sample SD when your data is a subset used to draw conclusions about a larger group, which is the usual case. Use population SD only when you have every member of the group.

How do you calculate standard deviation?

Find the mean, subtract it from each value, square the differences, add them up, divide by N or n − 1 to get the variance, then take the square root.

What is the difference between standard deviation and standard error?

Standard deviation measures the spread of individual values. Standard error, SD ÷ √n, measures how precisely the sample mean estimates the population mean.

Why is variance in squared units?

Variance is the average of squared deviations, so its units are squared. Taking the square root returns to the original units, which is why SD is usually reported instead.

Try it now: Standard Deviation Calculator

Loading tool…