Skip to content
Calcapedia
Statistics & Data

Standard Deviation Calculator

See how spread out your numbers are: sample and population standard deviation and variance, with the mean, standard error, a table and full working.

Level: Grades 9–10

  • Common Core standard HSS.ID.A.2Use statistics appropriate to the shape of the data distribution to compare center (median, mean) and spread (interquartile range, standard deviation) of two or more different data sets.
Printable worksheet

Standard Deviation Calculator

Inputs

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

Your data is a

Result

Sample standard deviation (s)

2.1381

The sample standard deviation of 8 values is 2.13809.

Sample variance (s²)
4.5714
Population standard deviation (σ)
2
Population variance (σ²)
4
Mean
5
Count (n)
8
Sum
40
Sum of squared deviations
32
Standard error of the mean (s ÷ √n)
0.7559
Mean ± 1 s (holds about 68% of bell-shaped data)
2.8619 to 7.1381
Mean ± 2 s (holds about 95% of bell-shaped data)
0.7238 to 9.2762

See the step-by-step solution ↓

Deviation from the mean for each value
Deviation from the mean for each value
#Value (x)x − mean(x − mean)²
12-39
24-11
34-11
44-11
5500
6500
7724
89416

Step-by-step solution

  1. Find the mean (the average, x̄): add up the 8 values and divide by how many there are, n

    x̄=2+4+4+4+5+5+7+98=5
  2. See how far each value is from the mean. Square each gap so minus signs don't cancel, then add them up (SS)

    SS=(2−5)2+(4−5)2+…+(9−5)2=9+1+1+1+0+0+4+16=32
  3. Divide SS by n − 1 to get the sample variance. Using one less than n corrects for working from a sample

    s2=328 − 1=327=4.571429
  4. Take the square root of the variance. This undoes the squaring and puts the answer back in your data's units

    s=4.571429=2.13809
  5. Extra: divide the sample standard deviation by the square root of n to get the standard error (SE) of the mean

    SE=2.138098=0.755929

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

How to solve this on a calculator

The keys to press to get this page's worked-example answer on an ordinary calculator, with what the display should show after each step. A named-model tab follows that calculator's official guidebook.

Sample standard deviation step by step

Problem
Find the sample standard deviation of eight measurements: 2, 4, 4, 4, 5, 5, 7 and 9.
Formula
s = √( Σ(x − mean)² ÷ (n − 1) )
Example values
x = 2, 4, 4, 4, 5, 5, 7, 9 (the measurements); n = 8 (how many measurements). These are the fixed values from the worked example on this page, so the keys stay the same whatever you type into the calculator above.
Why a scientific calculator
It needs squares and a square root, and Ans carries each result into the next step. A statistics calculator has one-key σ and s, but isn't available here yet. It also works on a statistics calculator (not on this site yet) or graphing calculator.
The whole sequence
(2+4+4+4+5+5+7+9)÷8=(2−5)x²+3×(4−5)x²+(7−5)x²+(9−5)x²=√Ans÷7)=

Step by step

  1. (2+4+4+4+5+5+7+9)÷8

    Find the mean: add the eight values in brackets and divide by 8.

    Display: (2+4+4+4+5+5+7+9)÷8

  2. =

    Press =. The mean is 5.

    Display: 5

  3. (2−5)x²

    Square each value's distance from the mean. Start with (2 − 5) x².

    Display: (2−5)^2

  4. +3×(4−5)x²

    The three 4s each give (4 − 5)², so add 3 × (4 − 5) x². The two 5s give 0 and can be skipped.

    Display: (2−5)^2+3×(4−5)^2

  5. +(7−5)x²+(9−5)x²

    Add (7 − 5) x² and (9 − 5) x².

    Display: (2−5)^2+3×(4−5)^2+(7−5)^2+(9−5)^2

  6. =

    Press =. The sum of squared deviations is 32.

    Display: 32

  7. √Ans÷7)

    For a sample, divide by n − 1 = 7 and take the square root: √(Ans ÷ 7).

    Display: √(ans÷7)

  8. =

    Press =. The sample standard deviation is about 2.1381.

    Display: 2.1380899353

If your answer looks wrong

  • Dividing by 8 instead of 7 gives 2, the population standard deviation. Use n − 1 for a sample, n for a whole population.
  • If the deviations add up to 0, you forgot to square them: the plus and minus distances cancel out.
  • −3 x² typed without brackets gives −9, not 9. Keep each difference in brackets before pressing x².

How this is checked: an automated test presses these keys on this site's scientific calculator, checks every display along the way, and confirms the answer matches the calculator on this page (last checked 2026-10-19). It has not been checked on any particular brand or model, and real calculators label some keys differently.

What this calculator does

Find out how spread out your numbers are. Standard deviation tells you how far the values in a list typically sit from their mean (their average). A small standard deviation means the values bunch closely around the average. A large one means they're spread out. Variance is the same idea before the last step, a square root, so it's measured in squared units.

Paste your numbers and say whether they're a sample or a whole population. The calculator shows both versions of the standard deviation and variance side by side. You'll also see the mean, the count, the sum of squared gaps from the mean and the standard error of the mean. It also gives the ranges one and two standard deviations either side of the mean.

A table lists every value with its gap from the mean and that gap squared. The working shows the division by n (how many values you have) or by n − 1. So you can check a hand calculation line by line.

Where it's used

Why this math matters outside the classroom:

  • Test score spread. Two classes both averaging 75 differ when one has an SD of 5 points and the other 15, a much wider spread of scores.
  • Weather. A city whose daily highs have an SD of 3 °F has far steadier weather than one with an SD of 12 °F.
  • Fund volatility. Investors read the SD of a fund's yearly returns as volatility, so 15% means wider swings than a fund with 5%.
  • Factory control. A factory watches the SD of bolt lengths, and a jump from 0.02 mm to 0.05 mm signals a machine needs adjusting.
  • Classroom practice. The values 2, 4, 4, 4, 5, 5, 7 and 9 have a mean of 5 and a population standard deviation of exactly 2.

Grade level and standards: Grades 9–10; Common Core State Standards for Mathematics HSS.ID.A.2. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Type or paste your data, separated by commas, spaces or new lines. Leave out thousands separators.
  2. Choose Sample if your numbers are a part of a bigger group you want to learn about. Choose Whole population if they cover every member of the group.
  3. Read the main standard deviation for your choice. Below it you'll find the other version, the variances, the mean, the standard error, and the ranges within 1 and 2 standard deviations.
  4. Use the table and the working to follow each stage: the mean, each squared gap, their total, and the final division and square root.

What the inputs mean

Data set
Up to 10,000 numbers. Negatives and decimals are fine. A sample needs at least two values. A population can have just one.
Your data is a
This only changes which result is shown first and what the working divides by. Both versions are always shown when they can be worked out.

Formula and method

mean x̄ = (x1 + x2 + ... + xn) ÷ n
SS = Σ (xi − x̄)²
population variance σ² = SS ÷ n,   σ = √σ²
sample variance s² = SS ÷ (n − 1),   s = √s²
standard error of the mean SE = s ÷ √n

In the formulas, x1, x2 and so on are your values, and xi means any one of them. The count of values is n, and x̄ (say "x-bar") is their mean. The symbol Σ means "add them all up". SS is the sum of squares, σ (sigma) is the population standard deviation, and s is the sample standard deviation.

Both versions start the same way. Find the mean and take it away from every value. Square each gap so that negative and positive gaps don't cancel out. Then add up the squares. That total is SS.

For a whole population, you divide SS by n. For a sample, you divide by n − 1 instead, a fix known as Bessel's correction. Here's why it's needed. A sample's own mean sits closer to its values than the true population mean does. So dividing by n would make the spread look too small, on average. Dividing by n − 1 makes the sample variance an unbiased estimate, one that's right on average, of the population variance.

The standard deviation is the square root of the variance. That brings it back to the same units as your data.

The standard error of the mean always uses the sample standard deviation, in both modes. It estimates how much the mean would change from one sample of this size to the next.

Worked example

You have eight measurements: 2, 4, 4, 4, 5, 5, 7 and 9, treated as a sample.

  1. Mean: (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5.
  2. Squared gaps from 5: 9, 1, 1, 1, 0, 0, 4 and 16. They add up to a sum of squares of 32.
  3. Sample variance: 32 ÷ (8 − 1) = 32 ÷ 7 ≈ 4.5714.
  4. Sample standard deviation: √4.5714 ≈ 2.1381.
  5. To compare, the population variance is 32 ÷ 8 = 4, and the population standard deviation is √4 = 2.
  6. Standard error of the mean: 2.1381 ÷ √8 ≈ 0.7559.

Result: The sample standard deviation is about 2.1381 (variance about 4.5714). So one standard deviation either side of the mean runs from 2.8619 to 7.1381. The population standard deviation is 2 (variance 4).

Understanding the result

For data shaped roughly like a bell curve, about 68% of values fall within one standard deviation of the mean, and about 95% within two. In the example, six of the eight values lie between 2.8619 and 7.1381. These percentages don't apply to lopsided (skewed) data or data with outliers, values far from the rest.

Standard deviation is in the same units as your data, so it's easiest to judge next to the mean. To compare the spread of data sets with very different averages, divide each standard deviation by its mean. That ratio is called the coefficient of variation.

The sample and population figures get closer as n grows, because n and n − 1 become nearly the same.

Assumptions and limitations

  • Every value counts equally. There are no weights or frequency counts.
  • The mean is worked out first, and then the squared gaps are added up from it. This two-pass method, plus a careful way of adding (compensated summation), keeps the answer accurate even for large values that differ only slightly.
  • Outliers have a big effect, because the gaps are squared. A single extreme value can push the standard deviation up a lot. The interquartile range, the spread of the middle half of the data, is a sturdier alternative.
  • It only describes spread. Two data sets with the same mean and standard deviation can have very different shapes.
  • If your data is grouped or in a frequency table, list out every individual value first.
  • The table shows only the first 100 values, but longer lists are still used in full for every result.

Frequently asked questions

Should I use the sample or population standard deviation?

Use the population version only when your data covers every member of the group you care about. An example is the scores of every student in one class, when that class is all you're describing. If your data is a part of a bigger group you want to learn about, use the sample version.

Why does the sample formula divide by n − 1?

The gaps are measured from the sample's own mean, which is pulled toward the sample's values. That makes the squared gaps a little too small, on average. Dividing by n − 1 instead of n fixes this. Then the sample variance doesn't keep coming out lower than the population variance.

What is the difference between variance and standard deviation?

Variance is the average squared gap from the mean, so its units are squared (for example, cm²). Standard deviation is its square root, so it's in your original units. That makes it easier to make sense of. Variance is handy in formulas, because the variances of independent quantities add together.

Can the standard deviation be negative or zero?

It can never be negative, because it's the square root of a total of squares. It's zero only when every value is the same, so there's no spread at all.

How do I calculate standard deviation by hand?

Find the mean, take it away from each value, square each result, and add up the squares. Divide that total by n − 1 for a sample (or by n for a population), then take the square root. For 2, 4, 4, 4, 5, 5, 7, 9, the mean is 5, the squares add to 32, and √(32 ÷ 7) ≈ 2.138.

What is the difference between standard deviation and standard error?

Standard deviation describes how spread out the single values are. Standard error describes how closely the sample mean is likely to match the true mean. It equals s ÷ √n. Adding more data barely changes the standard deviation, but it steadily shrinks the standard error.

Is a high standard deviation good or bad?

Neither on its own. It depends on how much consistency matters for your data. Judge it next to the mean. A standard deviation of 5 is large for test scores averaging 20, but small for scores averaging 500. Dividing the standard deviation by the mean puts that comparison on one scale.

How this calculator is checked

Method: Standard definitions of population and sample variance (with Bessel's n − 1 correction), standard deviation and the standard error of the mean from descriptive statistics. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this Standard Deviation Calculator on your own website or blog for free. Paste this code where you want it to appear: