Standard Diviation Calculator

Separate numbers with commas, spaces, or line breaks.

Data plot

Each dot is one value. The vertical line is the mean; the shaded band covers mean ± 1 standard deviation.

Calculation process

Step 1: Calculate the mean

Step 2: Subtract the mean from each value and square the result

Step 3: Divide by the divisor and take the square root


What is the standard deviation?

The standard deviation measures how far, on average, the values in a data set sit from their mean. A small standard deviation means the values cluster tightly around the mean; a large one means they are spread out. It is the square root of the variance, and because of that square root it is expressed in the same units as the original data, which is why it is usually easier to interpret than the variance itself.

Two versions exist, and the calculator above lets you switch between them:

  • Sample standard deviation (s) — use when your data are a sample drawn from a larger population and you want to estimate the population’s spread. The sum of squared deviations is divided by n − 1.
  • Population standard deviation (σ) — use when your data are the entire population of interest. The sum of squared deviations is divided by N.

Dividing by n − 1 instead of n (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance. In most research settings the data are a sample, so the sample formula is the default in SPSS, R, Excel’s STDEV.S, and this calculator.

Standard deviation formula

Sample standard deviation

s = √Σ(xi − x̄)²n − 1
  • s — sample standard deviation
  • xi — each individual value
  • — sample mean
  • n — number of values in the sample

Population standard deviation

σ = √Σ(xi − μ)²N
  • σ — population standard deviation
  • μ — population mean
  • N — number of values in the population

How to calculate standard deviation by hand

Both versions follow the same five steps; only the divisor in step 4 changes.

Example 1: sample standard deviation

Six students report the number of hours they studied for an exam: 12, 15, 9, 20, 14, 18. Treat this as a sample.

Step 1 — Find the mean. n = 6    x̄ = (12 + 15 + 9 + 20 + 14 + 18) / 6 = 88 / 6 = 14.6667
Step 2 — Subtract the mean from each value, then square the result.
xixi − x̄(xi − x̄)²
1212 − 14.6667 = −2.66677.1111
1515 − 14.6667 = 0.33330.1111
99 − 14.6667 = −5.666732.1111
2020 − 14.6667 = 5.333328.4444
1414 − 14.6667 = −0.66670.4444
1818 − 14.6667 = 3.333311.1111
Sum079.3333

The deviations always sum to zero, which is a quick check on the mean. Squaring removes the signs so the spread does not cancel out.

Step 3 — Add the squared deviations. Σ(xi − x̄)² = 79.3333
Step 4 — Divide by n − 1 to get the sample variance. s² = 79.3333 / (6 − 1) = 79.3333 / 5 = 15.8667
Step 5 — Take the square root. s = √15.8667 = 3.9833
Sample standard deviation s = 3.9833 hours

On average, study time varied by about four hours around the mean of 14.67 hours. Paste the same six numbers into the calculator above with “Sample” selected to confirm.

Example 2: population standard deviation

Now suppose those six students are the entire class (the whole population of interest), so we use the population formula on the same data.

Steps 1–3 are identical: μ = 14.6667 and Σ(xi − μ)² = 79.3333.
Step 4 — Divide by N (not N − 1). σ² = 79.3333 / 6 = 13.2222
Step 5 — Take the square root. σ = √13.2222 = 3.6362
Population standard deviation σ = 3.6362 hours

The population value is smaller than the sample value (3.6362 vs 3.9833) because the divisor is larger. The gap shrinks as the number of observations grows; with hundreds of values the two are nearly identical.

Which one should I report?

  • Survey responses, experimental measurements, or any data meant to generalize beyond the cases you collected → sample (s).
  • Every unit you care about is in the data set — all employees in a department, all exam scores in one class you are only describing → population (σ).

Related Tutorials:

Calculate Standard Deviation in Excel

How to Calculate Standard Deviation in Python (NumPy)

Leave a Comment

Your email address will not be published. Required fields are marked *