Skip to main content
Online
Statistics · step-by-step

Standard Deviation Calculator with Steps

Paste a list of numbers to get the mean, a table of deviations, the sum of squares, sample and population variance and standard deviation, plus median, quartiles, mode and range — every step shown with exact arithmetic.

Up to 500 values. Decimals and fractions are added exactly, so the mean and variance have no rounding error.

Complete guide

Standard deviation explained: sample vs population, variance and worked examples

5 min read Reviewed By the GetCalcMaster team · Editorial policy

The standard deviation measures how far values typically sit from their mean. Two classes can both average 75% on a test, but if one class has a standard deviation of 4 points and the other 15, the first is tightly bunched and the second has students far above and far below the average. Standard deviation is the most widely used measure of spread in science, finance, quality control and exam statistics.

This guide walks through the calculation by hand, explains when to divide by n and when by n − 1, and shows how the result relates to variance, the median and the interquartile range. The calculator above does the arithmetic exactly, using fractions, so the mean and variance carry no rounding error until the final square root.

How to use this tool

  1. Paste or type your numbers, separated by commas, spaces or new lines. Decimals and fractions are accepted.
  2. Choose Sample if the numbers are a sample from a larger group (the usual case), or Population if you have every value.
  3. Press Solve step by step to see the mean, a deviations table, the sum of squares, both variances and standard deviations, and the median, quartiles, mode and range.

Key formulas

Mean
x̄ = Σx / n
Add the values and divide by how many there are.
Population variance
σ² = Σ(x − μ)² / N
The average squared distance from the mean, when the data is the whole population.
Sample variance
s² = Σ(x − x̄)² / (n − 1)
Dividing by n − 1 (Bessel’s correction) compensates for measuring spread around the sample’s own mean.
Standard deviation
σ = √σ², s = √s²
The square root brings the spread back to the original units.
Shortcut for the sum of squares
Σ(x − x̄)² = Σx² − (Σx)² / n
Same result, fewer subtractions. It can lose precision on a calculator when values are large and close together.
z-score
z = (x − x̄) / s
How many standard deviations a value lies above or below the mean.

Worked examples

Example 1: A population with a whole-number answer

Find the population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.

  1. Mean: 40 / 8 = 5.
  2. Deviations: −3, −1, −1, −1, 0, 0, 2, 4. Squares: 9, 1, 1, 1, 0, 0, 4, 16.
  3. Sum of squares: 32. Population variance: 32 / 8 = 4.
  4. σ = √4 = 2.
Answer: σ = 2. Treated as a sample, s² = 32/7 ≈ 4.571 and s ≈ 2.138.
Try it: population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9
Example 2: A small sample

Six plants grew 12, 15, 11, 18, 14 and 16 cm. Find the sample standard deviation.

  1. Mean: 86 / 6 = 43/3 ≈ 14.33 cm.
  2. Sum of squared deviations: 100/3 ≈ 33.33.
  3. Sample variance: (100/3) / 5 = 20/3 ≈ 6.667 cm².
  4. s = √(20/3) = 2√15/3 ≈ 2.58 cm.
Answer: s ≈ 2.58 cm. A typical plant is about 2.6 cm from the average height.
Example 3: Test scores, with the median and quartiles

Scores: 70, 85, 85, 90, 62, 78, 85, 94, 88.

  1. Sorted: 62, 70, 78, 85, 85, 85, 88, 90, 94. Mean: 737/9 ≈ 81.89.
  2. Median: 85 (the 5th value). Mode: 85. Range: 94 − 62 = 32.
  3. Quartiles from each half: Q1 = 74, Q3 = 89, so IQR = 15.
  4. Sample standard deviation: s = √(3739/36) ≈ 10.19.
Answer: s ≈ 10.19 points. The mean sits below the median because the low score of 62 pulls it down.

Sample or population: which formula?

Use the population formula only when your data contains every member of the group you care about, such as the heights of all 28 students in one class when that class is all you are describing. Use the sample formula when your data stands in for something bigger, such as 28 students measured to estimate the heights of a whole school. In science, surveys and statistics courses the sample formula is the default.

Why n − 1? Deviations are measured from the sample mean, which is by construction the centre of your particular sample. That makes them slightly smaller on average than deviations from the true population mean. Dividing by n − 1 instead of n enlarges the variance just enough to remove that bias. With large samples the two answers are almost identical; with small samples the difference matters.

What a standard deviation tells you

For data that is roughly bell-shaped (normal), the empirical rule gives a quick picture of the spread. It does not apply to strongly skewed data or data with outliers.

  • About 68% of values lie within 1 standard deviation of the mean.
  • About 95% lie within 2 standard deviations.
  • About 99.7% lie within 3 standard deviations.

Standard deviation compared with other measures of spread

Measure What it uses Affected by outliers?
Range Largest minus smallest value Very strongly
Interquartile range (IQR) Q3 − Q1, the middle 50% of the data Hardly
Standard deviation Every value’s distance from the mean Yes, because distances are squared
Variance The square of the standard deviation Yes; it is also in squared units

Common mistakes to avoid

  • Dividing by n when the data is a sample. Calculators label the two buttons σx (population) and sx (sample).
  • Forgetting to square the deviations. Plain deviations always add up to zero.
  • Reporting the variance as if it were the standard deviation. Variance is in squared units (cm², $²).
  • Rounding the mean before computing the deviations, which pushes the error into every later step.
  • Applying the 68–95–99.7 rule to skewed data, such as incomes or waiting times.

Frequently asked questions

Can a standard deviation be negative?
No. It is a square root of an average of squares, so it is always zero or positive. It is zero only when every value is the same.
What is the difference between variance and standard deviation?
The variance is the average squared deviation; the standard deviation is its square root. The standard deviation is in the same units as the data, which makes it easier to interpret.
What happens if I add a constant to every value?
The mean shifts by that constant but the standard deviation does not change, because every distance from the mean stays the same. Multiplying every value by k multiplies the standard deviation by |k|.
Which Excel or Google Sheets function should I use?
STDEV.S (or STDEV) for a sample and STDEV.P for a population. The matching variance functions are VAR.S and VAR.P.
What is a “good” standard deviation?
There is no universal good value; it depends on the scale of the data. The coefficient of variation (standard deviation divided by the mean) helps compare spread between data sets measured on different scales.

Related tools and guides

References

Educational content. Results are computed in your browser with standard double-precision arithmetic; double-check anything with legal, financial, medical, or safety consequences. Spotted an error? Tell us and we will correct it.