Standard Deviation Calculator

Paste a list of numbers into this standard deviation calculator to get the sample or population standard deviation, the variance and the mean, with every deviation worked out in a table.

Standard Deviation Calculator inputs

Separate numbers with commas, spaces or new lines. Don’t use thousands separators.

Choose population only when the list contains every member of the group you care about.

Result

Enter your values to see the result.

  • Formula v1.0, unit-tested
  • Examples generated by the calculator
  • Updated
  • How we calculate
On this page

Formula

s = √(Σ(x − x̄)² ÷ (n − 1)); σ = √(Σ(x − μ)² ÷ N)

s, σ
the sample and population standard deviation
x
each value in the data set
x̄, μ
the mean of the sample or population (sum ÷ count)
n, N
the number of values
Σ(x − x̄)²
the sum of squared deviations from the mean

What standard deviation measures

The standard deviation describes how far values typically sit from their mean. A small value means the data is tightly bunched; a large one means it’s spread out. Two classes can both average 75 on a test, but if one class has a standard deviation of 3 and the other 15, the second class has far more students at the extremes.

The variance is the same idea before the square root is taken: the average squared distance from the mean. The standard deviation calculator reports both, together with the mean, the count and the sum of squared deviations.

How to use the calculator

  1. Paste or type your numbers. Commas, spaces and line breaks all work, so a column copied from a spreadsheet is fine.
  2. Choose Sample if the list is a subset of a larger group, or Population if it’s the complete group.
  3. Read the standard deviation at the top. The other formula’s result appears below it, so you can compare s and σ without switching.
  4. Open the table to see each value’s deviation from the mean and its square. The last row totals the columns.

How to calculate standard deviation by hand

Take six measurements: 9, 2, 5, 4, 12 and 7.

  1. Find the mean. The sum is 39, and 39 ÷ 6 = 6.5.
  2. Subtract the mean from each value. The deviations are 2.5, −4.5, −1.5, −2.5, 5.5 and 0.5. They always add up to 0, which is a handy check.
  3. Square each deviation. That gives 6.25, 20.25, 2.25, 6.25, 30.25 and 0.25.
  4. Add the squares. The sum of squared deviations is 65.5.
  5. Divide. For a sample, divide by n − 1 = 5 to get a variance of 13.1. For a population, divide by N = 6 to get 10.916667.
  6. Take the square root. The sample standard deviation is √13.1 ≈ 3.619392. The population standard deviation is ≈ 3.304038.

The only difference between the two formulas is the divisor in step 5, which matters most for small data sets. With six values the sample result is about 9.5% larger. With 1,000 values the gap shrinks to 0.05%.

Sample vs. population standard deviation

Sample (s) Population (σ)
Use when The data is part of a larger group The data is the entire group
Divide squared deviations by n − 1 N
Mean symbol x̄ μ
Excel / Google Sheets STDEV.S, VAR.S STDEV.P, VAR.P
Example 40 bolts tested from a day’s production Every bolt in a 40-bolt custom order

Most real-world data is a sample: survey responses, lab measurements, a month of sales used to judge the whole year. Population data is less common than people assume.

Interpreting the result

For data that is roughly bell-shaped, the 68–95–99.7 rule gives a quick feel for the standard deviation. About 68% of values fall within one standard deviation of the mean, about 95% within two, and about 99.7% within three. If adult heights in a group average 66 inches with a standard deviation of 4 inches, roughly two-thirds are between 62 and 70 inches.

To place a single value on that scale, convert it to a z-score with the z-score calculator. It divides the value’s distance from the mean by the standard deviation and gives the matching percentile.

The rule doesn’t hold for skewed data such as incomes or waiting times. For those, the percentile calculator describes spread more honestly, for example with the 25th and 75th percentiles.

Real-life uses

  • Quality control. Manufacturers track the standard deviation of part dimensions. A rising value signals a machine drifting out of tolerance even when the mean looks fine.
  • Investing. The standard deviation of returns is the usual measure of an investment’s volatility.
  • Education. Standardized tests report scores relative to a mean and standard deviation so results from different years can be compared.
  • Science and medicine. Lab results are reported as mean ± standard deviation, and the standard error of the mean (also shown) feeds into confidence intervals.
  • Sports and fitness. A runner with a low standard deviation in lap times is pacing evenly.

Common mistakes

  • Using the wrong formula. Choosing population for a sample understates the spread, especially with fewer than 30 values.
  • Rounding the mean too early. Rounding 6.5 to 7 before squaring the deviations distorts the result. Keep full precision until the end.
  • Forgetting to square. The plain deviations always sum to 0, which is why they’re squared before averaging.
  • Mixing up variance and standard deviation. The variance is in squared units. Report the standard deviation when you want a number in the data’s own units.
  • Including totals or labels in the paste. A “Total” row copied from a spreadsheet becomes an outlier and inflates the result.

Glossary

  • Deviation: a value minus the mean.
  • Sum of squares: Σ(x − x̄)², the total of the squared deviations.
  • Bessel’s correction: dividing by n − 1 instead of n for a sample.
  • Standard error of the mean: s ÷ √n, how much the sample mean itself would vary from sample to sample.

For the mean, median and mode of the same list, use the average calculator.

Worked examples

Sample standard deviation of quiz scores

Six quiz scores out of 10 from one class section, treated as a sample of all students.

Inputs: Data values = 4, 8, 6, 5, 3, 7; Your data is a = Sample (divide by n − 1)

x̄ = 33 ÷ 6 = 5.5 Σ(x − x̄)² = 17.5 s² = 17.5 ÷ (6 − 1) = 17.5 ÷ 5 = 3.5 s = √3.5 = 1.870829

Answer: Sample standard deviation s = 1.870829 (variance 3.5, mean 5.5, n = 6).

Population standard deviation of a full data set

Daily customer complaints over every day of an 8-day promotion, so the list is the whole population.

Inputs: Data values = 2, 4, 4, 4, 5, 5, 7, 9; Your data is a = Population (divide by N)

μ = 40 ÷ 8 = 5 Σ(x − μ)² = 32 σ² = 32 ÷ 8 = 4 σ = √4 = 2

Answer: Population standard deviation σ = 2 (variance 4, mean 5, n = 8).

Values that are all the same

Edge case: three identical measurements have no spread, so the standard deviation is 0.

Inputs: Data values = 12.5, 12.5, 12.5; Your data is a = Sample (divide by n − 1)

x̄ = 37.5 ÷ 3 = 12.5 Σ(x − x̄)² = 0 s² = 0 ÷ (3 − 1) = 0 ÷ 2 = 0 s = √0 = 0

Answer: Sample standard deviation s = 0 (variance 0, mean 12.5, n = 3).

Assumptions and limitations

  • Separate values with commas, spaces, semicolons or new lines. Up to 10,000 values are accepted, including negatives and decimals. Don't use thousands separators.
  • Sample mode divides the sum of squared deviations by n − 1 (Bessel's correction), the same as Excel STDEV.S. Population mode divides by N, the same as STDEV.P.
  • A sample needs at least two values. A population can be a single value, whose standard deviation is 0.
  • The mean is subtracted first and the squared deviations are then added (the two-pass method), which avoids the rounding errors of the shortcut formula Σx² − n·x̄².
  • Results are shown to up to 6 decimal places. The deviation table lists the first 200 values; its totals and every result use all values.
  • The standard error of the mean is the sample standard deviation divided by √n.

Frequently asked questions

Should I use the sample or population standard deviation?

Use the population formula only when your list includes every member of the group you're describing, such as all employees of one small company. If the numbers are a subset used to estimate a larger group, such as 30 customers out of thousands, use the sample formula. When in doubt, sample is the usual choice.

Why does the sample standard deviation divide by n − 1?

A sample's values sit closer to their own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1, called Bessel's correction, makes the sample variance an unbiased estimate of the population variance.

What is the difference between variance and standard deviation?

Variance is the average squared deviation from the mean, so it's in squared units such as dollars squared. The standard deviation is the square root of the variance, which puts it back in the original units and makes it easier to interpret.

Can the standard deviation be negative?

No. It's the square root of an average of squared numbers, so it's always 0 or positive. It's 0 only when every value is identical.

What counts as a high standard deviation?

It depends on the mean and the units. A standard deviation of 5 is large for test scores averaging 20 but small for incomes averaging 50,000. Dividing the standard deviation by the mean gives the coefficient of variation, which lets you compare spread across data sets.

How do I find the standard deviation in Excel or Google Sheets?

Use =STDEV.S(range) for a sample and =STDEV.P(range) for a population. This calculator matches both, and also shows each deviation so you can check the working.

Sources

  1. Measures of Scale (NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6) — National Institute of Standards and Technology. Checked October 12, 2026.
  2. 2.7 Measures of the Spread of the Data (Introductory Statistics 2e) — OpenStax, Rice University. Checked October 12, 2026.
  3. STDEV.S function — Microsoft Support. Checked October 12, 2026.

Z-Score Calculator

Z-score from a value, mean and standard deviation, with percentile.

Statistics