Statistics & Probability
Intermediate

Standard Deviation

Square root of the variance; typical spread.

Formula

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

Variables

x_iData values
\bar{x}Mean
nCount

Example

For 2, 4, 6: σ = √2.67 ≈ 1.63.

How it works

Standard deviation measures how far data values typically sit from the mean, using the average of their squared distances and then taking the square root to bring the result back to the original units. Squaring ensures that positive and negative deviations do not cancel out, and the square root makes the spread easier to interpret in the same scale as the data.

When to use it

Use this when you want a single number that summarizes how consistent or variable a set of measurements is, such as test scores, lab results, or daily temperatures. It is especially useful for comparing the spread of two data sets that share the same units.

Worked example, step by step

Data: 3, 7, 7, 9 Step 1: Find the mean: \u0304x = (3 + 7 + 7 + 9) / 4 = 26 / 4 = 6.5 Step 2: Find each deviation from the mean: 3 - 6.5 = -3.5, 7 - 6.5 = 0.5, 7 - 6.5 = 0.5, 9 - 6.5 = 2.5 Step 3: Square the deviations: (-3.5)^2 = 12.25, (0.5)^2 = 0.25, (0.5)^2 = 0.25, (2.5)^2 = 6.25 Step 4: Add the squared deviations: 12.25 + 0.25 + 0.25 + 6.25 = 19 Step 5: Divide by n = 4: 19 / 4 = 4.75 Step 6: Take the square root: \u03c3 = \u221a4.75 \u2248 2.18 Final answer: the standard deviation is about 2.18.

Common mistakes to avoid

  • Using n - 1 instead of n when the formula given is for the full population
  • Forgetting to square the deviations before averaging them
  • Computing the standard deviation from the raw values instead of first finding the mean

Did You Know?

Standard deviation is the "typical" distance from the mean — and its units match the data, unlike variance.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026