Sample and population SD, variance, and mean from any data set
Standard deviation measures spread: the typical distance from the mean. For 4, 8, 15, 16, 23, 42 the mean is 18, the squared deviations sum to 910, and the population SD is √(910/6) = 12.32 while the sample SD is √(910/5) = 13.49. Use the sample version (divide by n − 1) when your data is a sample of a larger population; use the population version (divide by n) only when you have every member of the group.
| x | x − x̄ | (x − x̄)² |
|---|---|---|
| 4 | −14 | 196 |
| 8 | −10 | 100 |
| 15 | −3 | 9 |
| 16 | −2 | 4 |
| 23 | 5 | 25 |
| 42 | 24 | 576 |
| x̄ = 18 | Σ = 910 |
Population: variance = 910 ÷ 6 = 151.67, σ = 12.32. Sample: variance = 910 ÷ 5 = 182, s = 13.49. The calculator runs this exact table on your data — every number above is reproducible by hand.
| Range Around Mean | Share of Data (approx.) | Example: mean 18, σ = 12.32 |
|---|---|---|
| ±1 SD | 68% | 5.7 to 30.3 |
| ±2 SD | 95% | −6.6 to 42.6 |
| ±3 SD | 99.7% | −19 to 55 |
The 68-95-99.7 rule holds for roughly symmetric, bell-shaped data. Skewed data breaks it — a single extreme value can pull the mean far from where most values sit, which is why the deviations table above is worth glancing at, not just the final SD.
Standard deviation answers "how spread out is this data?" in the data's own units. A low SD clusters tight around the mean; a high SD scatters. It's the most-quoted measure of spread in statistics because it behaves well mathematically and maps onto the bell curve.
Mean: x̄ = Σx ÷ n. Then sum the squared deviations: SS = Σ(x − x̄)². Population SD: σ = √(SS ÷ n). Sample SD: s = √(SS ÷ (n − 1)). Same recipe, different divisor — and the sample version's n − 1 (Bessel's correction) compensates for the fact that a sample's own mean sits closer to its points than the true population mean would, which otherwise biases the spread estimate low.
Paste or type numbers separated by commas, spaces, or line breaks. Pick sample or population: if your data is a draw from a bigger population — a survey, an experiment, this month's orders — choose sample. Only use population when you truly have every member of the group. The calculator shows both SDs side by side either way, along with mean, median, mode, variance, and the sum of squared deviations so you can check homework line by line.
Take 4, 8, 15, 16, 23, 42. The mean is 108 ÷ 6 = 18. The deviations run −14, −10, −3, −2, 5, 24; their squares total 910. As a population: variance 151.67, SD 12.32. As a sample: variance 182, SD 13.49. Notice 42 dominates the sum of squares — 576 of the 910 comes from that one value. SD is sensitive to outliers, which is a feature when you want them flagged and a bug when you don't.
Second example, tighter data: 10, 12, 23, 23, 16, 23, 21, 16. Mean 18 again, but the squared deviations total only 192, so the population SD is √24 = 4.90 and the sample SD is √27.43 = 5.24. Same center, much less spread.
The mean is 18. The squared deviations sum to 910. Divide by 6 for the population SD and you get a variance of 151.67 and an SD of 12.32; divide by 5 for the sample SD and you get a variance of 182 and an SD of 13.49. Use the population version only if those six values are the entire data set you care about.
Use the sample formula (divide by n − 1) whenever your data is a sample drawn from a bigger population and you want to estimate that population's spread — surveys, experiments, most real data. Use the population formula (divide by n) only when you have every member of the group, like the heights of a whole class roster or every transaction in a closed ledger.
Bessel's correction. A sample's deviations are measured from the sample's own mean, which sits closer to the sample points than the true population mean does, so the naive calculation systematically understates spread. Dividing by n − 1 instead of n corrects the bias, and the correction matters most for small samples: with 5 values it inflates the variance by 25%.
There's no universal good number — SD is in the same units as the data. What counts as small depends on scale: an SD of 2 is tight for human heights in inches and enormous for machine-tolerance measurements in millimeters. The meaningful questions are comparative: is this group's SD larger than that group's, and how many SDs from the mean does a particular value sit?
Variance is the average of the squared deviations; standard deviation is its square root. Squaring makes variance awkward to interpret (it's in squared units, like dollars²), so SD is the one people quote. Variance is the one that adds cleanly across independent variables, which is why both appear in statistics.
Not directly — variances add, SDs don't. Two independent sources each with SD 3 combine to a variance of 9 + 9 = 18 and an overall SD of √18 ≈ 4.24, not 6. Adding SDs overstates combined uncertainty; adding variances then taking the square root is correct when the sources are independent.