Standard Deviation Formula Calculator

This standard deviation formula calculator applies the sample or population formula step by step and shows every deviation, square and total.

Checks on your data

  • The definition formula and the shortcut formula agree mathematically. The shortcut can lose precision with large numbers, so software uses the definition.

Results

Standard deviation s
2.9439203
Variance s²
8.6666667
Mean
4.3333333
Sum of squared deviations Σ(x − x̄)²
43.333333
Divisor
n − 1 = 5
Σx and Σx²
26 and 156
Shortcut formula gives variance
8.6666667
matches the definition when there is no rounding
Other version of the SD
2.6874192
population SD (n)
Values with the mean and ±1 s
2468mean 4.333
Squared deviation of each value (the building blocks of the variance)
010206: 2.7777862.782: 5.4444425.443: 1.7777831.781: 11.1111111.19: 21.7778921.85: 0.44444450.444
Working table
xx − x̄(x − x̄)²x²
61.666672.7777836
2-2.333335.444444
3-1.333331.777789
1-3.3333311.11111
94.6666721.777881
50.6666670.44444425
Total1.7764 × 10^-1543.3333156
Show step-by-step solution
  1. Step 1. Mean: x̄ = 26 ÷ 6 = 4.3333333.
  2. Step 2. Subtract the mean from each value and square it (see the table).
  3. Step 3. Add the squares: Σ(x − x̄)² = 43.333333.
  4. Step 4. Divide by n − 1 = 5: s² = 43.333333 ÷ 5 = 8.6666667.
  5. Step 5. Take the square root: s = √8.6666667 = 2.9439203.
  6. Check with the shortcut: (Σx² − (Σx)²/n) ÷ 5 = (156 − 112.66667) ÷ 5 = 8.6666667.
Sample√(Σ(x−x̄)²/(n−1))
Population√(Σ(x−μ)²/N)
Shortcut(Σx² − (Σx)²/n)
UnitsSame as the data

What Is Standard Deviation Formula?

The standard deviation formula is s = √(Σ(x − x̄)² ÷ (n − 1)) for a sample and σ = √(Σ(x − μ)² ÷ N) for a population. The calculation has five steps: find the mean, subtract it from each value, square the results, add them, divide, and take the square root.

Enter your data and choose the sample or population formula. The calculator numbers each step with your values, shows a working table of deviations and squares, and checks the answer with the computational shortcut formula that uses Σx² and (Σx)².

The sections below give the formulas, variables, a worked example and answers about why we square deviations and when to use n − 1.

How to Use the Standard Deviation Formula Calculator

  1. Enter your values.
  2. Choose the sample or population formula.
  3. Follow the numbered steps.
  4. Check the table totals and the shortcut formula.

Standard Deviation Formula Formula

Sample standard deviation

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

Population standard deviation

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

Computational (shortcut) form

s2=∑xi2−(∑xi)2nn−1s^2=\frac{\sum x_i^2-\frac{(\sum x_i)^2}{n}}{n-1}

Standard Deviation Formula Variables Explained

SymbolMeaningNotes
x̄ or μMean
Σ(x − x̄)²Sum of squared deviations
n − 1 or NDivisorsample or population
s or σStandard deviation

Standard Deviation Formula Worked Example

For 6, 2, 3, 1, 9, 5: the mean is 26 ÷ 6 = 4.333. The deviations squared are 2.778, 5.444, 1.778, 11.111, 21.778 and 0.444, totalling 43.333. The sample variance is 43.333 ÷ 5 = 8.667 and s = 2.944.

With the example values loaded in the calculator above, the steps are:

  1. Step 1. Mean: x̄ = 26 ÷ 6 = 4.3333333.
  2. Step 2. Subtract the mean from each value and square it (see the table).
  3. Step 3. Add the squares: Σ(x − x̄)² = 43.333333.
  4. Step 4. Divide by n − 1 = 5: s² = 43.333333 ÷ 5 = 8.6666667.
  5. Step 5. Take the square root: s = √8.6666667 = 2.9439203.
  6. Check with the shortcut: (Σx² − (Σx)²/n) ÷ 5 = (156 − 112.66667) ÷ 5 = 8.6666667.

Result: Standard deviation s = 2.9439203; Variance s² = 8.6666667.

Where Standard Deviation Formula Is Used

Learning the method

Following each step of the calculation.

Checking by hand

Comparing your working with the full table.

Exam preparation

Practising both formulas.

Understanding variance

Seeing how squared deviations build the SD.

Common Standard Deviation Formula Mistakes to Avoid

  • Deviations from the mean always add to 0, which is a good check.
  • Square before adding, otherwise the positives and negatives cancel.
  • Round only at the end.

Standard Deviation Formula Terms and Definitions

Deviation
A value minus the mean.
Variance
The average squared deviation; the SD squared.

Standard Deviation Formula FAQs

What is the formula for standard deviation?

s = √(Σ(x − x̄)² ÷ (n − 1)) for a sample and σ = √(Σ(x − μ)² ÷ N) for a population.

How do I calculate standard deviation step by step?

Find the mean, subtract it from each value, square the results, add them, divide by n − 1 or N, then take the square root.

Why do we square the deviations?

Squaring removes the signs so deviations do not cancel and gives more weight to large deviations.

What is the shortcut formula?

Variance = (Σx² − (Σx)² ÷ n) ÷ (n − 1), which avoids calculating each deviation.

Related calculators

Last updated 2026-11-09. See our disclaimer.