Uni-Sine
MathematicsStatistics

Standard deviation calculator with working

This standard deviation calculator finds the sample or population standard deviation of your data, with the variance and mean, and shows every step in a working table. Standard deviation measures spread: roughly how far a typical value sits from the mean. Use sample (divide by n − 1) when your data is part of a bigger group, and population (divide by n) when it is the whole group.

It opens on eight values as a sample, the same data as example 1 below. Replace them with your own, or open the full standard deviation calculator over this page.

Try it

Standard Deviation Calculator

Find the standard deviation and variance of any data set

Go to its page

What the standard deviation calculator shows

  • The standard deviation you chose (s for a sample, σ for a population), plus the variance, the mean and the number of values.
  • The other standard deviation as well, so you can see the sample and population answers side by side.
  • A working table with a row for each value: x, x minus the mean, and that distance squared, with the totals underneath.
  • The steps: the mean, the sum of the squared distances, the division by n − 1 or n, and the square root.
  • A chart of your data with the mean marked and one standard deviation either side of it shaded.
  • Three ways to enter data: a raw list of up to 300 values, a frequency table, or grouped classes.
  • Practice questions with a hint and worked solution.

How to use the standard deviation calculator

  1. Choose how your data is set out: Raw data for a plain list, Frequency for values with how often each occurs, or Grouped for classes like 10 to 20.
  2. Type your values into the table. Enter moves down a row and adds a new one at the end. To paste, copy a column from a spreadsheet and paste it into any cell.
  3. Under This data is a, choose Sample or Population.
  4. Read the standard deviation at the top, then check the working table and steps underneath.
  5. To practise, press Random problem in the Practice section.

Sample or population standard deviation?

This is the choice that most often makes two answers disagree. A population is every member of the group you care about: all 30 students in one class, if that class is all you want to describe. A sample is some of them, used to estimate the whole: 30 students picked from a school of 1,200.

SamplePopulation
Symbolsσ (sigma)
Mean symbolx̄ (x bar)μ (mu)
Divide the squared distances byn − 1n
Use whenThe data is part of a bigger groupThe data is the whole group
Calculator buttonss or sx on most calculatorsσ or σx on most calculators

Why n − 1? A sample's values sit closer to their own mean than to the true mean of the whole group, so dividing by n would make the spread look too small. Dividing by one less makes up for it. The difference matters for small data sets and hardly at all for big ones. The NIST handbook's definition of standard deviation divides by n − 1.

How to calculate standard deviation

The calculator follows the same four steps you would by hand:

  1. Find the mean.
  2. Subtract the mean from each value and square the result.
  3. Add up the squares, then divide by n − 1 for a sample or n for a population. This is the variance.
  4. Take the square root.
s = \sqrt{\frac{\Sigma(x - \bar{x})^2}{n - 1}} \qquad \sigma = \sqrt{\frac{\Sigma(x - \mu)^2}{n}}Sample (left) and population (right) standard deviation

Squaring stops the negative and positive distances cancelling out (they always add to zero), and the square root at the end puts the answer back in the same units as the data.

Worked examples you can check in the calculator

Example 1: sample standard deviation

Eight runners in a club are picked at random and asked how many kilometres they ran last week: 12, 15, 11, 18, 15, 21, 14 and 16. Find the sample standard deviation.

The total is 122, so the mean is 122 ÷ 8 = 15.25. Next, the working table:

xx − x̄(x − x̄)²
12−3.2510.5625
15−0.250.0625
11−4.2518.0625
182.757.5625
15−0.250.0625
215.7533.0625
14−1.251.5625
160.750.5625
Total 122071.5
s^2 = \frac{71.5}{8 - 1} = 10.214 \qquad s = \sqrt{10.214} = 3.196

The sample standard deviation is 3.20 km to 2 decimal places. This is the calculator's opening data, so you can match every row. Switch to Population and it gives σ = 2.99 km instead, because it divides 71.5 by 8.

Example 2: population standard deviation

A family of six has these numbers of unread emails: 4, 8, 6, 5, 3 and 10. You only want to describe this family, so it is a population.

The mean is 36 ÷ 6 = 6. The distances from the mean are −2, 2, 0, −1, −3 and 4, and their squares are 4, 4, 0, 1, 9 and 16, which add to 34.

\sigma^2 = \frac{34}{6} = 5.667 \qquad \sigma = \sqrt{5.667} = 2.380

The population standard deviation is 2.38.

Example 3: standard deviation of a frequency table

A team's goals in each of its 20 matches this season are recorded in a table. Choose Frequency in the calculator and enter x in the first column and f (how many matches) in the second.

Goals xMatches ffxx − μf(x − μ)²
030−1.67.68
177−0.62.52
26120.40.96
3391.45.88
4142.45.76
Total203222.8

The mean is Σfx ÷ n = 32 ÷ 20 = 1.6 goals. Each squared distance counts once for every match, so it is multiplied by f. These are all the season's matches, so divide by n:

\sigma = \sqrt{\frac{22.8}{20}} = \sqrt{1.14} = 1.068

The standard deviation is 1.07 goals. A common slip is to treat the five rows as five values: n is the total frequency, 20, not 5.

Example 4: standard deviation of grouped data

28 customers' waiting times are grouped: 0 to 10 minutes (6 people), 10 to 20 (10), 20 to 30 (8) and 30 to 40 (4). Choose Grouped and enter From, To and f for each class.

You don't know the exact times, so each class is represented by its midpoint: 5, 15, 25 and 35. The mean is (5 × 6 + 15 × 10 + 25 × 8 + 35 × 4) ÷ 28 = 520 ÷ 28 = 18.57 minutes, and the sample standard deviation comes out at 9.89 minutes. The calculator labels both as estimates, because the real values inside each class could be anywhere in it.

Try one

practice
Pick an answer, then check it.
What is the population standard deviation of 7, 9, 11 and 13?

What does the standard deviation tell you?

A small standard deviation means the values are bunched close to the mean. A large one means they are spread out. It is in the same units as the data, so in example 1 a typical runner's distance is about 3.2 km from the mean of 15.25 km.

The calculator's chart shades from one standard deviation below the mean to one above. For example 1 that is 12.05 to 18.45 km, and 5 of the 8 values fall inside it. For data with a roughly bell-shaped (normal) distribution, the empirical rule says about 68% of values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. It only applies to bell-shaped data, so check the chart's shape before using it.

  • It can't be negative. It is a square root of a sum of squares.
  • It is 0 only when every value is the same.
  • One extreme value can push it up a lot, because its distance gets squared. If your data has outliers, the interquartile range may describe the spread better.

Common mistakes

  • Picking the wrong kind. Sample divides by n − 1 and population by n. If your answer is slightly off from the book's, try the other one.
  • Forgetting the square root. Before the square root you have the variance, not the standard deviation.
  • Not squaring the distances. The plain distances from the mean always add up to 0.
  • Using the number of rows as n in a frequency or grouped table. n is the sum of the frequencies.
  • Forgetting to multiply by f in a frequency table, for both the mean and the squared distances.
  • Rounding the mean early. Keep its full value until the end, or small errors build up in every row.

Common questions

How do I know whether to use sample or population standard deviation?
Ask whether your data is every member of the group you want to describe. If it is, use population (divide by n). If it is a selection used to say something about a bigger group, use sample (divide by n − 1). Most real data is a sample.
What is the difference between variance and standard deviation?
The variance is the average squared distance from the mean, before the square root. The standard deviation is its square root, so it is in the same units as the data. The calculator gives both.
Is a high standard deviation good or bad?
Neither. It just means the values are more spread out. For machine parts you want it small, so every part is nearly the same. For test scores, a bigger spread can help tell students apart.
Can I paste data from Excel or Google Sheets?
Yes. Copy the column and paste it into any cell of the table. Anything that isn't a number is left blank, and the calculator tells you how many were skipped.
Why does my calculator give two standard deviations?
Most scientific and graphing calculators show both: sx or s is the sample standard deviation and σx is the population standard deviation. This calculator shows the one you choose at the top and the other beside it.
Can the standard deviation be bigger than the mean?
Yes. It happens when values are very spread out compared with their size, for example 1, 2 and 30, whose mean is 11 and sample standard deviation is about 16.5.

Revision cards

Read the front, say your answer, then flip to check.

Where to go next

  • Solve it

    Standard Deviation Calculator

    Find the standard deviation and variance of any data set

    Open the tool
  • Test it

    AP Statistics

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · StatisticsStandard deviation formula for A-level Maths, with examplesThe standard deviation formula A-level Maths uses: σ from raw data, Sxx and summary statistics, frequency tables, coding and outliers, with examples.