8 numbers read.
A class like 10-20 is counted at its midpoint, 15. Paste two columns from a spreadsheet and it just works.
For when a problem gives the totals instead of the data. Σx² means square each value, then add.
Not sure? Pick sample if your numbers are some of a bigger group (most homework, lab results and surveys). Pick population only if you have every member, such as all 30 students in one class.
Sample standard deviation s
2.1381
Divides by n − 1. Use for a sample of a bigger group.
Population standard deviation σ
2.0000
Divides by n. Use when you have every member of the group.
A typical value sits about 2.14 away from the mean of 5. That is 43% of the mean, a high spread relative to the average.
- Mean
- 5
- Variance s²
- 4.5714
- Count n
- 8
- Sum Σx
- 40
- Median
- 4.5
- Range
- 7 (2 to 9)
- Sum of squares Σ(x − )²
- 32
- Standard error s/√n
- 0.7559
- Coefficient of variation
- 42.76%
within 1 SD 1 to 2 SD more than 2 SD from the mean
- 6 of 8 (75%) within 1 SD normal curve: 68.27%
- 8 of 8 (100%) within 2 SD normal curve: 95.45%
- 8 of 8 (100%) within 3 SD normal curve: 99.73%
Step-by-step solution
Find the mean
= Σx ÷ n = 40 ÷ 8 = 5
Subtract the mean from each value, then square the result
# x x − (x − )² 1 2 −3 9 2 4 −1 1 3 4 −1 1 4 4 −1 1 5 5 0 0 6 5 0 0 7 7 2 4 8 9 4 16 Σ 40 0 32 The x − column always adds up to 0. Cells are rounded to 4 places; the totals are exact.
Add up the squares
Σ(x − )² = 32
Divide by n − 1 to get the variance
s² = 32 ÷ 7 ≈ 4.5714
n − 1 = 8 − 1 = 7. This is Bessel’s correction: a sample’s own mean sits closer to its values than the true mean does, so dividing by n would come out too small.
Take the square root
s = √4.5714 ≈ 2.1381
The root is taken of the exact variance, not of the rounded one shown, so the last digit is right.
Population instead? Divide by n = 8: σ² = 32 ÷ 8 = 4, so σ = 2.0000.
Check it in a spreadsheet: with the values in A1:A8, type =STDEV.S(A1:A8) in Excel or Google Sheets (population: =STDEV.P(A1:A8)). On a TI-84, 1-Var Stats shows both: Sx is the sample value and σx the population value.
Standard deviation measures how far the values in a data set typically sit from their mean. To find it, subtract the mean from each value, square the differences, add them up, divide by n − 1 for a sample (or by n for a whole population) and take the square root. The calculator above does every one of those steps with your numbers and shows the working, so you can check it or copy it into your homework.
How to use the standard deviation calculator
- Enter your data. Type or paste numbers separated by commas, spaces or new lines. A column copied from Excel or Google Sheets works as it is. Words, units and stray symbols are skipped, and the line under the box tells you how many numbers were read and what was left out.
- Pick sample or population. Most data is a sample. Choose population only when you have every member of the group you are describing.
- Read the answer. Both standard deviations appear at once, with the one you picked in front. Below them are the mean, variance, median, range, standard error and coefficient of variation.
- Follow or copy the steps. The solution lists the mean, a table of deviations and squares, the sum of squares, the variance and the square root. Copy steps gives you plain text, and Copy table for Excel pastes the table into a spreadsheet as cells.
Three other inputs cover the rest of the textbook problems. Frequency table takes one row per line, a value and how many times it occurs, and accepts class intervals such as 10-20 for grouped data. From totals takes n, Σx and Σx² when a problem gives you sums instead of data. Use a given mean measures the deviations from a mean you supply rather than the mean of your numbers.
The arithmetic is exact. Each cell in the table is rounded once from an exact value, the deviation column always totals 0 and the sum of squares matches the column above it. The square root is taken of the exact variance, so the last digit of the answer is correct at whatever precision you choose.
What is standard deviation?
Standard deviation is the most widely used measure of spread in statistics. A small standard deviation means the values cluster tightly around the mean. A large one means they are scattered. It is written s for a sample and σ (the Greek letter sigma) for a population, and it is always in the same units as the data: test scores in points, heights in centimeters, reaction times in milliseconds.
Two classes can both average 75 on a test. If one class scored between 70 and 80 and the other between 40 and 100, the means are identical but the standard deviations are not. The first class might have a standard deviation of 3 points, the second 18. The mean tells you where the data is centered. The standard deviation tells you how much to trust that center as a description of any one value.
Standard deviation formula
The sample standard deviation formula is:
s = √[ Σ(x − x̄)² ÷ (n − 1) ]
The population standard deviation formula is:
σ = √[ Σ(x − μ)² ÷ N ]
In both, x is each value, x̄ or μ is the mean and Σ means add up. The only difference is the divisor: n − 1 for a sample and N for a population. The quantity inside the square root is the variance, so the standard deviation is the square root of the variance.
How to calculate standard deviation by hand
The worked example uses the eight numbers the calculator loads by default: 2, 4, 4, 4, 5, 5, 7 and 9.
- Find the mean. Add the values and divide by how many there are: 40 ÷ 8 = 5.
- Subtract the mean from each value. The deviations are −3, −1, −1, −1, 0, 0, 2 and 4. They always add up to 0, which is a quick check on the mean.
- Square each deviation. This gives 9, 1, 1, 1, 0, 0, 4 and 16. Squaring removes the minus signs so values below the mean do not cancel out values above it.
- Add the squares. 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32. This is the sum of squares.
- Divide to get the variance. For a sample, divide by n − 1 = 7: 32 ÷ 7 ≈ 4.5714. For a population, divide by n = 8: 32 ÷ 8 = 4.
- Take the square root. The sample standard deviation is √4.5714 ≈ 2.1381. The population standard deviation is √4 = 2.
On average, then, a value in this set sits about 2 away from the mean of 5. The 2 and the 9 are the farthest out, at 1.4 and 1.9 standard deviations from the mean.
Sample vs population standard deviation
Use the population standard deviation when your data includes every member of the group you want to describe: every student in one class, every game a team played this season, all 50 US states. Use the sample standard deviation when your data is part of a larger group and you want to describe that larger group: 200 voters polled out of a city, ten plants measured from a field, five repeat trials of a lab experiment.
Homework, lab reports and research almost always call for the sample version. If a problem does not say, the sample formula is the safer choice, and calculators such as the TI-84 report both so you can match whichever your teacher expects.
The reason for n − 1 is Bessel’s correction. A sample’s own mean always sits closer to its values than the true population mean does, so the squared deviations come out slightly too small. Dividing by one less than n makes up for that. The effect is large for small samples (dividing by 4 instead of 5 raises the variance by 25%) and shrinks as n grows. With 1,000 values the two answers differ by about 0.05%.
Standard deviation from a frequency table or grouped data
When data comes as a frequency table, each value counts as many times as its frequency f. The formula becomes:
s = √[ Σf(x − x̄)² ÷ (n − 1) ], where n = Σf and x̄ = Σfx ÷ n
For grouped data, where values are given as classes such as 10–20, use the midpoint of each class as x. The calculator does this when you type a class as 10-20. Its example table has the classes 10–20, 20–30, 30–40, 40–50 and 50–60 with frequencies 4, 9, 13, 6 and 3. That is n = 35, Σfx = 1,175 and a mean of 33.5714. The sum of squares is 4,228.5714, so the sample standard deviation is 11.1521 and the population standard deviation is 10.9916.
A standard deviation from grouped data is an estimate. It assumes every value in a class sits at the midpoint, which is rarely true, so it can differ from the standard deviation of the raw data.
Standard deviation using a given mean
Some problems give you the mean, or ask for the spread around a known target value rather than around the data’s own mean. Tick Use a given mean and type it in, and the calculator measures every deviation from that value. If the mean you entered does not match the mean of your numbers, it says so, since that usually means a typo in the data or the mean.
Take the example data again with a known population mean of μ = 4. The squared deviations from 4 are 4, 0, 0, 0, 1, 1, 9 and 25, which add up to 40. Divided by n = 8 that is a variance of 5 and a standard deviation of √5 ≈ 2.2361. When the true mean is known rather than estimated from the sample, dividing by n is correct, because no information was used up estimating the mean.
Shortcut formula from Σx and Σx²
The sum of squares can also be found without listing every deviation:
Σ(x − x̄)² = Σx² − (Σx)² ÷ n
For the example data, Σx² = 4 + 16 + 16 + 16 + 25 + 25 + 49 + 81 = 232 and Σx = 40, so the sum of squares is 232 − 1,600 ÷ 8 = 32, the same as before. Statistics texts call this the computational formula. It is the method behind the From totals tab, and it is useful when a problem gives you only n, Σx and Σx².
What does the standard deviation tell you?
For data that follows a bell-shaped normal distribution, the 68-95-99.7 rule applies:
- About 68% of values fall within 1 standard deviation of the mean.
- About 95% fall within 2 standard deviations.
- About 99.7% fall within 3 standard deviations.
The calculator counts how many of your values actually fall within 1, 2 and 3 standard deviations and shows those counts next to the normal-curve percentages. The dot plot shades the 1 and 2 standard deviation bands and colors any value more than 2 standard deviations out, which is the usual first test for an outlier.
Whether a standard deviation is high or low depends on the mean. A standard deviation of 5 is large for test scores averaging 20 and small for house prices averaging 300,000. The coefficient of variation, the standard deviation divided by the mean and given as a percentage, makes the comparison fair. In lab work a coefficient of variation under 10% is usually read as good precision. The coefficient of variation is also called the relative standard deviation (RSD).
Standard deviation vs variance vs standard error
- Variance is the standard deviation squared, s² or σ². It is the value before the square root and is in squared units (points squared, cm²), which is why the standard deviation is easier to interpret.
- Standard deviation describes the spread of individual values around the mean.
- Standard error of the mean is s ÷ √n. It describes how precisely the sample mean estimates the population mean, and it shrinks as the sample grows. For the example data it is 2.1381 ÷ √8 ≈ 0.7559.
How to find standard deviation in Excel, Google Sheets and a TI-84
- Excel and Google Sheets: =STDEV.S(A1:A20) gives the sample standard deviation and =STDEV.P(A1:A20) the population standard deviation. The older =STDEV and =STDEVP do the same jobs. =VAR.S and =VAR.P give the variances.
- TI-83 and TI-84: enter the data in L1 with STAT then EDIT, then run STAT, CALC, 1-Var Stats. Sx is the sample standard deviation and σx is the population standard deviation.
- Python: statistics.stdev(data) is the sample value and statistics.pstdev(data) the population value. NumPy’s numpy.std(data) returns the population value unless you pass ddof=1.
Below the steps, the calculator writes the exact spreadsheet formula for your data, so you can confirm the answer in a second program.
Common mistakes
- Using the wrong divisor. Dividing by n when the problem calls for a sample, or by n − 1 for a population, is the most common error. Check which one the question wants before you start.
- Forgetting the square root. The sum of squares divided by n − 1 is the variance, not the standard deviation.
- Squaring the sum instead of summing the squares. Σx² and (Σx)² are different numbers. For the example they are 232 and 1,600.
- Rounding the mean too early. A mean of 33.5714 rounded to 33.6 before the deviations are squared can move the final answer. Keep full precision until the last step.
- Ignoring frequencies. In a frequency table every squared deviation has to be multiplied by its frequency before adding.
Frequently asked questions
Can standard deviation be negative?
No. Standard deviation is the square root of an average of squared numbers, so it is always zero or positive. If you get a negative result, a sign has been dropped somewhere in the working.
What does a standard deviation of 0 mean?
It means every value in the data set is the same. There is no spread at all, and every value equals the mean.
Can the standard deviation be larger than the mean?
Yes. It happens with data that is very spread out or that includes negative values, such as daily temperature changes or investment returns. A standard deviation larger than the mean gives a coefficient of variation above 100%.
Why do you divide by n − 1 for a sample?
A sample mean sits closer to its own values than the true population mean does, so dividing the sum of squares by n underestimates the population variance. Dividing by n − 1, called Bessel’s correction, removes that bias.
What is a high or low standard deviation?
It depends on the scale of the data. A low standard deviation means values sit close to the mean and a high one means they are spread out. To compare data sets with different means, use the coefficient of variation, the standard deviation as a percentage of the mean.
How do you calculate standard deviation for ungrouped data?
Ungrouped data is a plain list of values. Find the mean, subtract it from each value, square the results, add them, divide by n − 1 for a sample or n for a population, and take the square root. Paste the list into the calculator to see each step with your numbers.
Can I paste data from Excel or Google Sheets?
Yes. Copy a column or a row of cells and paste it into the box. Values separated by new lines, tabs, commas or spaces are all read. Data that uses commas as decimal points, such as 1,5; 2,25, is recognized when the values are separated by semicolons, tabs or new lines.
What is the difference between s and σ?
s is the sample standard deviation and divides by n − 1. σ is the population standard deviation and divides by n. For the example data s is 2.1381 and σ is 2.
Related reading
- Examples of statistical tests, many of which start from a standard deviation
- Differences between calculus and statistics
- Facts about data science
- Units of measurement, since a standard deviation always carries the units of its data
- All 33Science tools and calculators