Standard Deviation Calculator

Compute standard deviation and variance for population or sample datasets instantly.

Results

Count (N) -
Sum -
Mean -
Variance -
Standard Deviation -
Min -
Max -

Formula Used:

-

About the Standard Deviation Calculator

This free standard deviation calculator computes the mean, variance, and standard deviation of any comma-separated dataset, for either a full population (divide by n) or a sample (divide by n − 1). It also reports the count, sum, minimum, and maximum, plus the exact formula applied.

What is Standard Deviation?

Standard deviation measures how spread out the values in a dataset are around their mean. A low standard deviation means the data points cluster tightly around the average; a high one means they are scattered over a wider range. Because it is expressed in the same units as the original data, standard deviation is usually easier to interpret than variance, which is stated in squared units.

How to Use

Paste your dataset as comma-separated numbers, choose "Sample (n − 1)" if your data is a subset of a larger group or "Population (n)" if it contains every member, and click Calculate. The tool returns the count, sum, mean, variance, standard deviation, minimum, and maximum, along with the formula applied. For median and mode, try our mean, median, and mode calculator.

Standard Deviation Formulas

Population Standard Deviation

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

  • σ (sigma) — the population standard deviation
  • xᵢ — each individual value in the dataset
  • μ (mu) — the population mean
  • N — the total number of values in the population
  • Σ — the sum of the squared deviations

Sample Standard Deviation

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

  • s — the sample standard deviation
  • xᵢ — each individual value in the sample
  • x̄ (x-bar) — the sample mean
  • n — the number of values in the sample
  • n − 1 — Bessel's correction, which corrects a sample's tendency to understate the true spread

Both formulas follow the same steps: find the mean, subtract it from every value, square the differences, add them up, divide by N or n − 1, and take the square root. Squaring keeps positive and negative deviations from canceling out, and the final root restores the original units.

Worked Example, Step by Step

Take the classic dataset 2, 4, 4, 4, 5, 5, 7, 9, whose mean is 40 ÷ 8 = 5. The table shows each value, its deviation from the mean, and the squared deviation.

Value (x)Deviation (x − 5)Squared deviation (x − 5)²
2−39
4−11
4−11
4−11
500
500
724
9416
Sum: 40032

The squared deviations add up to 32. From there, the two formulas differ only in the denominator:

  • Population: σ = √(32 / 8) = √4 = 2 exactly.
  • Sample: s = √(32 / 7) ≈ √4.5714 ≈ 2.1381.

Paste the same eight numbers into the calculator above: it displays 2.0000 for the population and 2.1381 for the sample — the sample result is always slightly larger because of the smaller denominator.

The Empirical Rule (68–95–99.7)

For data that follows a roughly normal (bell-shaped) distribution, standard deviation has a handy interpretation known as the empirical rule:

  • About 68% of values fall within 1 standard deviation of the mean (μ ± σ).
  • About 95% of values fall within 2 standard deviations (μ ± 2σ).
  • About 99.7% of values fall within 3 standard deviations (μ ± 3σ).

A classic example is IQ-style test scores, scaled to a mean of μ = 100 and a standard deviation of σ = 15: roughly 68% of scores land between 85 and 115, about 95% between 70 and 130, and 99.7% — nearly all — between 55 and 145. To express any individual score as a number of standard deviations from the mean, use our z-score calculator.

Variance and Coefficient of Variation

Variance is simply the standard deviation before the final square root: σ² for a population, s² for a sample. In the worked example, the population variance is 4 and the sample variance is about 4.5714. Variance appears throughout statistics — ANOVA, regression, probability theory — but its squared units make standard deviation the more intuitive measure to report.

The coefficient of variation (CV) expresses spread in relative terms: CV = (σ / μ) × 100%. For our dataset the population CV is 2 / 5 = 40% and the sample CV is 2.1381 / 5 ≈ 42.8%. Being dimensionless, the CV is the right tool for comparing variability across datasets with different units or very different means.

Sample vs. Population: Which Should You Use?

Ask one question: does my dataset contain every member of the group I care about, or only some of them?

  • Use the population formula (÷ N) when the data is complete: the test scores of one class, the ages of every employee in a company, or the heights of every player on a roster — you are describing that exact group, not generalizing beyond it.
  • Use the sample formula (÷ n − 1) when the data is a subset used to estimate a larger whole: a poll of 1,000 voters or measurements from 30 manufactured parts. Dividing by n − 1 makes the sample variance an unbiased estimator of the population variance; dividing by n would systematically underestimate it.

When in doubt, most real-world data is a sample, so the sample formula is the safer default. As n grows large the difference becomes negligible: at n = 1,000 the two results differ by only about 0.05%.

Frequently Asked Questions

What is the difference between sample and population standard deviation?

Population standard deviation divides by N and applies when your data includes every member of the group you are describing. Sample standard deviation divides by n − 1 (Bessel's correction) and applies when your data is a subset of a larger population, because dividing by n alone would systematically underestimate the true spread.

What formula does this calculator use?

For a population it uses σ = √(Σ(x − μ)² / N), and for a sample it uses s = √(Σ(x − x̄)² / (n − 1)). The formula, with your numbers substituted in, is displayed alongside every result.

Why does the sample formula divide by n − 1 instead of n?

A sample's deviations are measured from the sample mean, which is fitted to the sample itself, so the plain average of the squared deviations slightly understates the population's variability. Dividing by n − 1 instead of n makes the sample variance an unbiased estimator of the population variance. This adjustment is called Bessel's correction.

What is the empirical rule?

For data that follows a roughly normal, bell-shaped distribution, about 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. For example, with a mean of 100 and a standard deviation of 15, roughly 68% of values lie between 85 and 115.

Can I use spaces in the dataset?

Yes. Spaces around commas are ignored, so you can format your data naturally, for example: 2, 4, 4, 4, 5, 5, 7, 9.

Is this calculator free?

Yes, BestCalc's standard deviation calculator is completely free with no ads or registration required, and all calculations run locally in your browser.