AJ Designer

Standard Deviation Calculator

Sample standard deviation s equals the square root of the sum of squared deviations from the mean divided by n minus one.
6 values
1.
2.
3.
4.
5.
6.

Sample Std Dev (s) =

13.490738

6 values · mean = 18

Show Your Work

s = √( Σ(xᵢ − x̄)² / (n − 1) )
n = 6
x̄ = (4 + 8 + 15 + 16 + 23 + 42) / 6 = 18
Σ(xᵢ − x̄)² = 910
s² = 910 / 5 = 182
s = √(182) ≈ 13.490738
Final answer: s ≈ 13.490738

All Summary Statistics

Mean (x̄)
18
Sample Variance (s²)
182
Population Std Dev (σ)
12.315302
Count (n)
6
Sum (Σxᵢ)
108
Sum of squared deviations
910
Share:

Sample Standard Deviation

Use the sample formula when your data is a subset drawn from a larger population — the (n − 1) divisor (Bessel's correction) adjusts for the downward bias that creeps in when the sample mean stands in for the unknown true population mean. This is the default for almost all real-world reporting: lab replicates, survey responses, A/B test cohorts, and stock-return windows are all samples.

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

Population Standard Deviation

Use the population formula only when you have measured every member of the group with no sampling involved — e.g., the final exam scores of every student in a class, the diameters of every part in a finished batch, or any complete enumeration. Dividing by N (not n − 1) is correct because there is no unobserved population behind the data.

σ = √( Σ(xᵢ − x̄)² / N )

How It Works

Standard deviation measures how far values typically sit from the mean. Subtract the mean from each value, square the deviation (so positive and negative gaps don't cancel), average those squared deviations to get the variance, then take the square root to return to the original units. The sample formula divides the sum of squared deviations by n − 1 instead of n because the sample mean is itself estimated from the same data — using n alone would systematically underestimate the true spread. That (n − 1) divisor is Bessel's correction, and it's the single most-asked-about detail in introductory statistics. The square root at the end converts variance (squared units) back into the same units as the inputs, which is why people quote standard deviation rather than variance when describing real-world spread.

Example Problem

Find the sample and population standard deviation of the classic dataset [4, 8, 15, 16, 23, 42] — six observations.

  1. Sum the values: 4 + 8 + 15 + 16 + 23 + 42 = 108. Compute the mean: x̄ = 108 / 6 = 18.
  2. Subtract the mean and square each deviation: (4 − 18)² = 196, (8 − 18)² = 100, (15 − 18)² = 9, (16 − 18)² = 4, (23 − 18)² = 25, (42 − 18)² = 576.
  3. Sum the squared deviations: Σ(xᵢ − x̄)² = 196 + 100 + 9 + 4 + 25 + 576 = 910.
  4. Population variance: σ² = 910 / 6 ≈ 151.6667. Sample variance: s² = 910 / 5 = 182.
  5. Take square roots: population SD σ = √151.6667 ≈ 12.3153; sample SD s = √182 ≈ 13.4907.
  6. Report the sample SD (≈ 13.49) when the six values are a sample drawn from a larger population; report the population SD (≈ 12.32) when they are the complete dataset.

Note that sample SD is always larger than population SD for the same data — dividing by n − 1 instead of n inflates the result. The gap narrows quickly as n grows: for n = 100 the two differ by only about 0.5%, but for n = 5 the sample SD is roughly 12% larger than the population SD.

Key Concepts

Three ideas are worth pinning down. First, sample vs population: in practice almost every dataset is a sample (you rarely measure an entire population), so the sample formula with (n − 1) is the default. Use the population formula only when you genuinely have the complete set. Second, the 68-95-99.7 rule (the empirical rule): for data that is approximately normally distributed, about 68% of values fall within ±1σ of the mean, about 95% within ±2σ, and about 99.7% within ±3σ. This is a quick mental check for normality and a fast way to spot outliers — any value more than 3σ from the mean is unusual under a normal model. Third, variance vs standard deviation: variance is the average squared deviation (units²); standard deviation is its square root (original units). Variance is the workhorse for statistical theory because it adds cleanly across independent random variables, but SD is the value people quote in reports because its units are interpretable.

Applications

  • Quality control — statistical process control (SPC) charts plot ±3σ limits around the target; values outside indicate a process is out of control.
  • Finance and investing — standard deviation of returns is the standard volatility measure; a higher σ means a wider day-to-day price swing and is the input to the Sharpe ratio and most risk models.
  • Test scoring and grading — IQ tests are standardized so the population has μ = 100 and σ = 15; SAT subject scores use μ = 500 and σ = 100. Z-scores convert raw scores into σ-units.
  • Curving grades — instructors who curve to a normal distribution use ±1σ around the class mean to set B-range boundaries.
  • A/B testing and confidence intervals — standard error (SD ÷ √n) sets the margin of error around a sample mean; the smaller the SD, the tighter the confidence interval.
  • Manufacturing tolerance — process capability indices (Cp, Cpk) divide the specification width by 6σ; a Cpk ≥ 1.33 is considered capable.
  • Climate and weather — daily temperature SD captures local volatility; coastal cities have lower SD than inland cities at the same mean.
  • Sports analytics — standard deviation of game-to-game performance separates consistent players from streaky ones at the same average level.

Common Mistakes

  • Dividing by n instead of n − 1 for sample data — this is the single most common error and produces a slightly under-estimated SD. Always use n − 1 unless you genuinely have the entire population.
  • Forgetting to square the deviations — summing raw (xᵢ − x̄) always equals zero by construction, so squaring is what gives the spread measure its weight. A common student error is to take absolute values instead; that gives mean absolute deviation, not standard deviation.
  • Reporting variance when you meant standard deviation (or vice versa) — variance is in squared units, SD is in original units. If your inputs are dollars, variance is dollars² and SD is dollars; reports almost always want the SD.
  • Using SD on heavily skewed or bimodal data — SD assumes a single-peak, roughly symmetric distribution. For income data, real estate prices, or any heavy-tailed dataset, the median and interquartile range (IQR) describe the spread more honestly than mean ± SD.
  • Comparing SDs across datasets with different means — a SD of 10 means very different things at a mean of 50 (CV = 20%) versus a mean of 5000 (CV = 0.2%). Use the coefficient of variation when comparing spread across different scales.
  • Treating standard deviation as a maximum — values can and do fall outside ±3σ. The 68-95-99.7 rule is a rule of thumb for normal data, not a hard cap.

Frequently Asked Questions

What is standard deviation?

Standard deviation measures how spread out a set of numbers is around their mean. A small SD means values cluster tightly near the average; a large SD means they're scattered widely. It's reported in the same units as the data (dollars, inches, °C, etc.), which makes it the most-quoted descriptive statistic for spread alongside the mean.

How do you calculate standard deviation?

First compute the mean (sum ÷ count). Then subtract the mean from each value and square the result — this is the squared deviation. Sum all squared deviations, divide by either n (for a population) or n − 1 (for a sample) to get the variance, then take the square root. The square root is the standard deviation; the value before the square root is the variance.

What's the difference between population and sample standard deviation?

Population SD (σ) divides the sum of squared deviations by N — the total population size — and assumes you've measured every member. Sample SD (s) divides by n − 1, where n is the sample size, and assumes the data is a subset drawn from a larger unknown population. In practice you almost always have a sample, so the sample formula is the default in research, business, and lab work.

Why divide by n − 1 instead of n for sample standard deviation?

The sample mean is itself estimated from the same data used to compute deviations, which makes the squared deviations slightly smaller than they would be against the true unknown population mean. Dividing by n − 1 (Bessel's correction) compensates for that downward bias and produces an unbiased estimator of the population variance. The intuition: with n data points, you've already 'used up' one degree of freedom estimating the mean, leaving only n − 1 independent deviations.

What is a good standard deviation?

There is no universal good value — it depends entirely on context and on the mean. A SD of 0.1 °C is huge for body-temperature measurements but tiny for daily outdoor temperatures. The coefficient of variation (SD ÷ mean × 100%) is unit-free and lets you compare spread across different scales: CV under 10% is generally considered low, 10–30% moderate, and above 30% high for most natural processes.

What is the 68-95-99.7 rule?

Also called the empirical rule, it states that for data that is approximately normally distributed, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. It's a quick mental shortcut for spotting outliers and judging how spread out data is — a value more than 3σ from the mean is unusual under a normal model.

How is standard deviation related to variance?

Variance is the average squared deviation from the mean; standard deviation is the square root of the variance. They convey the same information about spread, but SD is in the original units of the data while variance is in squared units. Variance is the standard tool for statistical theory (it adds cleanly across independent variables); SD is what gets reported because the units are interpretable.

When should I use SD versus the interquartile range?

Standard deviation works well for roughly symmetric, single-peak distributions — most lab measurements, test scores, and physical processes. For skewed data (income, real estate prices, response times) or data with extreme outliers, the interquartile range (Q3 − Q1) and median are more robust because they ignore the tails. A rule of thumb: if the mean and median differ noticeably, prefer the IQR.

Reference: Standard formulas as defined in NIST/SEMATECH e-Handbook of Statistical Methods (§1.3.5.6, descriptive statistics) and Casella & Berger, Statistical Inference (2nd ed.), §7.3.1 (Bessel's correction). The empirical 68-95-99.7 rule is exact for a Gaussian distribution.

Standard Deviation Formulas

Standard deviation is the square root of variance. Both forms share the same numerator — the sum of squared deviations from the mean — and differ only in the divisor:

x̄ = Σxᵢ / n
s = √( Σ(xᵢ − x̄)² / (n − 1) )
σ = √( Σ(xᵢ − x̄)² / N )

Where:

  • xᵢ — each value in the dataset
  • — the arithmetic mean
  • n, N — sample size (n) or full population size (N)
  • s — sample standard deviation (divides by n − 1, Bessel's correction)
  • σ — population standard deviation (divides by N)

The shaded band shows the 68% of values that fall within one standard deviation of the mean under a normal distribution; the wider bracket covers ±2σ (≈95%), and the full curve to ±3σ covers ≈99.7%. This is the 68-95-99.7 empirical rule, the fastest way to translate a standard-deviation number into intuition about spread.

Worked Examples

Lab Research — Replicate Measurements

How do you report the spread of five replicate plate readings?

A microbiology lab measures the optical density of five replicate culture plates: 0.412, 0.418, 0.405, 0.421, 0.409. Report the mean and sample standard deviation.

  • Sum = 2.065, n = 5 → x̄ = 2.065 / 5 = 0.413
  • Squared deviations: (0.412−0.413)² = 1e-6, (0.418−0.413)² = 2.5e-5, (0.405−0.413)² = 6.4e-5, (0.421−0.413)² = 6.4e-5, (0.409−0.413)² = 1.6e-5
  • Σ(xᵢ − x̄)² = 1.7e-4
  • s = √(1.7e-4 / 4) ≈ 0.00652

Mean ≈ 0.413 OD, s ≈ 0.0065 OD

Report as 0.413 ± 0.007 OD (1 SD). The five plates are a sample representing the underlying biological replicate distribution, so the sample formula with n − 1 is correct.

Finance — Monthly Return Volatility

How volatile is a portfolio's monthly return?

A balanced index fund's monthly returns over six months (%): 1.8, −0.6, 2.4, 0.5, −1.2, 1.1. Find the mean return and sample standard deviation as a volatility proxy.

  • Sum = 4.0, n = 6 → x̄ = 0.667%
  • Σ(xᵢ − x̄)² ≈ 10.13
  • s² = 10.13 / 5 ≈ 2.027
  • s = √2.027 ≈ 1.42%

Mean ≈ 0.67%, monthly volatility s ≈ 1.42%

Annualize by multiplying by √12 ≈ 3.46, giving annual volatility ≈ 4.93%. Most managed funds report annualized volatility this way for cross-fund comparison.

Quality Control — Complete-Batch Inspection

How tight is a finished batch of machined parts?

Every part in a batch of eight precision washers is measured for thickness (mm): 2.51, 2.49, 2.50, 2.52, 2.48, 2.50, 2.51, 2.49. Because every washer in the batch was measured, treat it as a complete population.

  • Sum = 20.00, N = 8 → μ = 2.50 mm
  • Squared deviations: 0.0001, 0.0001, 0, 0.0004, 0.0004, 0, 0.0001, 0.0001
  • Σ(xᵢ − μ)² = 0.0012
  • σ² = 0.0012 / 8 = 0.00015
  • σ = √0.00015 ≈ 0.0122 mm

Mean = 2.50 mm, σ ≈ 0.012 mm

For a ±0.05 mm tolerance, the process capability index Cpk = 0.05 / (3σ) ≈ 1.37 — comfortably above the 1.33 threshold considered capable. Use the population formula here because every washer in the batch was measured; there's no larger unobserved population.

Related Calculators

Related Sites