Enter your data set to calculate mean, standard deviation, variance, and more.
| # | xᵢ | xᵢ − x̄ | (xᵢ − x̄)² |
|---|
Standard Deviation Explained
Standard deviation measures how far values typically sit from their mean. For the data 4, 7, 13, 16, 21, 2, 8, 11, 19, 5 the mean is 10.6 and the sample standard deviation is 6.52, or 6.18 if those ten values are the whole population. Paste your own numbers above to get both versions, the variance and every step of the working.
Standard deviation measures how spread out values in a data set are from the mean. A low SD means values cluster tightly around the mean. A high SD means values are spread out widely. It is the most widely used measure of variability in statistics.
There are two versions: population SD (σ) divides by n: used when you have all values for the entire population. Sample SD (s) divides by n−1: used when your data is a sample from a larger population (the most common real-world case). Dividing by n−1 corrects for the bias that comes from estimating the population mean from a sample.
Sample SD: s = √( Σ(xᵢ − x̄)² / (n−1) )
Variance: σ² or s² = (SD)²
Mean: x̄ = Σxᵢ / n
Population vs Sample SD
The 68-95-99.7 Rule
Coefficient of Variation
Real-World Uses
Worked Example: Sample vs Population
The ten values loaded in the calculator add up to 106, so the mean is 106 ÷ 10 = 10.6. Next, subtract the mean from each value and square the result.
| x | x − mean | (x − mean)² | x | x − mean | (x − mean)² |
|---|---|---|---|---|---|
| 4 | −6.6 | 43.56 | 2 | −8.6 | 73.96 |
| 7 | −3.6 | 12.96 | 8 | −2.6 | 6.76 |
| 13 | 2.4 | 5.76 | 11 | 0.4 | 0.16 |
| 16 | 5.4 | 29.16 | 19 | 8.4 | 70.56 |
| 21 | 10.4 | 108.16 | 5 | −5.6 | 31.36 |
The squared deviations add up to 382.4. From there the two versions split:
- Sample: variance = 382.4 ÷ 9 = 42.49, and SD = √42.49 = 6.52.
- Population: variance = 382.4 ÷ 10 = 38.24, and SD = √38.24 = 6.18.
How Much Dividing by n − 1 Changes the Result
For the same data the sample SD is always larger than the population SD, by a factor of √(n ÷ (n − 1)). The gap matters for small data sets and all but disappears for large ones.
| Values (n) | Sample SD ÷ population SD | Sample SD is larger by |
|---|---|---|
| 2 | 1.414 | 41.4% |
| 3 | 1.225 | 22.5% |
| 5 | 1.118 | 11.8% |
| 10 | 1.054 | 5.4% |
| 30 | 1.017 | 1.7% |
| 100 | 1.005 | 0.5% |
| 1,000 | 1.001 | 0.1% |
The same choice in spreadsheets and calculators
| Tool | Sample (n − 1) | Population (n) |
|---|---|---|
| Excel | STDEV.S (or older STDEV) | STDEV.P (or older STDEVP) |
| Google Sheets | STDEV or STDEV.S | STDEVP or STDEV.P |
| Variance in Excel | VAR.S | VAR.P |
| TI-84 (1-Var Stats) | Sx | σx |
Edge Cases and Common Mistakes
- Only one value. The sample SD is undefined because you would divide by n − 1 = 0, so the calculator asks for at least two numbers.
- All values the same. {5, 5, 5, 5} gives an SD of exactly 0. That is correct, and usually worth a second look at the data.
- Commas inside numbers. The calculator treats commas, spaces and new lines as separators, so 1,500 is read as two values, 1 and 500. Type large numbers without thousands separators.
- Negative values are fine. Returns such as −3.7% work normally. The SD itself is never negative, because it is the square root of an average of squares.
- Picking the wrong version. Use population only when you truly have every member of the group. Survey responses, lab measurements and test samples are samples.
- Applying the 68-95-99.7 rule to skewed data. The rule only holds for data that is roughly bell shaped. For incomes, house prices and anything with a long tail, the median and interquartile range describe the data better.
For the mean, median and mode alone, the average calculator is quicker.