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.
Standard Deviation Calculator
Find the standard deviation and variance of any data set
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
- 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.
- 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.
- Under This data is a, choose Sample or Population.
- Read the standard deviation at the top, then check the working table and steps underneath.
- 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.
| Sample | Population | |
|---|---|---|
| Symbol | s | σ (sigma) |
| Mean symbol | x̄ (x bar) | μ (mu) |
| Divide the squared distances by | n − 1 | n |
| Use when | The data is part of a bigger group | The data is the whole group |
| Calculator buttons | s 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:
- Find the mean.
- Subtract the mean from each value and square the result.
- Add up the squares, then divide by n − 1 for a sample or n for a population. This is the variance.
- Take the square root.
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:
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 12 | −3.25 | 10.5625 |
| 15 | −0.25 | 0.0625 |
| 11 | −4.25 | 18.0625 |
| 18 | 2.75 | 7.5625 |
| 15 | −0.25 | 0.0625 |
| 21 | 5.75 | 33.0625 |
| 14 | −1.25 | 1.5625 |
| 16 | 0.75 | 0.5625 |
| Total 122 | 0 | 71.5 |
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.
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 x | Matches f | fx | x − μ | f(x − μ)² |
|---|---|---|---|---|
| 0 | 3 | 0 | −1.6 | 7.68 |
| 1 | 7 | 7 | −0.6 | 2.52 |
| 2 | 6 | 12 | 0.4 | 0.96 |
| 3 | 3 | 9 | 1.4 | 5.88 |
| 4 | 1 | 4 | 2.4 | 5.76 |
| Total | 20 | 32 | 22.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:
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
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?
What is the difference between variance and standard deviation?
Is a high standard deviation good or bad?
Can I paste data from Excel or Google Sheets?
Why does my calculator give two standard deviations?
Can the standard deviation be bigger than the mean?
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