Standard Deviation Calculator
Free to use. Runs in your browser: your files and text are not uploaded.
Paste a list of numbers to get the standard deviation, both sample and population, along with the variance, mean and other summary figures.
How to use it
Type or paste numbers separated by commas, spaces or new lines. A column copied from Excel or Google Sheets works as it is. The results update as you type.
The formulas
- Mean: x̄ = sum of the values ÷ n
- Population variance: σ² = Σ(x − x̄)² ÷ n
- Sample variance: s² = Σ(x − x̄)² ÷ (n − 1)
- Standard deviation: the square root of the variance
Worked example
For the numbers 2, 4, 4, 4, 5, 5, 7, 9:
- n = 8 and the sum is 40, so the mean is 40 ÷ 8 = 5.
- Subtract the mean from each value and square it: 9, 1, 1, 1, 0, 0, 4, 16.
- Those squares add up to 32.
- Population variance = 32 ÷ 8 = 4, so σ = √4 = 2.
- Sample variance = 32 ÷ 7 = 4.5714, so s = √4.5714 = 2.13809.
Reading the result
For data that follows a normal (bell-shaped) distribution, about 68% of values lie within one standard deviation of the mean, about 95% within two, and about 99.7% within three. With a mean of 5 and σ of 2, about 95% of such values would fall between 1 and 9.
In Excel and Python
- Excel:
STDEV.Sfor a sample,STDEV.Pfor a population. - Python:
statistics.stdevfor a sample,statistics.pstdevfor a population. NumPy’snp.stdgives the population figure unless you passddof=1.
Limits
- At least two numbers are needed.
- Results are rounded to 6 decimal places.
- Standard deviation is pulled strongly by extreme values. One outlier can change it a great deal.
Frequently asked questions
What is the difference between sample and population standard deviation?
Use population (divide by n) when your numbers are the whole group you care about. Use sample (divide by n − 1) when they are a sample used to estimate a larger group. The sample figure is slightly larger.
What does standard deviation tell you?
How spread out the numbers are around their mean. A small value means they are close together. A large value means they are widely scattered.
Why divide by n − 1 for a sample?
A sample's values sit closer to their own mean than to the true mean of the whole group, which makes the spread look too small. Dividing by n − 1 corrects for that. It is called Bessel's correction.