Math & Statistics

Standard Deviation Calculator

s = √(Σ(x − x̄)² / (n − 1)) for a sample. Switch to population (÷ n) when your list is the full set.

Standard deviation

2.13809

Variance

4.571429

Mean

5

Count (n)

8

Working

  1. n = 8. Mean x̄ = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 5.
  2. Squared deviations: (2 − 5)² = 9; (4 − 5)² = 1; (4 − 5)² = 1; (4 − 5)² = 1; (5 − 5)² = 0; (5 − 5)² = 0; (7 − 5)² = 4; (9 − 5)² = 16.
  3. Sum of squares = 32.
  4. Sample variance s² = sum ÷ (n − 1) = 4.571429.
  5. Standard deviation = √variance = 2.13809.
Deviation table
xx − mean(x − mean)²
2-39
4-11
4-11
4-11
500
500
724
9416
https://calcwell.net/calculators/standard-deviation-calculator?nums=2%2C+4%2C+4%2C+4%2C+5%2C+5%2C+7%2C+9&kind=sample
Share, cite or embed this calculator

Share link (includes current inputs when available)

Cite this calculator

CalcWell. "Standard Deviation Calculator." CalcWell, https://calcwell.net/calculators/standard-deviation-calculator. Accessed 2026-11-28.

Embeddable widget

Embed on your site with attribution linking back to calcwell.net.

<iframe src="https://calcwell.net/calculators/standard-deviation-calculator" title="Standard Deviation Calculator" width="100%" height="520" loading="lazy" style="border:1px solid #e5e7eb;border-radius:8px;"></iframe>
<p>Calculator by <a href="https://calcwell.net/calculators/standard-deviation-calculator" rel="noopener">CalcWell</a></p>

Worked example

Default example: 2, 4, 4, 4, 5, 5, 7, 9 (sample).

Mean = 5. Sum of squared deviations = 28. Sample variance = 28 ÷ 7 = 4. SD = √4 = 2.

Answer: sample SD = 2.138089935299395 (mean 5)

Standard deviation formulas

Sample: s = √(Σ(x − x̄)² / (n − 1))
Population: σ = √(Σ(x − μ)² / n)

These are the ordinary textbook definitions (descriptive statistics). No proprietary smoothing or robust estimators are applied.

Standard deviation in practice

Manufacturing: shaft diameters in millimeters

Five shafts measure 10.02, 9.98, 10.01, 9.99, and 10.00 mm. Mean = 50.00 ÷ 5 = 10.00. Deviations: +0.02, −0.02, +0.01, −0.01, 0. Squares: 0.0004, 0.0004, 0.0001, 0.0001, 0, with a total of 0.001. If these five are a sample from a production run, sample variance = 0.001 ÷ 4 = 0.00025 and s = 0.0158 mm. If they are the entire batch, population variance = 0.001 ÷ 5 = 0.0002 and σ = 0.0141 mm.

Class test scores: same mean, different spread

Class A scored 60, 70, 80, 90, 100. Class B scored 78, 79, 80, 81, 82. Both means are 80. For A, deviations are −20, −10, 0, 10, 20 and the squares total 1,000, so sample variance = 1,000 ÷ 4 = 250 and s = 15.81. For B, the squares are 4, 1, 0, 1, 4 = 10, so variance = 10 ÷ 4 = 2.5 and s = 1.58. The mean hides the fact that A is ten times more spread out.

Monthly investment returns: measuring volatility

Six monthly returns: 4%, −2%, 6%, 0%, 2%, 2%. Sum = 12, mean = 2%. Deviations: 2, −4, 4, −2, 0, 0. Squares: 4, 16, 16, 4, 0, 0 = 40. Sample variance = 40 ÷ 5 = 8, so s = 2.83 percentage points. Roughly speaking, a typical month lands within about 2.83 points of the 2% average, though real returns are rarely perfectly bell-shaped.

Population versus sample: how much it matters

Suppose the sum of squared deviations is 40. The divisor (n or n − 1) matters a lot for small lists and barely at all for large ones.

nPopulation SD (÷ n)Sample SD (÷ n − 1)
43.1623.651
102.0002.108
500.8940.904

Common mistakes

  • Using population SD on a sample. It underestimates the true spread, especially with fewer than about 30 values.
  • Forgetting the square root. Variance is in squared units; the standard deviation is back in the original units.
  • Squaring the average deviation. Deviations must be squared individually before summing, otherwise they cancel out to zero.
  • Applying the 68-95-99.7 rule to skewed data. It only holds for roughly bell-shaped distributions.
  • Computing SD of a single value. With n = 1 a sample SD is undefined (division by zero).

When to use this vs related tools

Use the standard deviation calculator when you need spread, consistency, or volatility. For the center of the data, use the average calculator or the mean, median, and mode calculator. For a refresher on percentages used when comparing spread to the mean, see the guide on how to calculate percentages. More tools are in the math calculators hub.

Frequently asked questions

How do you calculate standard deviation?

Find the mean, subtract it from each value, square the differences, average those squares (÷ n for population or ÷ (n−1) for sample), then take the square root.

Sample vs population standard deviation?

Sample uses n−1 (Bessel’s correction) when your data is a sample of a larger population. Population uses n when the data are the entire set.

What is variance?

Variance is the average squared deviation from the mean: the square of the standard deviation.

We use cookies and similar technologies to improve your experience, analyze traffic, and show personalized ads. By clicking "Accept", you consent to the use of cookies. Privacy Policy · Cookie Policy