CalcWisp

How to Find Standard Deviation (Sample and Population, Step by Step)

How to find standard deviation: subtract the mean from each value, square, add, divide by n (population) or n โˆ’ 1 (sample), then take the square root.

By the CalcWisp editorial team ยท Updated ยท 5 min read

Key takeaways

  • Standard deviation is the square root of the variance, which is the average squared distance of the values from the mean.
  • Population standard deviation divides the sum of squared deviations by n; sample standard deviation divides by n โˆ’ 1.
  • Dividing by n โˆ’ 1 is called Bessel's correction and makes the sample variance an unbiased estimate of the population variance.
  • For roughly normal data, about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three.
  • In Excel, STDEV.S calculates sample standard deviation (n โˆ’ 1) and STDEV.P calculates population standard deviation (n).

To find standard deviation, calculate the mean, subtract it from each value, square each difference, and add the squares. Divide that sum by n for a population or by n โˆ’ 1 for a sample to get the variance, then take the square root. The result measures how far values typically sit from the mean.

๐Ÿ“ŠFree toolStandard Deviation CalculatorSample or population SD, with the full working.

What is the standard deviation formula?

There are two versions, which differ only in the divisor.

Population standard deviation (ฯƒ):

ฯƒ = โˆš[ ฮฃ (x โˆ’ ฮผ)ยฒ รท N ]

Sample standard deviation (s):

s = โˆš[ ฮฃ (x โˆ’ xฬ„)ยฒ รท (n โˆ’ 1) ]

Here x is each value, ฮผ or xฬ„ is the mean, and N or n is the number of values. The NIST/SEMATECH e-Handbook of Statistical Methods gives the sample form, with n โˆ’ 1, as the standard definition of standard deviation, and describes variance as roughly the average squared distance from the mean.

Population vs sample: n or n โˆ’ 1?

Population Sample
Data covers Every member of the group A subset of a larger group
Divide by n n โˆ’ 1
Symbol ฯƒ s
Excel function STDEV.P STDEV.S
Typical use All employees of one firm; every test score in one class A survey of 500 voters; 30 parts pulled from a production line

Why divide by n โˆ’ 1 for a sample?

A sample's mean is calculated from the same data, so the values sit slightly closer to their own mean than to the true population mean. Dividing by n would therefore underestimate the population's spread on average. Dividing by n โˆ’ 1, known as Bessel's correction, makes the sample variance an unbiased estimate of the population variance. The correction matters most for small samples; with hundreds of values, n and n โˆ’ 1 give nearly the same answer.

How do you find standard deviation step by step?

The worked example uses eight values: 2, 4, 4, 4, 5, 5, 7, 9.

Step 1: Find the mean

Sum = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40. Mean = 40 รท 8 = 5.

๐Ÿ“‰Free toolMean, Median, Mode CalculatorAll three averages, plus variance, from one list.

Steps 2 and 3: Subtract the mean, then square each deviation

Value (x) Deviation (x โˆ’ 5) Squared deviation
2 โˆ’3 9
4 โˆ’1 1
4 โˆ’1 1
4 โˆ’1 1
5 0 0
5 0 0
7 2 4
9 4 16
Sum 0 32

The deviations always add to zero, which is why they are squared: squaring removes the signs so positive and negative distances do not cancel out.

Step 4: Divide to get the variance

  • Population variance = 32 รท 8 = 4
  • Sample variance = 32 รท 7 = 4.571

Step 5: Take the square root

  • Population standard deviation = โˆš4 = 2
  • Sample standard deviation = โˆš4.571 = 2.138

Treating the eight values as a complete population gives 2. Treating them as a sample drawn from something larger gives about 2.14.

What is variance, and how does it relate?

Variance is the step before the square root: the average squared deviation. In the example, the variance is 4 (population). Because it is in squared units (if the data is in centimetres, variance is in square centimetres), it is hard to read directly. Standard deviation converts back to the original units, which is why it is the figure usually reported.

How do you interpret standard deviation?

Standard deviation describes spread in the data's own units.

  • Small standard deviation: values cluster near the mean.
  • Large standard deviation: values are widely spread.
  • Zero: every value is the same.

Two classes can both average 75 on a test. If one has a standard deviation of 4 and the other of 15, the first class scored consistently, while the second had a wide range of high and low scores.

The 68โ€“95โ€“99.7 rule

When data is approximately normal (bell-shaped and symmetric), the empirical rule applies:

Range Share of values (approx.)
Mean ยฑ 1 standard deviation 68%
Mean ยฑ 2 standard deviations 95%
Mean ยฑ 3 standard deviations 99.7%

Example: if adult heights in a group are roughly normal with a mean of 170 cm and a standard deviation of 7 cm, about 68% fall between 163 and 177 cm, and about 95% between 156 and 184 cm.

The rule should not be applied to strongly skewed data, such as incomes, where most values are low and a few are very high.

How do you find standard deviation in Excel?

Function Divides by Use when
=STDEV.S(A1:A8) n โˆ’ 1 The data is a sample
=STDEV.P(A1:A8) n The data is the entire population
=VAR.S(A1:A8) n โˆ’ 1 Sample variance
=VAR.P(A1:A8) n Population variance

Microsoft's documentation states that STDEV.S assumes its arguments are a sample and uses the "n โˆ’ 1" method, while STDEV.P assumes the entire population and uses the "n" method. For the example data in cells A1:A8, STDEV.S returns about 2.138 and STDEV.P returns 2. The older STDEV and STDEVP functions still work and match STDEV.S and STDEV.P respectively. Google Sheets uses the same names.

Common mistakes

  • Using the wrong divisor. Most real-world data is a sample, so n โˆ’ 1 is the safer default unless the full population is known.
  • Forgetting the square root. Reporting the variance as the standard deviation overstates spread whenever the variance is above 1.
  • Rounding the mean too early. With decimal data, rounding the mean before computing deviations introduces errors; keep full precision until the end.
  • Confusing standard deviation with standard error. Standard error is the standard deviation divided by โˆšn and measures uncertainty in the mean, not spread in the data.

For a quick mean or average before working out spread, an average calculator handles the first step.

๐Ÿ“ŠFree toolAverage CalculatorMean, median, mode and more from any list of numbers.

Frequently asked questions

Should I use sample or population standard deviation?

Use population (divide by n) when the data includes every member of the group being described. Use sample (divide by n โˆ’ 1) when the data is a subset used to estimate a larger group, which is the more common case in research and surveys.

Can standard deviation be negative?

No. It is the square root of an average of squared numbers, so it is always zero or positive. It equals zero only when every value is identical.

What is the difference between variance and standard deviation?

Variance is the average squared deviation from the mean and is in squared units. Standard deviation is its square root, which returns to the original units, so it is easier to interpret.

Is a high standard deviation bad?

Not necessarily. It only means values are spread out. Whether that is a problem depends on context, such as manufacturing tolerances, test scores, or investment returns.

Standard Deviation
Standard deviation is a measure of spread equal to the square root of the variance; it shows how far values typically fall from the mean, in the same units as the data.
Variance
Variance is a measure of spread equal to the average squared distance of values from their mean; its square root is the standard deviation, and it is expressed in squared units.

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods โ€” 1.3.5.6 Measures of Scale
  2. Penn State STAT 200 โ€” 2.2.7 The Empirical Rule
  3. Microsoft Support โ€” STDEV.S function
  4. Microsoft Support โ€” STDEV.P function

Try the tools

๐Ÿ“ŠFree toolStandard Deviation CalculatorSample or population SD, with the full working.๐Ÿ“‰Free toolMean, Median, Mode CalculatorAll three averages, plus variance, from one list.๐Ÿ“ŠFree toolAverage CalculatorMean, median, mode and more from any list of numbers.

Keep reading