Standard deviation calculator

Paste your data to see how spread out it is, using the right formula for samples or whole populations.

Tier 0 · browser · unlimited

Your data

Standard deviation
2.1380899353
Variance4.5714285714
Mean5
Count8
Coefficient of variation (%)42.7618

What standard deviation tells you

Standard deviation measures how far values typically are from their average. A small standard deviation means the values cluster near the mean; a large one means they are spread out. In a normal distribution, about 68% of values fall within one standard deviation of the mean and 95% within two.

Sample or population?

Use population when you have every member of the group you care about (all employees' salaries, all items in a batch). Use sample when your numbers are a subset used to estimate a larger group (a survey, a set of measurements). The sample formula divides by n − 1 instead of n, which corrects the tendency of a sample to underestimate the spread. Spreadsheets call these STDEV.P and STDEV.S.

Worked example

For 2, 4, 4, 4, 5, 5, 7, 9: the mean is 5. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32. As a population, variance = 32 ÷ 8 = 4 and σ = 2. As a sample, variance = 32 ÷ 7 ≈ 4.571 and s ≈ 2.138.

How this works

The page computes the mean, then sums the squared differences between each value and the mean (two passes, which stays accurate even when all values are large, such as 1,000,000,001 and 1,000,000,002). It divides by n for a population or by n − 1 for a sample to get the variance, and takes the square root for the standard deviation. The coefficient of variation is the standard deviation as a percentage of the mean. Everything runs in your browser.

Frequently asked

Should I use sample or population standard deviation?

Sample, unless your data includes every member of the group. Most real data sets are samples.

What is the difference between variance and standard deviation?

Variance is the average squared deviation; standard deviation is its square root, in the same units as the data.

Which Excel function matches this?

STDEV.S for sample and STDEV.P for population; VAR.S and VAR.P for variance.

What is the coefficient of variation?

The standard deviation divided by the mean, as a percentage. It compares spread between data sets with different scales.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/calculators/math/standard-deviation-calculator/