FLXCode Standard Deviation Calculator

FLXCode apps

Appearance

Standard Deviation Calculator

Paste your numbers, pick sample or population, and read the standard deviation with every step shown.

Paste a column or row from Excel, Google Sheets or a CSV file, or type numbers separated by spaces, commas or new lines. A header word is ignored.

Example Standard deviation

9.19627 Sample standard deviation (s)

Read 8 numbers.

Results
Count (n)8
Sum656
Mean (x̄)82
Sample standard deviation (s)9.19627
Population standard deviation (σ)8.60233
Sample variance (s²)84.5714
Population variance (σ²)74
Standard error of the mean (s / √n)3.25137

The steps, with your numbers

Mean: x̄ = Σx / n = 656 / 8 = 82

Squared distances from the mean: Σ(x − x̄)² = (72 − 82)² + (85 − 82)² + (91 − 82)² + … + (94 − 82)² + (81 − 82)² = 592

Sample variance: s² = Σ(x − x̄)² / (n − 1) = 592 / 7 = 84.5714

Sample standard deviation: s = √s² = √84.5714 = 9.19627

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

Quick start

  1. Paste a column or row of numbers, or type them with spaces, commas or new lines between them.
  2. Choose sample or population. Sample is the safe default for data you collected.
  3. Read the standard deviation at the top. The table also has the mean, both variances and the standard error.
  4. Open the steps if you need the working for homework or a report.

Sample or population

Sample (s)Population (σ)
Use whenYour numbers are a part of a bigger groupYour numbers are the whole group
Divide byn − 1n
SpreadsheetSTDEV.SSTDEV.P
Calculator keysₓ or σₙ₋₁σₓ or σₙ

The formula

For a sample, with mean x̄ and n numbers:

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

For a whole population, replace n − 1 with N and the mean with μ:

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

Worked examples

NumbersMeanPopulation σSample sNote
2 4 4 4 5 5 7 9522.13809The classic textbook set. The mean is exactly 5.
72 85 91 68 77 88 94 81828.602339.19627Eight exam scores.
170 175 168 182 177 165 180173.8575.890156.36209Seven heights in cm.
10 10 10 101000No spread at all.

For the textbook set the squared distances from the mean of 5 add up to 32. Divide by 8 and you get a variance of 4, so σ is 2. Divide by 7 and you get 4.57143, so s is 2.13809.

What the number tells you

If the data are roughly bell shaped, about 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. For the exam scores that means most results sit between 72.8037 and 91.1963. The rule is a guide, not a promise, and it fails for skewed data. To turn one value into a distance in standard deviations, use the z-score calculator.

Numbers this uses

Every constant the tool uses is listed here with its source. Where a number varies, you can edit it in the tool.

  • Limit is 100,000 numbers per calculation. Set to keep the page fast on a phone.
  • Sample variance is Σ(x − x̄)² / (n − 1). Bessel's correction, as in Excel STDEV.S and the sₙ₋₁ key on calculators.
  • Arithmetic is two passes over the data, mean first. This avoids the rounding loss of the one-pass shortcut formula.
  • Display is 6 significant digits. The numbers inside the calculation are not rounded.

Common mistakes

  • Using the population formula on a sample. The result comes out a little too small.
  • Pasting a column with a total row at the bottom. The total counts as a number, so remove it first.
  • Reading decimal commas as separators. If your numbers look like 3,5, tick the decimal comma box.
  • Comparing standard deviations of data in different units. Use the coefficient of variation instead.

Nothing you type or paste is uploaded. We count events without cookies (details).

FAQ

What is standard deviation in plain words?

It is the typical distance of your numbers from their mean. A small standard deviation means the numbers sit close to the mean, a large one means they are spread out. For 72, 85, 91, 68, 77, 88, 94, 81 the mean is 82 and the sample standard deviation is 9.19627.

Should I use the sample or the population standard deviation?

Use the population value only when your numbers are every member of the group, such as all 30 students in one class. Use the sample value when the numbers are a part of something bigger. If you are not sure, it is nearly always the sample. For the textbook set the two are 2 and 2.13809.

Why does the sample version divide by n − 1?

A sample sits closer to its own mean than to the true mean of the whole group, so the plain average of squared distances comes out too small. Dividing by n − 1 instead of n corrects that on average. This is called Bessel's correction. For a large sample the difference is tiny.

How do I calculate standard deviation by hand?

Find the mean. Subtract it from each number and square the result. Add the squares, divide by n − 1 (sample) or n (population), and take the square root. The steps block under the result does exactly this with your numbers.

How do I get standard deviation in Excel or Google Sheets?

Use STDEV.S for a sample and STDEV.P for a population. For numbers in A1 to A10, type =STDEV.S(A1:A10). The older STDEV works like STDEV.S. You can also paste the column into the box above and skip the formula.

Can standard deviation be negative or zero?

It is never negative, because it is a square root. It is 0 only when every number is the same, as in 10, 10, 10, 10. A single number has a population standard deviation of 0 and no sample standard deviation, since n − 1 would be 0.

What counts as a high or low standard deviation?

It depends on the units and the mean. Compare it with the mean: a standard deviation of 15 is huge for heights in cm and small for house prices in thousands. The coefficient of variation, the standard deviation divided by the mean, puts different data on one scale.

Is the data I paste uploaded or saved?

No. The sums run in your browser. Your numbers are not put in the address bar, not stored in this browser and not counted. We only count which mode you used, such as sample or population.

More from FLXCode

Share Standard Deviation Calculator