Standard Deviation Calculator
Paste numbers to get sample or population standard deviation, variance, mean, sum of squares, standard error and coefficient of variation, with each step shown.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Standard Deviation Calculator?
Paste a list of numbers and the Standard Deviation Calculator returns the spread of the data: the standard deviation, the variance, the mean, the sum of squared deviations, the standard error of the mean and the coefficient of variation. A single switch chooses between the sample formula, which divides by n - 1, and the population formula, which divides by N, and a side-by-side table shows both so you can see how much the choice matters for your data.
Below the answer is a deviation table with one row per value: the value, its distance from the mean and that distance squared. The squared column adds up to the sum of squares, which is exactly the working a statistics teacher expects on paper. You can paste a spreadsheet column, a comma list or numbers separated by spaces, and anything that is not a number is reported rather than silently dropped.
- Sample (n - 1) and population (N) results side by side
- Deviation table with every squared difference and the totals
- Coefficient of variation and standard error of the mean
- Numerically stable one-pass algorithm, tested against NIST reference data
- Accepts pasted spreadsheet columns, CSV rows and free text
- Runs in your browser; your data is not uploaded
How to use the Standard Deviation Calculator
- Paste or type your numbers in the box. Commas, spaces, tabs, semicolons and new lines all work as separators.
- Pick Sample if the numbers are a subset you are using to describe a larger group, or Population if they are every member of the group.
- Read the standard deviation, variance and mean at the top, then the coefficient of variation and standard error beside them.
- Scroll to the deviation table to see x - mean and (x - mean)² for each value and the totals that build the answer.
- Use Copy result for a text summary or Share link to send a URL that reopens the same data.
Worked examples
The classic eight-value data set
Input
2, 4, 4, 4, 5, 5, 7, 9
Output
Mean 5, sum of squares 32, population SD 2, sample SD 2.1380899, sample variance 4.5714286
The deviations from 5 square to 9, 1, 1, 1, 0, 0, 4 and 16, which total 32. Divided by 8 that is 4, so σ = 2. Divided by 7 it is 4.571, so s = 2.138. This set appears in many textbooks because the population answer is a whole number.
Five test scores
Input
72, 85, 90, 64, 78 (sample)
Output
Mean 77.8, s = 10.305338, s² = 106.2, standard error 4.6086874, CV 13.246%
A typical score sits about 10 points from the class average. The standard error of 4.6 says the mean of 77.8 is itself uncertain by roughly that much, because five scores is a small sample.
Values with a large offset
Input
1000000.1, 1000000.2, 1000000.3 (sample)
Output
Mean 1000000.2, s = 0.1
The one-pass algorithm keeps the answer at 0.1. The naive Σx² shortcut squares numbers near 10¹² and loses the digits that hold the variance.
Background and insight
Standard deviation is the square root of the variance, and the variance is the average squared distance from the mean. For a whole population that average divides by N. For a sample, dividing by N would understate the spread, because the sample mean is by construction closer to the sample values than the true mean is; dividing by n - 1 instead (Bessel's correction) makes the sample variance an unbiased estimate of the population variance. With 8 values the difference is a factor of √(8/7), about 7%; with 1,000 values it is negligible.
The arithmetic uses Welford's one-pass algorithm rather than the textbook shortcut Σx² - (Σx)²/n. The shortcut subtracts two huge, nearly equal numbers when the data sit far from zero, such as readings near 1,000,000 that differ in the first decimal place, and in floating point it can return a variance that is wildly wrong or even negative. Welford updates the mean and the sum of squares one value at a time and stays accurate; the regression tests check it against the NIST Statistical Reference Datasets NumAcc1 and NumAcc3, whose certified standard deviations are 1 and 0.1.
The coefficient of variation divides the standard deviation by the absolute mean, which turns spread into a unitless percentage you can compare across data measured on different scales. The standard error, s / √n, is the standard deviation of the sample mean itself, and it is the figure that feeds confidence intervals and t-tests.
Common use cases
Statistics homework
Check a hand calculation step by step against the deviation table, and confirm whether the question wants the sample or population version.
Lab and measurement data
Summarise repeat readings from an instrument and report the mean with its standard error.
Comparing consistency
Use the coefficient of variation to compare spread between data on different scales, such as delivery times in hours and order values in dollars.
Investment volatility
Paste monthly returns to see how much they swing around their average, the quantity finance calls volatility.
Tips and limitations
- If you are unsure which formula you need, you almost certainly want the sample version. Population SD is for the case where you really have every member, such as all 30 students in one class when you only care about that class.
- A sample standard deviation needs at least two values. With one value there is no spread to estimate, so only the population figure (0) is shown.
- Standard deviation is sensitive to outliers because deviations are squared. One extreme value can dominate; the Mean, Median and Mode Calculator flags outliers by the 1.5 x IQR rule.
- The coefficient of variation is meaningless for data that can be negative or that sit on an arbitrary zero, such as temperatures in Celsius.
- Thousands separators are read as list separators, so paste 1234 rather than 1,234.
Frequently asked questions
What is the difference between sample and population standard deviation?
Population standard deviation divides the sum of squared deviations by N, the number of values. Sample standard deviation divides by n - 1. Use the sample version when your numbers are a subset used to estimate a larger group, which is the usual situation; the n - 1 corrects the tendency of a sample to look less spread out than the population it came from.
How do you calculate standard deviation by hand?
Find the mean, subtract it from each value, square each difference, add the squares, 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 squares add to 32, 32 / 8 = 4 and the population SD is 2.
What does a standard deviation tell you?
It is the typical distance of a value from the mean, in the same units as the data. For roughly bell-shaped data about 68% of values fall within one standard deviation of the mean and about 95% within two.
Is variance the same as standard deviation?
No. Variance is the average squared deviation and is in squared units (square centimetres, dollars squared). Standard deviation is its square root, which brings it back to the original units and makes it easier to interpret.
What is the standard error of the mean?
It is the sample standard deviation divided by the square root of n. It measures how much the sample mean would vary from sample to sample, and it shrinks as you collect more data, whereas the standard deviation of the data does not.
What is a good coefficient of variation?
There is no universal threshold; it depends on the field. A precise lab instrument may show a CV of a few percent, while daily stock returns routinely have CVs well above 100%. Use it to compare spread between groups, not as a pass mark.
Can standard deviation be negative?
No. It is the square root of an average of squared numbers, so it is zero when every value is identical and positive otherwise.
Is there an in-depth guide to the Standard Deviation Calculator?
Yes. “Mean, Median, Standard Deviation and Z-Scores Explained” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.