Dexaloop Tools

Standard deviation calculator with steps

Sample and population standard deviation and variance for a list of numbers, with every step shown. Nothing you type leaves your browser.

Type
Data

Separate with commas, spaces or new lines, or paste a column from a spreadsheet. Use a dot for decimals and no commas inside numbers.

Sample: your numbers are some of a larger group, so the sum of squares is divided by n − 1.

z-score of a value Optional

How many standard deviations this value is from the mean.

Your entries are not saved or sent
Sample standard deviation (s)
0
Enter at least two numbers.
See the steps

Results are rounded to 10 significant figures. The sum and the sum of x² are shown for reference only: the standard deviation is worked out from the deviations, so very large numbers do not lose accuracy.

Steps

Enter numbers above to see the working.

How to use the standard deviation calculator

  1. Choose Sample or Population. Sample divides by n − 1, population by n. The section below explains which one you need.
  2. Enter the numbers. Separate them with commas, spaces or new lines, or paste a column from a spreadsheet. Blank entries are ignored, and anything that is not a number is named under the box and left out.
  3. Or switch to Frequency table and type each value with how often it occurs, one pair per line, such as 3 5 for five 3s.

The result shows the standard deviation, the variance, the mean, the count, the sum, the sum of squares and the other type of standard deviation for comparison. Under the tool, Steps writes out the formula with your numbers and a table of every value, its deviation from the mean and the squared deviation. Open z-score of a value to see how far one value is from the mean in standard deviations.

The standard deviation formula

The NIST/SEMATECH e-Handbook of Statistical Methods defines the variance of a sample as the sum of the squared deviations from the mean divided by N − 1, and says that "the standard deviation is the square root of the variance". Written out:

MeasureSamplePopulation
Variances² = Σ(x − x̄)² ÷ (n − 1)σ² = Σ(x − μ)² ÷ N
Standard deviations = √s²σ = √σ²

Here x is each value, x̄ (or μ for a population) is the mean, n is how many values there are, and Σ(x − x̄)² is the sum of squares. For a frequency table each squared deviation is multiplied by its count f, and n is the total of the counts.

You may also see a shortcut that uses Σx² − (Σx)² ÷ n for the sum of squares. It gives the same answer on paper, but on a computer it can lose all its accuracy when the numbers are large and close together, such as 1,000,000,001, 1,000,000,002 and 1,000,000,003. This calculator works from the deviations instead, so that example correctly gives a sample standard deviation of 1.

Standard deviation with steps: a worked example

Take the eight numbers 2, 4, 4, 4, 5, 5, 7 and 9. This is how to find the standard deviation using the mean:

  1. Mean: 40 ÷ 8 = 5.
  2. Deviations: take 5 from each number, then square the result.
  3. Sum of squares: add the squares, which gives 32.
  4. Variance: 32 ÷ 7 = 4.571 for a sample, or 32 ÷ 8 = 4 for a population.
  5. Standard deviation: √4.571 = 2.138 for a sample, or √4 = 2 for a population.
xx − x̄(x − x̄)²
2−39
4−11
4−11
4−11
500
500
724
9416
40032

The deviations always add up to 0, which is a handy check on your mean. Try an example in the calculator fills in these numbers.

Sample vs population standard deviation

Use the population standard deviation when your numbers are the whole group you care about: every student in one class, when you only want to describe that class. Use the sample standard deviation when your numbers are some of a larger group and you want to estimate the spread of the whole group: 30 students picked from a school of 900.

Dividing by n − 1 makes the sample figure a little larger. A sample tends to sit closer to its own mean than the whole group does, and the smaller divisor makes up for that. The gap shrinks as n grows: with 8 values the two answers above are 2.138 and 2, with 1,000 values they differ by about 0.05%. With only one number the sample standard deviation cannot be worked out, because n − 1 is 0, while the population standard deviation of a single number is 0. If you are not sure which one you need, ask whether your numbers are all of the group or only part of it.

Variance, frequency tables and z-scores

The variance is the standard deviation squared, so this page works as a variance calculator too. The variance is in squared units (points squared, inches squared), which is why the standard deviation, in the same units as the data, is easier to read.

For data in a frequency table, multiply each squared deviation by its count. If a class reports how many siblings each of 20 students has:

Siblings xStudents fx − 1.5f(x − 1.5)²
04−1.59
17−0.51.75
250.51.25
331.56.75
412.56.25
Total2025

The mean is 30 ÷ 20 = 1.5. The sample variance is 25 ÷ 19 = 1.316 and the sample standard deviation 1.147; the population figures are 1.25 and 1.118.

A z-score says how many standard deviations a value is from the mean: z = (x − mean) ÷ standard deviation. In the first example, 9 has z = (9 − 5) ÷ 2 = 2 with the population figure, or 1.87 with the sample one. A negative z-score is below the mean. To give letter grades from z-scores, see the bell curve option of the grade curve calculator.

Standard deviation in Excel or Google Sheets

With the numbers in A2:A11:

To getExcelGoogle Sheets
Sample standard deviation=STDEV.S(A2:A11)=STDEV(A2:A11) or =STDEV.S(A2:A11)
Population standard deviation=STDEV.P(A2:A11)=STDEVP(A2:A11) or =STDEV.P(A2:A11)
Sample variance=VAR.S(A2:A11)=VAR(A2:A11)
Population variance=VAR.P(A2:A11)=VARP(A2:A11)

Microsoft says that for STDEV.S "The standard deviation is calculated using the "n-1" method", that STDEV.P "assumes that its arguments are the entire population", and that VAR.S "assumes that its arguments are a sample of the population". In Google Sheets, STDEV "calculates the standard deviation based on a sample" and STDEVP works "based on an entire population"; Google's STDEV.S and STDEV.P pages point back to STDEV and STDEVP. VAR "Calculates the variance based on a sample" and VARP does the same for an entire population.

Microsoft's own example uses ten breaking strengths: 1345, 1301, 1368, 1322, 1310, 1370, 1318, 1350, 1303 and 1299. Paste them into this calculator and you get the same answers as its help pages: a sample standard deviation of 27.46391572, a population standard deviation of 26.05455814, and variances of 754.27 and 678.84.

Standard deviation on a TI-84 calculator

Texas Instruments' support pages give the steps for the TI-84 Plus family. Type the numbers into list L1 (press [STAT], then choose Edit). Then "Press [STAT], arrow over to CALC, and press 1:1-Var Stats", make sure List is L1, arrow down to Calculate and press [ENTER].

TI explains that these calculators work out "two types of standard deviation": Sx, the sample standard deviation, which divides by n − 1, and the population standard deviation, which divides by n. Running 1-Var Stats works out both. TI also notes that "The variance( command will find the sample variance". The answers match this calculator's Sample and Population results.

Questions and answers

How do I calculate standard deviation by hand?

Find the mean, take it from each value, square each result, add the squares, divide by n minus 1 for a sample (or n for a population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 that is the square root of 32 divided by 7, which is 2.138.

Should I use the sample or the population standard deviation?

Population if your numbers are the whole group you are describing, sample if they are part of a bigger group you want to say something about. Spreadsheets make the same split: STDEV.S for a sample, STDEV.P for a population.

What is the difference between variance and standard deviation?

The standard deviation is the square root of the variance. The variance is in squared units, so the standard deviation, in the same units as your data, is easier to read. A variance of 4 means a standard deviation of 2.

Can the standard deviation be 0 or negative?

It is 0 when every value is the same, and it is never negative, because it is the square root of a sum of squares. Larger values mean the numbers are more spread out from the mean.

Which Excel function gives the standard deviation?

STDEV.S for a sample and STDEV.P for a whole population, both described by Microsoft. In Google Sheets, STDEV and STDEVP do the same jobs, and the names STDEV.S and STDEV.P also work there.

How do I find the standard deviation from a frequency table?

Switch the calculator to Frequency table and enter each value with its count. By hand, multiply each squared deviation by its count before adding, and use the total of the counts as n.

Sources

Checked on 9 October 2026. If a rule has changed, please tell us.

More school tools

All school tools