How to Calculate Standard Deviation and Variance

Learn population vs sample standard deviation, variance formulas, step-by-step calculations, and why spread matters — free online tool.

By Generatr Team

Standard deviation measures how spread out numbers are around their mean. Variance is the square of that idea — average squared distance from the mean — and standard deviation brings the unit back to the same scale as your data.

This guide covers population vs sample formulas, the step-by-step calculation, how variance and standard deviation relate, and when the number actually helps decisions. When you want the arithmetic done from a list, open the free standard deviation calculator and paste your values.

You will need the mean first; refresh mean, median, and mode in the free average calculator and our mean, median, and mode guide.

Free tool

Use the Standard Deviation Calculator now

Open the interactive standard deviation calculator in your browser — free, instant, no signup.

Open Standard Deviation Calculator

What Is Standard Deviation?

Standard deviation (SD) summarizes typical distance from the average. If every value equals the mean, SD is 0. If values swing widely above and below the mean, SD is large.

Intuition with two classes

Class A scores: 78, 80, 82. Mean = 80. Scores hug the mean → small SD.

Class B scores: 60, 80, 100. Mean = 80 too, but spread is much larger → larger SD.

The mean alone hides that story. Reporting mean ± SD (or showing a full distribution) is how you communicate both center and spread.

Units

SD is in the same units as the data: dollars, points, millimeters, seconds. That makes it easier to interpret than variance, which is in squared units.

  • Exam scores in points → SD in points
  • Daily revenue in dollars → SD in dollars
  • Reaction times in ms → SD in ms

Relative spread sometimes uses the coefficient of variation (SD ÷ mean), useful when comparing variables on different scales — a percent-style ratio you can also explore with general percent tools like the percentage calculator.

What Is Variance and How Does It Relate to SD?

Variance is the average of squared deviations from the mean. Square first so positive and negative gaps do not cancel, and so large outliers weigh heavily.

Standard deviation = √variance (non-negative square root).

Why square?

Deviations from the mean always sum to zero. Squaring makes every term ≥ 0 and penalizes big misses more than small ones (a 10-point miss contributes 100 to the sum of squares; a 2-point miss contributes 4).

Population variance (conceptual)

σ² = Σ (xᵢ − μ)² ÷ N

Then σ = √σ².

Sample variance (conceptual)

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

Then s = √s².

You will see the (n − 1) vs N choice explained in the next section — it is the main “which button do I press?” decision on calculators.

Once you have SD, converting a raw value into “how many SDs from the mean” is a z-score: z = (x − mean) / SD. That workflow lives in the free z-score calculator.

When Do You Use Population vs Sample Standard Deviation?

Use population SD (σ) when your data set is the entire group you care about — every student in a 5-person team, every batch in a closed production day you are only describing, every score on a short list you treat as complete.

Use sample SD (s) when your data is a sample used to estimate the spread of a larger population — 30 surveyed customers standing in for all customers, 50 measured parts standing in for a production line.

Why divide by n − 1 for samples?

The sample mean is fitted to the sample, which slightly underestimates average squared distance if you divide by n. Dividing by n − 1 (Bessel’s correction) reduces that bias for variance as an estimator of population variance. Many scientific and business tools default to sample SD for that reason.

ChoiceDivide sum of squares bySymbolTypical use
PopulationNσFull group description
Samplen − 1sEstimate larger population

Same data, two answers

For small n, population and sample SD differ noticeably. For large n, they converge. Always state which one you computed so a reader does not reconcile two “different” SDs that only disagree on the divisor.

Open the free standard deviation calculator and switch population vs sample on the same list to see both.

How Do You Calculate Standard Deviation Step by Step?

Work a full sample example with data: 4, 8, 6, 5, 3.

Step 1 — Mean

Sum = 4 + 8 + 6 + 5 + 3 = 26. n = 5. Mean x̄ = 26 ÷ 5 = 5.2.

Step 2 — Deviations from the mean

  • 4 − 5.2 = −1.2
  • 8 − 5.2 = 2.8
  • 6 − 5.2 = 0.8
  • 5 − 5.2 = −0.2
  • 3 − 5.2 = −2.2

Step 3 — Square each deviation

  • (−1.2)² = 1.44
  • 2.8² = 7.84
  • 0.8² = 0.64
  • (−0.2)² = 0.04
  • (−2.2)² = 4.84

Sum of squares = 1.44 + 7.84 + 0.64 + 0.04 + 4.84 = 14.8.

Step 4 — Variance

Sample variance s² = 14.8 ÷ (5 − 1) = 14.8 ÷ 4 = 3.7.

Population variance σ² = 14.8 ÷ 5 = 2.96.

Step 5 — Standard deviation

Sample SD s = √3.7 ≈ 1.92.

Population SD σ = √2.96 ≈ 1.72.

Hand calculation builds intuition; for long lists, use the online standard deviation calculator so rounding errors do not accumulate across dozens of squared terms.

Why Does Standard Deviation Matter?

SD turns “the numbers look messy” into a single comparable figure.

Practical uses

  • Quality control — process variation around a target; large SD flags inconsistency
  • Investing education — historical return volatility is often discussed with SD (past volatility ≠ future guarantee)
  • Testing and grading — two exams with mean 75 can differ wildly in fairness if one SD is 3 and another is 15
  • Science and A/B tests — effect size and uncertainty depend on spread, not only on means
  • Forecasting error — residual SD summarizes typical prediction miss

Normal distribution rule of thumb

When data are roughly bell-shaped, about 68% of values fall within 1 SD of the mean, about 95% within 2 SDs, and about 99.7% within 3 SDs (empirical rule). Real data can be skewed or heavy-tailed — always plot or inspect before assuming the rule holds tightly.

Chance and event probability are a related but separate toolkit; see the probability guide and free probability calculator for AND/OR style problems rather than dispersion of a numeric list.

How Do You Use an Online Standard Deviation Calculator?

Paste clean numbers and pick the right population/sample mode.

  1. Open the free standard deviation calculator.
  2. Enter your data list (comma- or line-separated, depending on the tool UI).
  3. Confirm you did not include labels, currency symbols, or blank cells as zeros by accident.
  4. Choose population or sample depending on whether the list is a full group or an estimate sample.
  5. Read variance, standard deviation, and mean together.
  6. Scan any step-by-step squared deviations if you are learning or checking homework.
  7. Optionally compute z-scores for individual points once SD is known.
  8. Re-run after removing clear data-entry errors (a misplaced decimal can explode SD).

Data hygiene tips

  • Separate groups before combining (men’s and women’s heights mixed can inflate SD for the wrong question)
  • Document units and sample size n next to the SD you publish
  • For heavily skewed pay data, report median and percentiles alongside mean and SD — see also salary context in the salary guide

What Standard Deviation Mistakes Should You Avoid?

Most errors are definition or data-entry issues, not exotic math.

  • Dividing by n when your field expects n − 1 (or the reverse) without saying so
  • Comparing SDs across different units or scales without standardization or CV
  • Assuming SD describes a skewed set the way it describes a bell curve
  • Including outliers from typos without checking source data
  • Reporting SD without the mean — spread needs a center to interpret
  • Averaging several SD values incorrectly across groups of different sizes without a proper pooled approach

This guide is educational statistics, not professional research or investment advice. For classroom checks, recompute one small set by hand, then trust the calculator on long lists.

Everyday percent and tip math are different skills — if you only need X% of Y, use the percentage guide or tip guide instead of forcing a dispersion formula.

Step-by-Step Instructions

  1. 1Open the free standard deviation calculator on Generatr.
  2. 2Enter each data value carefully (same units throughout).
  3. 3Compute or confirm the mean of the list.
  4. 4Choose population (÷ N) or sample (÷ n − 1) mode for your question.
  5. 5Read the sum of squared deviations, variance, and standard deviation.
  6. 6Interpret SD in the original units (points, dollars, seconds, etc.).
  7. 7Optionally find how many SDs a single value sits from the mean (z-score).
  8. 8Document n, mean, SD type (sample vs population), and units next to any result you share.

Frequently Asked Questions

How do you calculate standard deviation?+

Find the mean, subtract it from each value, square those deviations, average them (÷ N for population or ÷ (n − 1) for sample variance), then take the square root. That square root is the standard deviation.

What is the difference between variance and standard deviation?+

Variance is the average squared deviation from the mean (squared units). Standard deviation is the square root of variance and uses the same units as the data, so it is usually easier to interpret.

Should I use sample or population standard deviation?+

Use population SD when your data is the entire group of interest. Use sample SD (divide by n − 1) when your data is a sample estimating a larger population’s spread. State which one you used.

Why do we divide by n − 1 for sample variance?+

Dividing by n − 1 (Bessel’s correction) reduces bias when sample variance estimates population variance, because the sample mean is estimated from the same data. For pure description of a finite full set, ÷ N is appropriate.

Can standard deviation be negative?+

No. SD is a square root of an average of squares, so it is always ≥ 0. Zero means every value equals the mean.

Is Generatr’s standard deviation calculator free?+

Yes. It runs in your browser so you can compute population or sample SD, variance, and related stats without an account.

Ready to try it yourself?

Use the free Standard Deviation Calculator — no download, no account.

Launch Standard Deviation Calculator