Standard deviation calculator

Enter at least two numbers — a list in the first field, or one value in each of the two fields. The result is the population standard deviation σ with divisor n. With 2 and 8 the value is 3. With the list 2, 4, 4, 4, 5, 5, 7, 9 the value is 2. The form does not use n−1 as the primary result.

Input data

Result

Enter at least two numbers, then Calculate.

The primary result is population σ with divisor n. The three-field neighbor always divides by 3. This page accepts a variable-length list or two values in separate fields.

How it works

How σ is computed for 2 and 8
m5
σ²9
σ3

Standard deviation of n numbers is the square root of the population variance. Mean m = (sum of xᵢ)/n, sum of squared deviations SSD divided by n, then the square root. For 2 and 8 the mean is 5, variance is 9, and σ = 3. For the list 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, variance is 4, and σ = 2.

The denominator is n, not n−1. The neighboring three-field page always divides by 3. Here n comes from the list length or from two values in separate fields — the population convention matching this page’s computation.

The first field accepts a list or a single number. The second field completes a pair when the list has one element. For 1 and 1 the result is 0. For 0 and 10 the result is 5. An integer result displays as a plain string; a non-integer uses six decimal places.

The result panel also shows the mean, variance, SSD, n, and a comparison s with divisor n−1. The primary result remains population σ.

2 and 8 give 3. 1 and 1 give 0. The list 2, 4, 4, 4, 5, 5, 7, 9 gives 2. At least two numbers, divide by n.

Formula

m = (Σ xᵢ) / n, σ² = Σ(xᵢ − m)² / n, σ = √σ².

The divisor is n (population). A sample estimator would use n − 1; this page does not do that in the primary result.

Mathematical model: population standard deviation of a finite set (σ, divisor n) — Karl Pearson / Ronald Fisher (variance); NIST measures of scale; Excel STDEV.P.

Theory, scope, and limits

Definition

Standard deviation is the square root of variance. For a finite set of n ≥ 2 numbers, first compute the arithmetic mean m = (Σ xᵢ) / n, then the sum of squared deviations SSD = Σ(xᵢ − m)², then the population variance σ² = SSD / n, and finally σ = √σ². The calculator on this page implements exactly that chain: the divisor is always n (the length of the entered list), never n − 1.

The population-versus-sample distinction matters. The symbol σ with divisor n describes the spread of the whole population (here: all entered values treated as complete). The symbol s with divisor n − 1 (Bessel’s correction) estimates the variance of an unknown population from a sample. This page returns population σ; the result panel also shows s for comparison, but the primary result is always σ with /n.

The result unit matches the data unit: if the values are in meters, σ is also in meters. Variance has a squared unit; the square root restores the original scale.

Historical and conceptual context

Karl Pearson popularized the term “standard deviation” around the turn of the twentieth century; earlier work by Gauss and Legendre on least squares already used sums of squared deviations from the mean. Ronald Fisher cemented variance as a central idea in inference. The NIST/SEMATECH e-Handbook describes measures of scale, including standard deviation, as basic descriptors of spread.

Conceptually, σ measures a typical distance from the mean on the data scale, unlike the range (max − min), which looks only at extremes. The neighboring three-field page always divides by 3; the variance-of-n-numbers page leaves σ² from a list — here you get a variable-length list and the square root at once.

In teaching it helps to name what software actually computes: many spreadsheets and libraries (Excel STDEV.P versus STDEV.S, R sd() with /(n−1), NumPy with a ddof parameter) differ by divisor. This page matches STDEV.P / population with divisor n.

Formal properties

For any x₁…xₙ ∈ ℝ: σ ≥ 0. σ = 0 if and only if all values are equal. Shift: σ(xᵢ + c) = σ(xᵢ). Scale: σ(λxᵢ) = |λ| σ(xᵢ). Order does not change the result, because the formula is symmetric under permutation.

Identity: SSD = Σ xᵢ² − n m². Hence σ² = (Σ xᵢ²)/n − m². The calculator still computes deviations from m directly, by the formula: √(Σ(x − m)² / n).

Relation to the sample estimator: s² = SSD / (n−1) = (n/(n−1)) σ², so s = σ √(n/(n−1)). For 2 and 8: σ = 3 and s = √18 ≈ 4.242641.

Full derivation

Step 1. Enter at least two real numbers (a list in the first field, or one value in each field; period or comma in a fraction).

Step 2. Compute the mean m = (Σ xᵢ) / n.

Step 3. Compute deviations dᵢ = xᵢ − m and SSD = Σ dᵢ².

Step 4. Population variance σ² = SSD / n; deviation σ = √σ² (non-negative root).

Step 5. Example 2 and 8: m = 5; SSD = 9+9 = 18; σ² = 9; σ = 3. Example 1 and 1: SSD = 0, σ = 0. Example 2, 4, 4, 4, 5, 5, 7, 9: m = 5; SSD = 32; σ² = 4; σ = 2. Example 0 and 10: m = 5; SSD = 50; σ² = 25; σ = 5.

Formal correctness follows from the definition of the second central moment for a uniform empirical measure on n points (mass 1/n each). The square root is uniquely defined as a non-negative function.

Special cases

All values equal → σ = 0. Two values a and b: m = (a+b)/2, σ = |a−b|/2. The eight-value list above → σ = 2. The sequence −2, 0, 2, 4: m = 1, SSD = 20, σ² = 5, σ = √5 ≈ 2.236068.

Empty fields do not yield a result — at least two numbers are required. Invalid text shows an error message. Zero is a number: 0 and 0 give σ = 0; 0 and 10 give 5.

This page does not apply weights, does not drop outliers, and does not switch the primary result to divisor n − 1. It is also not the exact three-field calculator — that is the neighbor.

Numerical notes

Computation uses IEEE-754 floating-point arithmetic in the browser (√). For typical school and engineering data the result matches hand calculation after rounding. An integer result (for example 3 or 0) displays without trailing zeros; a non-integer uses six decimal places.

Extremely large |xᵢ| can lose precision when subtracting the mean. Moderate educational scales are fine. The number-line diagram marks the values and m with a dashed line (up to 16 points on the axis).

Related ideas and sources

Related: standard deviation of three numbers (divisor 3), variance of n numbers (σ² from a list), arithmetic mean, range (max − min). The coefficient of variation CV = σ / |m| is not computed on this page.

Sources: NIST/SEMATECH e-Handbook — Measures of Scale; Wikipedia — Standard deviation (population vs sample); MathWorld — Standard Deviation; Excel STDEV.P vs STDEV.S documentation. The tool is educational.

How to use

  1. Enter two numbers, for example 2 and 8, or a list in the first field.
  2. Click Calculate or wait for the live result. The deviation is 3.
  3. Check the panel: σ, mean, variance, SSD, n, and comparison s.
  4. 1 and 1 give 0. The list 2, 4, 4, 4, 5, 5, 7, 9 gives 2.
  5. Exactly three fields live on the neighboring three-number standard deviation page. There the denominator is always 3.

Symbol glossary

For 2 and 8 the mean is 5, variance is 9, and σ = 3.

σ
Population standard deviation. Square root of σ². For 2 and 8 it is 3.
σ²
Population variance SSD/n. For 2 and 8 it is 9.
m
Arithmetic mean (Σ xᵢ)/n. For 2 and 8 it is 5.
SSD
Sum of squared deviations from m. For 2 and 8 it is 18.
n
Number of values. Population divisor. Not n−1.
s
Sample deviation with divisor n−1 — comparison in the panel only, not the primary result.
list
First field: comma, space, or semicolon. With ≥2 elements the second field is ignored.

Examples

Example 1

  • 2
  • 8

3

What is σ with 2 and 8? 3.

Example 2

  • 1
  • 1

0

What is σ with 1 and 1? 0.

Example 3

  • 2, 4, 4, 4, 5, 5, 7, 9

2

What is σ with 2, 4, 4, 4, 5, 5, 7, 9? 2.

Example 4

  • 0
  • 10

5

What is σ with 0 and 10? 5.

Example 5

  • 8
  • 2

3

What is σ with 8 and 2? 3.

Example 6

  • −2, 0, 2, 4

2.236068

What is σ with −2, 0, 2, 4? ≈ 2.236068.

Related calculators

Common questions

What does this calculator compute?

The population standard deviation σ of at least two numbers: mean m, variance σ² = SSD/n, then σ = √σ². For 2 and 8 the result is 3. For the list 2, 4, 4, 4, 5, 5, 7, 9 the result is 2.

Does the calculator divide by n−1?

No. The variance and deviation denominator is n (the count of entered values). That is the population convention (like STDEV.P). A sample estimator with Bessel’s correction (divisor n−1) appears in the panel only for comparison, not as the primary result.

How does σ differ from s?

σ with divisor n describes the spread of the entered list as a population. s with divisor n−1 estimates the variance of an unknown larger population. This page returns σ; for 2 and 8 the sample s would be √18 ≈ 4.242641.

How do I enter a list of numbers?

In the first field enter at least two numbers separated by commas, spaces, or semicolons. When the list has at least two elements, the second field is ignored. Alternatively enter one number in each field.

What do 1 and 1 give?

0. The mean is 1, both deviations are zero, so SSD = 0 and σ = 0. An integer result displays without trailing zeros.

What does the list 2, 4, 4, 4, 5, 5, 7, 9 give?

2. The mean is 5, SSD = 32, population variance 4, square root 2.

How is this different from the three-number standard deviation?

The neighboring page has exactly three fields a, b, c and always divides by 3. Here n comes from the list or from two fields — this is the general population standard deviation calculator, not the three-field calculator.

Where is variance from a list?

On the variance of n numbers page. Here the primary result is the square root — standard deviation σ, not σ² alone.

Does the order of values change the result?

No. The formula is symmetric under permutation. 2 and 8 and 8 and 2 both give 3.

Do the currency and unit settings in the page header affect the result?

No. The currency and unit settings in the page header do not affect this result. 2 and 8 stay 3 regardless of the header label.

How do I calculate standard deviation?

Compute the mean m, the sum of squared deviations from m, divide by n (population), then take the square root. With 2 and 8: m = 5, σ² = 9, σ = 3. With the list 2, 4, 4, 4, 5, 5, 7, 9: σ = 2.

What is σ with 2 and 8?

3. Computation: mean 5, squared deviations 9 + 9 = 18, variance 18/2 = 9, square root 3. For two values σ = |x₁ − x₂|/2.

What is σ for the list 2, 4, 4, 4, 5, 5, 7, 9?

2. That is a classic school example: mean 5, sum of squared deviations 32, population variance 32/8 = 4, σ = 2.

Is the primary result the sample with divisor n−1?

No. The primary result is σ with divisor n. The panel may show a comparative s with n−1 (about 4.24 for 2 and 8), but that does not replace the primary result.

How does this page differ from the three-number standard deviation?

Here a list of any length n ≥ 2 or two fields. The three-number card has exactly three fields and divisor always 3. With three values both models give the same population σ.

The result is population σ with divisor n: for 2 and 8 it is 3. Three fixed fields live on the standard deviation (3 numbers) page.

Knowledge sources

The σ / s definitions and n versus n−1 divisors below come from recognized sources. This page computes population σ (divisor n).

Page Updated November 2, 2026.