how to calculate std deviation

Standard Deviation Calculator

Enter numbers separated by commas, spaces, or semicolons.

You can paste a full list: 10 12 13 15 18

What is standard deviation?

Standard deviation (often written as SD) tells you how spread out numbers are around their average (mean). If your SD is small, values are tightly clustered near the mean. If your SD is large, values vary widely.

This makes standard deviation one of the most useful statistics in finance, science, business analytics, and quality control.

Why people use it

  • Compare consistency: Which process is more stable?
  • Measure risk: In investing, higher SD usually means higher volatility.
  • Detect unusual values: Large distances from the mean stand out faster.
  • Support decisions: Variability often matters as much as the average itself.

The formulas

Population standard deviation

σ = √( Σ(xᵢ − μ)² / N )

Use this when your data includes every item in the population.

Sample standard deviation

s = √( Σ(xᵢ − x̄)² / (n − 1) )

Use this when your data is only a sample of a larger population. The n − 1 adjustment is called Bessel’s correction.

Step-by-step: how to calculate standard deviation

Let’s use this dataset:

2, 4, 4, 4, 5, 5, 7, 9

1) Find the mean

(2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) / 8 = 40 / 8 = 5

2) Subtract the mean from each value

Differences: -3, -1, -1, -1, 0, 0, 2, 4

3) Square each difference

Squares: 9, 1, 1, 1, 0, 0, 4, 16

4) Sum the squared differences

9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32

5) Divide by N (population) or n − 1 (sample)

  • Population variance = 32 / 8 = 4
  • Sample variance = 32 / 7 = 4.5714

6) Take the square root

  • Population SD = √4 = 2
  • Sample SD = √4.5714 = 2.1381
Quick tip: Same data, different denominator, different answer. Always decide first: are you using a full population or just a sample?

How to interpret the result

Suppose average test score is 80:

  • SD = 3 means most scores are near 80 (tight spread).
  • SD = 15 means scores vary a lot (wide spread).

If data is roughly normal, a common rule is:

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

Common mistakes to avoid

  • Mixing up sample SD and population SD.
  • Forgetting to square differences before summing.
  • Rounding too early in intermediate steps.
  • Using SD alone when data is highly skewed (check median/IQR too).

Standard deviation in Excel and Google Sheets

Excel / Sheets formulas

  • =STDEV.P(range) for population SD
  • =STDEV.S(range) for sample SD

This is the fastest way to calculate SD for larger datasets without manual arithmetic.

Bottom line

To calculate standard deviation, find the mean, measure each value’s distance from the mean, square those distances, average them (with the right denominator), then take the square root. Once you master that flow, you can compute and interpret variability confidently in almost any field.

🔗 Related Calculators