Skip to main content

Published: 2026-07-06Last updated: 2026-08-19By Davide Coronese

Standard Deviation and Variance Calculator

Compute the standard deviation, variance, and range of a data set with the option of population or sample statistics.

Local calculation in your browserno data sent — formula in lib/calculators/*.ts + automated tests
Standard Deviation FormulaVerified source
SD = √( Σ (xi - mean)² / n ) (population) | SD = √( Σ (xi - mean)² / (n - 1) ) (sample)

The population version divides by the number of values n; the sample version divides by n - 1 to correct the bias when the data is only a sample of a larger population.

Standard deviation and variance: how spread out numbers are

The mean tells you where a data set is centered, but it says nothing about how spread out the values are. Standard deviation answers that question: it measures the typical distance of values from the mean, in the same unit as the data. A standard deviation calculator computes variance, standard deviation, and range for both population and sample data, the two statistical conventions that differ by one important denominator.

TL;DR

  • Each value's distance from the mean is squared, the squared distances are averaged, and the square root of that average is the standard deviation
  • Standard Deviation Formula: SD = √( Σ (xi - mean)² / n ) (population) | SD = √( Σ (xi - mean)² / (n - 1)
  • Example 1: Population SD of 2, 4, 4, 4, 5, 5, 7, 9

How it works

Each value's distance from the mean is squared, the squared distances are averaged, and the square root of that average is the standard deviation. Squaring removes negative signs so that deviations above and below the mean do not cancel out.

The math

Compute the mean, subtract it from each value and square each difference, sum the squared differences, divide by n (population) or n - 1 (sample) to get the variance, and take the square root for the standard deviation. The range is the difference between the maximum and minimum values.

The population version divides by the number of values n; the sample version divides by n - 1 to correct the bias when the data is only a sample of a larger population.

Examples

Example 1: Population SD of 2, 4, 4, 4, 5, 5, 7, 9

  1. Mean: 40 / 8 = 5
  2. Squared deviations: 9+1+1+1+0+0+4+16 = 32
  3. Variance: 32 / 8 = 4
  4. Standard deviation: √4 = 2

Example 2: Sample SD of the same data

  1. Mean: 5
  2. Sum of squared deviations: 32
  3. Sample variance: 32 / (8 - 1) ≈ 4.571
  4. Sample standard deviation: √4.571 ≈ 2.14

Real-World Uses of Standard Deviation

Quality Control

Manufacturers monitor process variability: a small standard deviation means consistent output, while a large one signals problems.

Investment Risk Assessment

Finance professionals measure return volatility with standard deviation, higher values mean riskier, less predictable assets.

⚠ Common mistakes

  • Using the Wrong Denominator: Decide between population (n) and sample (n - 1) based on whether the data covers the whole group or a sample.
  • Forgetting the Square Root: Variance and standard deviation are different statistics; reporting one as the other confuses the units.
  • Ignoring Units: Standard deviation has the same unit as the data, so it can be compared directly with the mean for context.

FAQ (6)

Should I use population or sample SD?

Use the sample version (n - 1) when your data is a subset of a larger population, which is the common case in surveys and studies.

What does a standard deviation of zero mean?

It means all values in the data set are identical, there is no spread around the mean at all.

Do you save the numbers I type for area, volume or conversions?

Not at all. Every conversion — kg to lbs, area, fraction math — runs locally. No form data is posted anywhere. You can convert 1,500 kg to lbs on a shared computer and walk away knowing nothing was logged.

Will it work without internet in class?

Yes — that's why students like it. Load once on Wi-Fi, then fraction, base-converter or standard deviation work offline in class or in an exam hall without signal. It's just math in JavaScript, no server round-trip.

How accurate are the math results?

We use standard definitions (e.g. 1 kg = 2.20462 lbs, BIPM SI) and double-check edge cases via automated tests. For homework or site measurements it's more than enough, but for certified engineering or lab work, cross-check with the primary standard.

Can I share a calculation with a classmate?

Tap 'Share Link' — it puts the inputs in the URL. Your classmate opens it and sees the same 3/4 → 0.75 → 75% breakdown instantly, without retyping.

Related Calculators

Looking for other tools?Discover our full collection of lightweight offline-ready resources
Back to Dashboard