CalcFolio

Standard Deviation Calculator

Paste a list of numbers and this standard deviation calculator tells you how widely the values are spread around their mean. Choose whether your data is a sample or the whole population, and you get the standard deviation, variance, mean, count, sum, standard error of the mean and coefficient of variation in one step. It works for test scores, measurements, prices or any other numeric data.

Updated

Separate values with commas, spaces or line breaks

Sample divides by n − 1, population by n

How to use the calculator

  1. Enter your data separated by commas, spaces or line breaks, for example 4, 8, 6, 5, 3, 7, 9. You can paste a column from a spreadsheet.
  2. Use a period for decimals and skip thousands separators: write 1250.5, not 1,250.5.
  3. Pick sample or population. Choose sample when your numbers are a subset used to describe a larger group (a survey, a batch of test parts, a few weeks of data). Choose population only when you have every member of the group you care about.
  4. Read the results. The standard deviation appears first, followed by the variance, mean, count, sum and standard error. The coefficient of variation is shown only when the mean is not zero.

A sample needs at least two values; the list can hold up to 10,000.

Formulas and method

The standard deviation is the square root of the variance, and the variance is the average squared distance from the mean:

  • Population: σ² = Σ(xᵢ − μ)² ÷ n and σ = √σ²
  • Sample: s² = Σ(xᵢ − x̄)² ÷ (n − 1) and s = √s²

Dividing by n − 1 instead of n (Bessel's correction) makes the sample variance an unbiased estimate of the population variance. A sample's mean is always closer to its own values than the true population mean is, so dividing by n would understate the spread.

The standard error of the mean is SD ÷ √n. It measures how precisely the mean is estimated, not how spread out the individual values are, and it shrinks as you collect more data. The coefficient of variation is SD ÷ |mean| × 100%, a unit-free measure of relative spread.

Behind the scenes the calculator uses Welford's algorithm, which updates the mean and the sum of squared deviations one value at a time. That avoids the rounding errors of the shortcut formula Σx² − (Σx)²/n, which can lose precision when the values are large and close together.

Examples

1. Sample versus population

For the values 4, 8, 6, 5, 3, 7 and 9, the mean is 6 and the sum is 42. Treated as a sample, the variance is 4.67 and the standard deviation is 2.16, with a standard error of 0.82 and a coefficient of variation of 36.00%. Treated as a population, the variance is exactly 4 and the standard deviation exactly 2.

2. Same average, very different spread

Two small study groups each average 80 points on a quiz. Group A scored 78, 80, 82, 79 and 81; group B scored 60, 95, 70, 100 and 75. Using the population setting, because these are the complete groups:

GroupMeanVarianceStd. deviationCV
A8021.411.77%
B8023015.1718.96%

The mean alone hides the fact that group B is far less consistent.

3. A week of high temperatures

Daily highs of 68, 72, 75, 71, 69, 80 and 77 °F, treated as a sample of the season, give a mean of 73.14 °F and a standard deviation of 4.38 °F, with a standard error of 1.65 °F.

How to read the results

The standard deviation is expressed in the same unit as your data, which makes it easier to interpret than the variance (squared units). For data that is roughly bell-shaped, about 68% of values fall within one standard deviation of the mean and about 95% within two. For skewed data or data with outliers, that rule of thumb does not hold.

Use the coefficient of variation only for data measured on a scale with a true zero, such as weights, prices or times. For temperatures in °F or °C it is meaningless, because the zero point is arbitrary and the CV would change if you switched units.

Frequently asked questions

Should I use sample or population standard deviation?

Use the sample version (n − 1) whenever your data is a subset and you want to say something about a larger group, which is the usual case in research, surveys and quality control. Use the population version (n) only when the list contains every value you are interested in, such as all employees of a small company.

What is the difference between variance and standard deviation?

The variance is the average squared deviation from the mean; the standard deviation is its square root. Both describe spread, but the standard deviation is in the original units, so a standard deviation of 4.38 °F is easier to picture than a variance of 19.14 °F².

Is the standard error the same as the standard deviation?

No. The standard deviation describes how much individual values vary. The standard error, SD ÷ √n, describes how much the sample mean would vary from sample to sample. Error bars on charts may show either one, so check the caption.

Why don't I see the coefficient of variation?

The CV divides by the mean. When the mean is exactly zero the ratio is undefined, so the calculator hides it.

Which spreadsheet functions match these results?

In Excel and Google Sheets, STDEV.S and VAR.S correspond to the sample setting, while STDEV.P and VAR.P correspond to the population setting.

Sources

  1. NIST/SEMATECH e-Handbook of Statistical Methods — Measures of Scale
  2. Wolfram MathWorld — Standard Deviation
  3. Wolfram MathWorld — Sample Variance
  4. Wolfram MathWorld — Standard Error
  5. Khan Academy — Variance and standard deviation of a population

Results are calculated from the values you enter and are provided for general information. For research, quality control or regulatory reporting, confirm which estimator and rounding rules your method requires.