Standard Deviation Calculator
Standard deviation measures how far values sit from their mean. Here are the ages of 20 fifth graders.
- Sample and population
- Every step in a table
- Updated Nov 4, 2026
- Values20 ages, 9 to 11.5
- Mean10.525
- Population σ (÷ n)0.6978
- Sample s (÷ n − 1)0.7159
Paste or type a data set to get its standard deviation, the number that measures how far the values sit from their mean. You get the sample and population standard deviation and variance side by side, a table with every step, and the z-score of any value you want to compare. The example data are the ages of 20 fifth graders from OpenStax's statistics textbook.
What Standard Deviation Means
"The standard deviation is a number that measures how far data values are from their mean" (OpenStax, Introductory Statistics 2e, 2.7). A small standard deviation means the values cluster near the mean; a large one means they're spread out. It's in the same units as the data, so for ages in years, the standard deviation is in years too. The variance is the standard deviation squared.
Sample vs. Population Standard Deviation
The two formulas differ only in what you divide by. "For the sample standard deviation, the denominator is n - 1, that is the sample size MINUS 1," while "for the population standard deviation, the denominator is N, the number of items in the population" (OpenStax 2.7). Divide by N only when your numbers are the entire population, such as a census; for data drawn from a bigger group, use the sample formula. NIST's statistics handbook gives the sample version (NIST/SEMATECH e-Handbook, 1.3.5.6):
s = √( Σ(x − x̄)² ÷ (n − 1) )The population version divides by N instead (OpenStax 2.7):
σ = √( Σ(x − μ)² ÷ N )Because the two use the same sum, s = σ × √(n ÷ (n − 1)), so the sample figure is the larger one whenever the values vary. For the 20 ages it's 0.7159 against 0.6978, about 2.6% larger; with only 3 values it would be about 22% larger.
| Detail | Sample | Population |
|---|---|---|
| Symbol | s (variance s²) | σ (variance σ²) |
| Divide the sum of squares by | n − 1 | N |
| Use when | The data are drawn from a bigger group | You have every value in the group, such as a census |
| OpenStax's 20 ages | 0.7159 (variance 0.5125) | 0.6978 (variance 0.4869) |
How to Calculate Standard Deviation, Step by Step
OpenStax works through the ages of 20 fifth graders (Example 2.32), the data loaded in the calculator above:
- Find the mean: add the 20 ages and divide by 20 to get 10.525 years.
- Find each deviation: subtract the mean from each value, such as 9 − 10.525 = −1.525.
- Square the deviations and add them: the squared deviations total 9.7375.
- Divide: for a sample, by n − 1 = 19, giving a variance of 0.5125.
- Take the square root: √0.5125 = 0.7159, which OpenStax rounds to s = 0.72 years.
Open "Every step" in the results to see the same table for your own data.
Variance
The variance is the standard deviation before the square root: the sum of squares divided by n − 1 for a sample (s²) or by N for a population (σ²), so roughly the average squared deviation. For the fifth graders, the sample variance is 9.7375 ÷ 19 = 0.5125 and the population variance is 9.7375 ÷ 20 = 0.4869. Because the variance is in squared units (years² for ages), the standard deviation, back in the data's own units, is usually easier to read. For the variance on its own, with every squared deviation, use the variance calculator.
Z-Score
A z-score tells you "how many standard deviations the value x is above (to the right of) or below (to the left of) the mean":
z = (x − μ) ÷ σOpenStax's example: with a mean of 5 and a standard deviation of 6, the value 17 has z = (17 − 5) ÷ 6 = 2, two standard deviations above the mean (OpenStax, Introductory Statistics 2e, 6.1). Enter a value in "Value to compare" to get its z-score from your data's mean and standard deviation, using the sample or population figure you chose. To turn a z-score into a percentile, or a percentile into a value, use the z-score calculator.
When Standard Deviation Is a Good Measure of Spread
NIST's handbook says that "if a histogram or normal probability plot indicates that your data are approximated well by a normal distribution, then it is reasonable to use the standard deviation as the spread estimator." For lopsided data or data with outliers, also look at the range and the median, which the mean, median, mode calculator gives. For a simple average, use the average calculator; when some values count more than others, the weighted average calculator. Or see all the math calculators.