Sample Standard Deviation Formula - Steps and Examples

#Formula
TL;DR
The sample standard deviation formula takes the square root of the summed squared deviations divided by n−1n-1. This article gives the variable key, five worked examples, and the common errors.
BT
Bhanzu TeamLast updated on November 4, 20267 min read

Key Points

  • The sample standard deviation formula is s=∑(xi−xˉ)2n−1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}, the square root of the sample variance.

  • The NIST e-Handbook of Statistical Methods states that the standard deviation is the square root of the variance, and prints the variance with N−1N-1 in the denominator.

  • Because it is a square root of squared units, the sample standard deviation returns to the original units of the data, unlike variance.

  • The n−1n-1 divisor makes the variance an unbiased estimate, though the square root of an unbiased variance is not itself perfectly unbiased.

  • A standard deviation of zero means every value in the sample is identical, and the quantity can never be negative.

What Is the Sample Standard Deviation Formula?

The sample standard deviation formula measures the typical distance of sample values from their mean, in the same units as the data, and is written

s=∑i=1n(xi−xˉ)2n−1s = \sqrt{\frac{\sum_{i=1}^{n} (x_i - \bar{x})^2}{n-1}}

The NIST/SEMATECH e-Handbook of Statistical Methods defines it directly as the square root of the variance, and prints the variance with an N−1N-1 denominator.

The Full Definition

Variance is awkward to interpret because it is measured in squared units, so a spread of heights in centimetres comes out in square centimetres. The standard deviation fixes that by taking the square root, which returns the figure to centimetres.

That is the only job the square root does. Everything informative about the spread is already in the variance, and ss is simply the readable version of it.

Why the Square Root Matters

Suppose a sample of four lengths has a variance of 0.0333 square centimetres. Nobody can picture a square centimetre of length, so the number cannot be compared against the measurements it came from.

Taking the square root gives about 0.18 centimetres, which sits on the same scale as the original lengths and can be read as a typical deviation from the mean. This is also what makes ss usable inside other formulas: a confidence interval adds and subtracts multiples of ss from the mean, and that addition only makes sense if the units match.

One honest caveat belongs here. The n−1n-1 divisor makes the variance an unbiased estimate of the population variance, but taking a square root does not preserve that property exactly, so ss carries a small bias that is almost always ignored in practice.

Variable Key

Symbol

Meaning

Unit or type

Notes

ss

sample standard deviation

same units as the data

the quantity being computed

s2s^2

sample variance

squared units of xx

the value under the root

xix_i

the iith observation

same units as the data

one value from the sample

xˉ\bar{x}

sample mean

same units as the data

xˉ=∑xin\bar{x} = \frac{\sum x_i}{n}

n−1n-1

degrees of freedom

count

the divisor, not nn

Examples of the Sample Standard Deviation Formula

Example 1

Find the sample standard deviation of 4, 6, 8.

The mean is 6 and the squared deviations are 4,0,44, 0, 4, summing to 8:

s=83−1=4=2s = \sqrt{\frac{8}{3-1}} = \sqrt{4} = 2

Final answer: s=2s = 2

Example 2

Find the sample standard deviation of 2, 4, 4, 4, 5, 5, 7, 9 by taking the square root of each deviation.

The formula contains a square root and squared deviations, so cancelling them term by term looks like a shortcut. Try it on the first deviation, where x1−xˉ=−3x_1 - \bar{x} = -3:

(−3)2=3\sqrt{(-3)^2} = 3

Doing that to every term and averaging gives the mean of 3,1,1,1,0,0,2,43, 1, 1, 1, 0, 0, 2, 4, which is 1.5. That is the mean absolute deviation, a different and smaller quantity, not the standard deviation.

The root applies to the whole sum, not to each term. Order matters: square every deviation, add them all, divide, and only then take one square root.

The mean is 5, the squared deviations sum to 32, so

s=328−1=4.571≈2.138s = \sqrt{\frac{32}{8-1}} = \sqrt{4.571} \approx 2.138

Final answer: s≈2.138s \approx 2.138

Example 3

A sample of five test scores is 70, 75, 80, 85, 90. Find the sample standard deviation.

The mean is 80 and the squared deviations sum to 250:

s=2505−1=62.5≈7.906s = \sqrt{\frac{250}{5-1}} = \sqrt{62.5} \approx 7.906

Final answer: s≈7.906s \approx 7.906 marks

Example 4

A sample of four measurements in centimetres is 12.1, 12.4, 12.2, 12.5. Find the sample standard deviation.

The mean is 12.3 and the squared deviations sum to 0.10:

s=0.104−1=0.0333≈0.183s = \sqrt{\frac{0.10}{4-1}} = \sqrt{0.0333} \approx 0.183

Final answer: s≈0.183s \approx 0.183 cm

The answer is in centimetres, directly comparable with the measurements, which the variance of 0.0333 square centimetres was not.

Example 5

A sample has n=10n = 10 and ∑(xi−xˉ)2=180\sum (x_i - \bar{x})^2 = 180. Find ss without the raw data.

The sum of squared deviations is all the formula needs beyond nn:

s=18010−1=20≈4.472s = \sqrt{\frac{180}{10-1}} = \sqrt{20} \approx 4.472

Final answer: s≈4.472s \approx 4.472

Exam questions often supply the sum of squares directly, which removes the arithmetic and tests only whether the right denominator is chosen.

Don't Confuse This With Three Close Relatives

Quantity

Formula

What differs

Sample standard deviation

∑(xi−xˉ)2n−1\sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}

divides by n−1n-1

Population standard deviation

∑(xi−μ)2N\sqrt{\frac{\sum (x_i - \mu)^2}{N}}

divides by NN, uses the true mean

Sample variance

∑(xi−xˉ)2n−1\frac{\sum (x_i - \bar{x})^2}{n-1}

no square root, squared units

Mean deviation

∑∣xi−xˉ∣n\frac{\sum \lvert x_i - \bar{x} \rvert}{n}

absolute values, not squares

Common Errors When Working With Sample Standard Deviation

Mistake 1: Using the population formula on sample data

Where it slips in: Calculators offer two keys, often labelled σn\sigma_n and σn−1\sigma_{n-1}, with nothing on screen to say which the question wants.

Don't do this: s=∑(xi−xˉ)2ns = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n}} for a sample.

The correct way: Use n−1n-1 whenever the data is a sample from something larger. The key marked ss or σn−1\sigma_{n-1} is the sample one.

Students who decide sample-or-population before touching the calculator get this right consistently, because the decision is about what the data represents and has nothing to do with the arithmetic that follows.

Mistake 2: Forgetting the square root

Where it slips in: The variance is the last computed value, so it gets reported as though the work were finished.

Don't do this: Report s=62.5s = 62.5 when 62.5 is the variance.

The correct way: s=62.5≈7.906s = \sqrt{62.5} \approx 7.906. A standard deviation much larger than the spread visible in the data is the signature of a missing root.

Mistake 3: Rounding the variance before rooting it

Where it slips in: The variance comes out as a long decimal, so it gets rounded for tidiness and then squared-rooted.

Don't do this: Round 4.57144.5714 to 4.64.6 and then take the root.

The correct way: Carry the full variance into the square root and round only ss. Rounding before a root moves the error into the digits you intend to report.

The Short Version

  • The sample standard deviation formula is s=∑(xi−xˉ)2n−1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}, the square root of the sample variance.

  • The square root exists to return the spread to the data's own units, which is what makes ss readable and usable in other formulas.

  • The n−1n-1 divisor comes from the variance, and choosing nn instead understates the spread.

  • Forgetting the root, or rounding the variance before taking it, are the two errors that change a reported answer most.

  • To work through dispersion with a teacher, explore math tutoring or a middle school math tutor.

Practice These Three Before Moving On

Find the sample standard deviation of 3, 7, 7, 19. Then find it for 10, 10, 10, 10, and explain why the answer must be zero before you compute it.

Want a live Bhanzu trainer to walk through more statistics problems? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the sample standard deviation formula?
s=∑(xi−xˉ)2n−1s = \sqrt{\frac{\sum (x_i - \bar{x})^2}{n-1}}. Square the deviations from the mean, add them, divide by n−1n-1, then take the square root.
Why does the sample standard deviation formula use n minus 1?
Because it inherits the divisor from the sample variance, where n−1n-1 corrects the downward bias caused by measuring deviations from the sample's own mean. The full reasoning sits in the sample variance formula, since the standard deviation is just its square root.
Can the sample standard deviation be larger than the mean?
Yes. That happens whenever the data is highly spread relative to its average, and it is common for skewed data such as incomes or waiting times.
Is the sample standard deviation an unbiased estimate?
Not exactly. The n−1n-1 divisor makes the variance unbiased, but the square root of an unbiased estimate is not itself unbiased, so ss carries a small bias that is normally ignored.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →