Standard Deviation Calculator
Type or paste your numbers to get the sample and population standard deviation, with the variance and every step worked out.
Separate with commas, spaces or new lines
What you can type:
- Lists:
4, 7 10; 12is four numbers. Commas, spaces, new lines, tabs and semicolons all separate numbers. - Pasted columns:
4 ↵ 7 ↵ 10pasted as a column from Excel, Google Sheets or a CSV file is three numbers. - Fractions:
7/10, 3/4is 0.7 and 0.75. Write a mixed number such as 1 1/2 as 3/2 or 1.5. - Decimal commas:
1,5; 2,5is 1.5 and 2.5. A comma is read as a decimal comma when the numbers are separated by spaces, semicolons or new lines and none uses a decimal point. - Thousands:
1,200, 1,500is 1200 and 1500. Commas before groups of three digits are thousands separators when the numbers are also separated some other way. - Percent and currency signs:
12%, $40, €3.50is 12, 40 and 3.5. - Exponents and minus signs:
1e3, −4is 1000 and -4. - Anything else:
Score: 4, 7reads 4 and 7 and names “Score:” as ignored. Words, a header row or a date are never dropped silently: the line under the field names everything that was ignored.
↵ is a new line and ⇥ a tab.
Values used: 2, 4, 4, 4, 5, 5, 7, 9
2, 4, 4, 4, 5, 5, 7, 9
Sample standard deviation (s) 2.1381, 8 values.
Worked example for 2, 4, 4, 4, 5, 5, 7, 9.
Sample standard deviation (s) 2.1381
Population standard deviation (σ) 2
- Sample variance (s²)
- 4.5714
- Population variance (σ²)
- 4
- Mean
- 5
- Count
- 8
- Sum
- 40
- Standard error of the mean
- 0.7559
- Coefficient of variation (s ÷ mean)
- 42.76%
- Range
- 7
Show the steps
- Find the mean: x̄ = 40 ÷ 8 = 5
- Subtract the mean from each value, and square each difference:
Deviations from the mean, 5 # Value x x − x̄ (x − x̄)² 1 2 -3 9 2 4 -1 1 3 4 -1 1 4 4 -1 1 5 5 0 0 6 5 0 0 7 7 2 4 8 9 4 16 Sum 40 0 32 - Add the squared deviations: Σ(x − x̄)² = 32
- Sample: divide by n − 1 = 7: s² = 32 ÷ 7 ≈ 4.5714; then take the square root: s = √4.5714 ≈ 2.1381
- Population: divide by n = 8: σ² = 32 ÷ 8 = 4; then take the square root: σ = √4 = 2
Standard deviation formula
There are two versions. They differ only in what the sum of squared deviations is divided by.
s = √( Σ(x − x̄)² ÷ (n − 1) )
σ = √( Σ(x − μ)² ÷ N )
- s is the sample standard deviation and σ (sigma) the population standard deviation.
- x is each value, and Σ means “add up for every value”.
- x̄ (x-bar) is the mean of the sample and μ (mu) the mean of the population.
- n is the number of values in the sample and N the number in the population.
Without the square root, the same formulas give the variance: s² for a sample and σ² for a population.
How to calculate standard deviation
Take the 5 values 4, 8, 6, 5, 7:
- Find the mean: (4 + 8 + 6 + 5 + 7) ÷ 5 = 6.
- Subtract the mean from each value: -2, 2, 0, -1, 1.
- Square each difference: 4, 4, 0, 1, 1.
- Add the squares: 4 + 4 + 0 + 1 + 1 = 10.
- Divide by n − 1 = 4 for a sample: 10 ÷ 4 = 2.5. This is the sample variance.
- Take the square root: √2.5 = 1.5811. This is the sample standard deviation.
For a whole population, divide by n = 5 instead: 10 ÷ 5 = 2, and σ = √2 = 1.4142. Open this example in the calculator.
Sample or population?
Use the sample standard deviation when your numbers are a sample from a larger group: 30 customers out of thousands, a batch of parts from a production run, one class out of a year group. Use the population standard deviation only when you have every member of the group you want to describe. When unsure, use the sample figure; it is what most textbooks and Excel’s STDEV.S report.
Dividing by n − 1 instead of n (Bessel’s correction) makes up for the fact that a sample’s values sit closer to their own mean than to the mean of the whole population. Choose Population above the box to make the population figure the headline; links you copy keep your choice.
What the standard deviation tells you
The standard deviation is roughly the typical distance of a value from the mean, in the same units as the data. A small one means the values sit close to the mean; a large one means they are spread out. The number line in the calculator marks the mean and one standard deviation either side of it.
For data that is roughly normal (bell-shaped), about 68% of the values lie within one standard deviation of the mean, about 95% within two and about 99.7% within three. This is the 68-95-99.7 rule. It does not hold for skewed data or data with outliers, so look at the number line before relying on it.
Standard deviation vs variance
The variance is the standard deviation squared: the average squared distance from the mean. It is useful in calculations, because variances of independent quantities add up, but it is in squared units (square centimetres for heights in centimetres). The standard deviation is in the original units, so it is easier to read. For the worked example the sample variance is 2.5 and the sample standard deviation 1.5811.
Related
For quartiles, outliers, a confidence interval and the shape of the data, use the descriptive statistics calculator. For the average itself, use the mean calculator, and for the middle value the median calculator.
Common questions
How do you calculate the standard deviation?
Find the mean, subtract it from each value and square the differences, add the squares, divide by n − 1 (or by n for a whole population) and take the square root. For 4, 8, 6, 5, 7 the mean is 6, the squared differences add up to 10, and √(10 ÷ 4) = 1.5811.
What is the difference between the sample and the population standard deviation?
The sample standard deviation (s) divides by n − 1 and is used when your numbers are a sample from a larger group. The population standard deviation (σ) divides by n and is used when you have every member of the group. The sample figure is never smaller, and noticeably larger for small samples; for large data sets the two are almost the same.
How do I calculate this in Excel or Google Sheets?
Use =STDEV.S(A1:A20) for the sample standard deviation (dividing by n − 1) and =STDEV.P(A1:A20) for the population standard deviation (dividing by n), with your own range; =VAR.S and =VAR.P give the variances. Google Sheets has the same functions. The older STDEV and STDEVP are the same as STDEV.S and STDEV.P. This calculator shows both.
Can the standard deviation be negative?
No. It is the square root of an average of squares, so it is 0 or more. It is 0 only when every value is the same.
Is a high standard deviation good or bad?
Neither: it only says how spread out the values are. Whether that is good depends on the data. Consistent machine parts should have a small standard deviation; a varied test may be designed to have a large one.
Cite this page
Standard Deviation Calculator. https://meancalculator.com/standard-deviation-calculator.html