Education & Study

Standard deviation calculator

Standard deviation, variance, mean, median and quartiles of a data list.

  • Instant
  • Free
  • Private (processed locally)
  • No sign-up
Values read: 0

Separate values with commas, spaces, semicolons or line breaks. A column copied from Excel or Google Sheets works as is (“1,5; 2,5” is read as decimals).

ℹ️ Pick “Sample” when your data is a subset of a larger group (the usual case) and “Population” when you have every value. 100% local: nothing is sent.

What is standard deviation?

Two classes can share the same average of 72% and still look nothing alike: in one, every score is close to 72; in the other, scores run from 30 to 98. The mean says nothing about that spread; the standard deviation measures it. It is the square root of the variance, which is (almost exactly) the average of the squared distances from the mean, so it tells you how far values typically sit from the mean, in the same unit as your data (points, centimeters, dollars, seconds).

This calculator returns the full set of descriptive statistics in one go: count, sum, mean, median, mode, minimum, maximum, range, quartiles, interquartile range, variance and standard deviation (both the population σ and the sample s versions), coefficient of variation and standard error. It is built for high-school and AP Statistics students, college courses in psychology, biology or economics, teachers analyzing a test, quality engineers and researchers.

  1. Paste or type your data

    In the “Your data” box, enter numbers separated by commas, spaces, semicolons or line breaks, or paste a column straight from Excel. The “Values read” counter confirms what was understood.

  2. Choose Sample or Population

    “Sample (n − 1)”, selected by default, fits data that is a subset; “Population (n)” fits data that covers the whole group. The headline result and the coefficient of variation follow this choice.

  3. Read the statistics

    The standard deviation is shown in large type with its variance, followed by every other measure in the grid; the box plot shows the values, median, quartiles, mean and the ± 1 SD band.

  4. Check the working and copy

    Open “Step-by-step calculation” to see every deviation from the mean and its square, then use “Copy” or “Copy all” to take the results with you.

How to calculate variance and standard deviation

First compute the mean x̄ = Σx ÷ n, then the sum of squared deviations SS = Σ(x − x̄)². The population variance is σ² = SS ÷ n and the sample variance is s² = SS ÷ (n − 1). The standard deviation is the square root of the variance: σ = √σ² and s = √s².

With 2, 4, 4, 4, 5, 5, 7, 9: x̄ = 40 ÷ 8 = 5, the deviations are −3, −1, −1, −1, 0, 0, 2 and 4, their squares 9, 1, 1, 1, 0, 0, 4 and 16, so SS = 32, σ² = 32 ÷ 8 = 4, σ = 2, s² = 32 ÷ 7 ≈ 4.571429 and s ≈ 2.13809.

  • x: each value in the data set; n: the number of values (the count).
  • x̄ (“x-bar”): the arithmetic mean; Σ (capital sigma): “the sum of”.
  • x − x̄: a value’s deviation from the mean; deviations always add up to 0, which is why they are squared.
  • σ² and σ: population variance and standard deviation (divide by n), Excel’s VAR.P and STDEV.P.
  • s² and s: sample variance and standard deviation (divide by n − 1, Bessel’s correction), Excel’s VAR.S and STDEV.S.
  • Q1, Q3: first and third quartiles, by inclusive linear interpolation (QUARTILE.INC); IQR = Q3 − Q1.
  • CV = s ÷ |x̄| × 100 (σ in population mode) and standard error = s ÷ √n.

Standard deviation examples

Every row below was produced by the calculator above and is rounded exactly as on screen (at most 6 decimal places).

DatanMean x̄Medians (n − 1)σ (n)
2, 4, 4, 4, 5, 5, 7, 9854.52.138092
10, 12, 23, 23, 16, 23, 21, 1681818.55.2372294.898979
1,5; 2,5; 3,5 (decimal commas)32.52.510.816497
12, 15, 9, 18, 11513123.5355343.162278
−3, 0, 2, 5, 15112.9154762.607681
7177n/a0

First series: mode 4 (frequency 3), Q1 = 4, Q3 = 5.5, range 7, CV 42.76%.

Where standard deviation is used

  • Grades and tests: compare how consistent two classes with the same average are, or spot an exam that spread students too widely.
  • Science labs: report repeated measurements as x̄ ± s, or as x̄ ± s ÷ √n (the standard error) when the precision of the mean is what matters.
  • Quality control: track the spread of a machined dimension and set control limits at x̄ ± 3σ, as on a Shewhart control chart.
  • Finance: the volatility of a stock or fund is the standard deviation of its returns, usually annualized.
  • Sport, health and weather: consistency of your running times, blood-glucose variability, swings in daily temperatures.

Common mistakes

  • Using σ (divide by n) for a sample: the spread is underestimated, especially when n is small.
  • Rounding the mean too early: if x̄ is rounded before the deviations are squared, the error enters every term, so keep full precision until the last step.
  • Confusing standard deviation with standard error: the first describes the data, the second the precision of the mean, and it shrinks as n grows.
  • Comparing variances as if they were standard deviations: variance is in squared units (cm², $²); only the standard deviation reads in the data’s own unit.
  • Pasting numbers with thousands separators (“1,234.5” or “1 234,5”): they are split into several values, so remove the thousands separators first.

Everything is computed locally in your browser: no data is sent or stored. Results are rounded to 6 decimal places (6 significant digits for values below 1) from double-precision arithmetic (about 15 significant digits); quartiles follow the QUARTILE.INC convention, so some textbooks may give slightly different values. With a single value, the sample standard deviation is undefined.

Frequently asked questions

Sample or population standard deviation: which should I use?

Use the sample standard deviation s (divide by n − 1) when your numbers are a subset of a bigger group, such as 30 students out of a whole school or 20 parts pulled from a production run. Use the population standard deviation σ (divide by n) only when you have every member of the group you care about. For 2, 4, 4, 4, 5, 5, 7, 9 you get s ≈ 2.13809 and σ = 2.

Why divide by n − 1 instead of n?

This is Bessel’s correction. The mean x̄ is computed from the same data, and the sum of squared deviations from x̄ is never larger than the sum of squared deviations from the true population mean, so dividing by n would underestimate the variance. Because deviations from x̄ always add up to 0, only n − 1 of them are free to vary (the degrees of freedom). Dividing by n − 1 makes the variance unbiased; with 8 values it scales the variance by 8/7 ≈ 1.143, turning 4 into 4.571429. The standard deviation s, its square root, keeps a very slight bias, but it is the standard estimator everywhere.

How do I interpret a standard deviation?

It is the typical distance between a value and the mean, in the same unit as your data: the bigger it is, the more spread out the values are. For roughly bell-shaped (normal) data, about 68% of values lie within 1 SD of the mean, 95% within 2 SD and 99.7% within 3 SD. IQ scores, with a mean of 100 and an SD of 15, therefore fall between 85 and 115 for about two people in three.

How do I calculate standard deviation in Excel or on a calculator?

In Excel or Google Sheets, use =STDEV.S(A2:A21) for a sample (s) and =STDEV.P(A2:A21) for a whole population (σ); the matching variances are VAR.S and VAR.P. On a TI-84 or a Casio, Sx (or sx) is the sample SD and σx the population SD. To double-check, paste the column here: one value per line, or values separated by commas, spaces, tabs or semicolons, all work. Decimal commas are recognized when values are separated by semicolons, spaces or line breaks, so “1,5; 2,5; 3,5” gives 1.5, 2.5 and 3.5 (mean 2.5, s = 1), while “1,2,3” gives three values.

Which quartile method does the calculator use?

The inclusive linear-interpolation method, identical to Excel’s QUARTILE.INC and NumPy’s default: Q1 sits at position 1 + 0.25 × (n − 1) in the sorted list and Q3 at position 1 + 0.75 × (n − 1). For 2, 4, 4, 4, 5, 5, 7, 9 that gives Q1 = 4 and Q3 = 5.5. Many textbooks and the TI-84 instead take the median of each half (Q3 = 6 here), and QUARTILE.EXC gives 6.5, so small differences between tools are normal.

What are the coefficient of variation and the standard error?

The coefficient of variation (CV = SD ÷ |mean| × 100) expresses spread as a percentage, which lets you compare series with different units or scales: for the example data (mean 5, s ≈ 2.13809), CV = 2.13809 ÷ 5 ≈ 42.76%. The standard error of the mean (s ÷ √n) measures how precisely the mean itself is known: 2.13809 ÷ √8 ≈ 0.755929. The CV is not shown when the mean is 0, because it would be meaningless.