Skip to content
FigureSure
Sign in

Standard Deviation Calculator

Paste or type a list of numbers to get the sample and population standard deviation, the variance, mean, count and sum, plus a table showing every deviation from the mean so you can follow or check the working.
  • Updated
  • Formula shown

Your data

Separate values with commas, spaces or new lines. Use a dot for decimals and no thousands separators.

The data is

Results

Sample standard deviation (s)
4.956957592
√(Σ(x − x̄)² ÷ (n − 1)) = √(172 ÷ (8 − 1))
Population standard deviation (σ)
Divides by n instead of n − 1
4.636809248
Sample variance (s²)
172 ÷ (8 − 1)
24.57142857
Population variance (σ²)
21.5
Mean (x̄)
Σx ÷ n = 184 ÷ 8
23
Count (n)
8
Sum (Σx)
184
Sum of squared deviations
Σ(x − x̄)²
172
Standard error of the mean
s ÷ √n
1.752549164

Sample standard deviation 4.956957592 for 8 values (mean 23)

Working: each value’s deviation from the mean
#xx − x̄(x − x̄)²
118−525
22524
322−11
431864
517−636
628525
72411
819−416
Total1840172

Read 8 values.

Sample SD divides by n − 1 (Bessel’s correction) because the data is a sample used to estimate a larger group. Choose "The whole population" only if you measured every member.

How to use the standard deviation calculator

  1. Enter your values separated by commas, spaces or new lines. You can paste a column straight from a spreadsheet.
  2. Choose whether the data is a sample or the whole population. Both answers are always shown; the choice decides which one is highlighted.
  3. Read the result and the working table. The note under the results tells you how many values were read and lists anything that was not a number.

Standard deviation formulas

Mean: x̄ = Σx ÷ n
Sample standard deviation: s = √( Σ(x − x̄)² ÷ (n − 1) )
Population standard deviation: σ = √( Σ(x − μ)² ÷ N )
Variance = standard deviation²

Here x is each value, x̄ (or μ for a population) is the mean, n (or N) is the number of values and Σ means "add up". The deviations x − x̄ always sum to zero, so they are squared before adding; the square root at the end brings the answer back to the units of the data. The only difference between the two formulas is the divisor: n − 1 for a sample and n for a population.

The calculator uses Welford's one-pass algorithm, which updates the mean and the sum of squared deviations value by value. It gives the same answer as the textbook method but avoids the rounding errors of the shortcut formula Σx² − (Σx)² ÷ n, which can go badly wrong when the values are large and close together, such as timestamps or readings like 1,000,004 and 1,000,007.

Worked example

Take the 8 values 18, 25, 22, 31, 17, 28, 24, 19. Their sum is 184, so the mean is 184 ÷ 8 = 23. Each value's deviation and squared deviation:

xx − x̄(x − x̄)²
18−525
2524
22−11
31864
17−636
28525
2411
19−416
Total0172

The squared deviations add up to 172. As a sample: s² = 172 ÷ 7 = 24.5714 and s = √24.5714 = 4.95696. As a whole population: σ² = 172 ÷ 8 = 21.5 and σ = 4.63681.

Sample or population: which should you use?

Use the population formula only when your list contains every member of the group you care about: all 24 students in one class, every sale last month. Use the sample formula when the numbers are a subset used to describe something bigger: 50 bolts from a production run, 200 survey answers. That is the usual situation in science, quality control and coursework.

A sample tends to sit closer to its own mean than to the true population mean, so dividing by n would underestimate the spread. Dividing by n − 1 (Bessel's correction) removes that bias from the variance. The table shows how much bigger the sample SD is than the population SD for the same data; the gap matters for small samples and fades as n grows.

Number of values (n)s ÷ σ = √(n ÷ (n − 1))
21.4142
31.2247
51.118
101.0541
201.026
301.0171
501.0102
1001.005
1,0001.0005

In spreadsheets, the sample version is STDEV.S (or STDEV) and the population version is STDEV.P.

Reading a standard deviation

A standard deviation is a typical distance from the mean, so it is easiest to judge next to the mean itself. For data that is roughly bell-shaped (normal), the share of values within a given number of standard deviations of the mean is fixed. These figures come from this site's normal distribution engine:

Within ± k standard deviationsShare of normal data
± 168.2689%
± 1.586.6386%
± 295.45%
± 2.598.7581%
± 399.73%
± 499.9937%

This is the 68–95–99.7 rule. For skewed data or data with outliers it does not hold, and a single extreme value can inflate the SD a lot; the statistics calculator flags outliers with the 1.5 × IQR rule.

Tips and common mistakes

  • Do not drop the square root. Σ(x − x̄)² ÷ (n − 1) is the variance; the standard deviation is its square root.
  • Keep units in mind. The SD has the same units as the data (cm, seconds, dollars); the variance has squared units.
  • Avoid thousands separators. Commas separate values here, so 1,250 would be read as 1 and 250.
  • Standard deviation is not standard error. The SD describes spread in the data; the standard error, s ÷ √n, describes how precisely the mean is known.

To see where one value sits in a distribution, convert it with the z-score calculator, and to put a margin of error around a mean, use the confidence interval calculator.

Frequently asked questions

What does standard deviation tell you?

It measures how far values typically sit from the mean, in the same units as the data. For 2, 4, 4, 4, 5, 5, 7 and 9 the mean is 5 and the population standard deviation is exactly 2, so a typical value is about 2 away from 5.

Should I use the sample or the population standard deviation?

Use the sample SD (dividing by n − 1) when your numbers are a sample used to describe a bigger group, which is the usual case. Use the population SD (dividing by n) only when you have every member. For 18, 25, 22, 31, 17, 28, 24, 19 they are 4.957 and 4.637.

How do you calculate standard deviation by hand?

Find the mean, subtract it from each value, square the differences, add them up, divide by n − 1 (sample) or n (population) and take the square root. For 1, 2, 3, 4, 5 the squared deviations add up to 10, so s = √(10 ÷ 4) ≈ 1.581 and σ = √(10 ÷ 5) ≈ 1.414.

What is a good or normal standard deviation?

There is no universal good value; it depends on the scale of the data. For roughly bell-shaped data, about 68.3% of values lie within 1 SD of the mean, 95.4% within 2 SD and 99.7% within 3 SD, so a value 3 SD away is unusual.

What is the difference between variance and standard deviation?

Variance is the average squared deviation and standard deviation is its square root. Variance is in squared units (cm², dollars²), which is why the standard deviation, back in the original units, is easier to interpret. A sample variance of 27.43 means s ≈ 5.237.

Was this calculator helpful?