Standard Deviation Calculator
Sample standard deviation s = √(Σ(x − x̄)^2 ÷ (n − 1)): for 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared deviations total 32 and s = √(32 ÷ 7) = 2.13809, while the population standard deviation is √(32 ÷ 8) = 2. Variance, standard error and a deviation table are shown too.
By the Calculators With Steps team · Updated November 10, 2026 · How we check our math
- Count (n)
- 8
- Sum (Σx)
- 40
- Mean (x̄)
- 5
- Variance (s²)
- 4.571429
- Population SD (σ)
- 2if the data were the whole population
- Standard error of the mean
- 0.755929
- Range
- 7min 2, max 9
- Coefficient of variation
- 42.76%
Step-by-step working
- Count the values: n = 8
- Add them up: Σx = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40
- Mean: x̄ = Σx ÷ n = 40 ÷ 8 = 5
- Subtract the mean from each value and square the result (see the table). Sum of squares: Σ(x − x̄)² = 32
- Sample variance: s² = Σ(x − x̄)² ÷ (n − 1) = 32 ÷ 7 = 4.571429
- Standard deviation: s = √4.571429 = 2.13809
- Standard error of the mean: s ÷ √n = 2.13809 ÷ √8 = 0.755929
Deviations from the mean
| x | x − x̄ | (x − x̄)² | |
|---|---|---|---|
| 2 | −3 | 9 | |
| 4 | −1 | 1 | |
| 4 | −1 | 1 | |
| 4 | −1 | 1 | |
| 5 | 0 | 0 | |
| 5 | 0 | 0 | |
| 7 | 2 | 4 | |
| 9 | 4 | 16 | |
| Sum | 40 | 0 | 32 |
How to use the standard deviation calculator
Paste your numbers into the box. Commas, spaces, tabs and new lines all work as separators, so you can copy a column straight from Excel or Google Sheets. Then choose Sample or Population:
- Sample (the default) when your numbers are a subset of a larger group, such as 30 survey responses, a batch of test measurements or one class’s marks used to describe a whole school. Most real-world data are samples.
- Population when you have every member of the group you care about, such as the daily sales for every day last month.
You get the standard deviation, the variance, the mean, the standard error, the range and the coefficient of variation, plus the other kind of standard deviation for comparison. For up to 50 values, a table lists each value’s deviation from the mean and its square.
Standard deviation formula
Sample standard deviation: s = √( Σ(x − x̄)² ÷ (n − 1) )
Population standard deviation: σ = √( Σ(x − μ)² ÷ N )
- x = each value
- x̄ or μ = the mean (x̄ for a sample, μ for a population)
- n or N = the number of values
- Σ(x − x̄)² = the sum of squared deviations, also called the sum of squares
The variance is the same formula without the square root: s² for a sample and σ² for a population.
Worked example: standard deviation by hand
Take the eight values 2, 4, 4, 4, 5, 5, 7 and 9, which are already in the calculator.
- Add them up: Σx = 40. Divide by the count: mean = 40 ÷ 8 = 5.
- Subtract the mean from each value and square the result:
| x | x − 5 | (x − 5)² |
|---|---|---|
| 2 | −3 | 9 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 4 | −1 | 1 |
| 5 | 0 | 0 |
| 5 | 0 | 0 |
| 7 | 2 | 4 |
| 9 | 4 | 16 |
| Sum | 0 | 32 |
- Population: variance = 32 ÷ 8 = 4, so σ = √4 = 2.
- Sample: variance = 32 ÷ 7 = 4.571429, so s = √4.571429 = 2.13809.
- Standard error (sample): 2.13809 ÷ √8 = 0.755929.
The deviations always add up to zero, which is a handy check on your arithmetic. Squaring them stops positive and negative differences from cancelling out.
Sample or population: which one should you use?
Use the sample formula whenever you want to say something about a bigger group than the one you measured. The n − 1 divisor (Bessel’s correction) makes the sample variance an unbiased estimate of the population variance. The gap between the two shrinks as n grows: with 8 values the sample SD is about 7% larger, and with 100 values the difference is about 0.5%.
| Tool | Sample | Population |
|---|---|---|
| Excel | STDEV.S | STDEV.P |
| Google Sheets | STDEV | STDEVP |
| TI-84 (1-Var Stats) | Sx | σx |
| Casio (statistics mode) | sx or xσn−1 | σx or xσn |
What standard deviation tells you
For data that follow a bell-shaped normal distribution, the 68–95–99.7 rule applies. About 68% of values fall within one standard deviation of the mean, about 95% within two and about 99.7% within three. If exam scores have a mean of 70 and a standard deviation of 10, roughly 68% of students scored between 60 and 80 and about 95% between 50 and 90. To place one value on that scale, use the z-score calculator, which converts a score into standard deviations from the mean and a percentile.
Standard deviation is sensitive to outliers because the deviations are squared. One extreme value can inflate it a lot, so look at the deviations table for any single row that dominates the sum of squares.
Variance, standard deviation and standard error
These three are easy to mix up:
- Variance is the average squared deviation. It is useful in formulas, since variances of independent quantities add, but its units are squared.
- Standard deviation is the square root of the variance and describes the spread of the individual values.
- Standard error of the mean is the standard deviation divided by √n. It describes how precisely the sample mean estimates the true mean, and it shrinks as you collect more data.
If you only need the mean, median or mode, the average calculator shows all three. For measurement accuracy against a known value, the percent error calculator is the right tool.
Standard Deviation Calculator: frequently asked questions
What is standard deviation?
Standard deviation measures how spread out numbers are around their mean. A small value means the data sit close to the average, and a large value means they are widely scattered. It is in the same units as the data, so a standard deviation of 2 cm means a typical value is about 2 cm from the mean.
How do I calculate standard deviation by hand?
Find the mean, subtract it from each value, square those differences, add them up, divide by n − 1 (sample) or N (population), and take the square root. For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5, the squared differences add to 32, and the population standard deviation is √(32 ÷ 8) = 2.
Why does the sample standard deviation divide by n − 1?
A sample's own mean sits closer to its values than the true population mean does, so dividing by n would underestimate the spread. Dividing by n − 1, known as Bessel's correction, removes that bias from the variance. For the example data the sample SD is 2.13809, slightly higher than the population SD of 2.
What is the difference between variance and standard deviation?
Variance is the average squared distance from the mean, and standard deviation is its square root. A variance of 4 means a standard deviation of 2. Standard deviation is easier to interpret because it is in the original units rather than squared units.
How do I calculate standard deviation in Excel or Google Sheets?
Use =STDEV.S(range) for a sample and =STDEV.P(range) for a population. In Google Sheets, STDEV and STDEVP do the same jobs. For 2, 4, 4, 4, 5, 5, 7, 9, STDEV.S returns 2.13809 and STDEV.P returns 2, matching this calculator.
Can standard deviation be zero or negative?
It can be zero, when every value is identical, as in 5, 5, 5. It can never be negative, because it is the square root of an average of squared numbers.
What is the standard error of the mean?
The standard error estimates how far a sample mean is likely to be from the true population mean. It equals the standard deviation divided by the square root of the sample size. With s = 2.13809 and n = 8, the standard error is 2.13809 ÷ √8 = 0.755929.
What is a good or high standard deviation?
There is no universal cut-off, because it depends on the scale of the data. Compare it with the mean using the coefficient of variation (CV): 2.13809 ÷ 5 = 42.76%, which is a lot of spread. The CV is also the fairest way to compare spread between data sets with very different means.
How we checked this page: every figure in the examples and FAQs above is produced by this calculator and verified by automated tests against known answers, and the rules and rates come from the sources below. Last updated . Spotted a problem? Tell us.
Sources and further reading