Standard Deviation Calculator
Calculate standard deviation, variance and mean for a set of values, as a sample or population. Enter values separated by commas, spaces, tabs or new lines.
How to use this calculator
- Enter your values in the box, separated by commas, spaces or new lines.
- Choose Sample if your data is part of a wider group, or Population if it includes every value in the group.
- Choose the number of decimal places you want to display.
- The calculator shows the standard deviation, variance, mean and other summary statistics automatically as you type.
The calculation runs in the page — nothing is sent to a server.
What does standard deviation mean?
Standard deviation measures how spread out a group of values is around its average. A small standard deviation means the values are generally close to the mean. A larger standard deviation means the values are more widely spread out.
- A standard deviation of 0 means every value is the same.
- A smaller standard deviation means less variation in the data.
- A larger standard deviation means more variation in the data.
- Standard deviation is shown in the same units as the original values.
How is standard deviation calculated?
Find the mean, take the difference between each value and the mean, square those differences and add them up, divide by the number of values (population) or one less (sample), then take the square root.
- xᵢ is each entered value.
- μ (population) and x̄ (sample) are the mean of the values.
- N is the number of values; n − 1 is used for a sample.
- Variance is the same expression without the square root.
This calculator uses Welford’s online algorithm, a single-pass method that stays accurate even when the values are large and close together.
Sample vs population standard deviation
| Type | Use it when | Divide by |
|---|---|---|
| Sample | Your values are part of a larger group | n − 1 (s) |
| Population | Your values are the complete group | N (σ) |
Sample standard deviation uses n − 1 instead of n because it estimates variation in a larger population from a smaller sample of data.
Standard deviation vs variance
Both variance and standard deviation describe how spread out values are. Variance is the average squared distance from the mean. Standard deviation is the square root of variance, which makes it easier to interpret because it uses the same units as the original data.
Worked example
For the values 2, 4, 4, 4, 5, 5, 7, 9 the mean is 5. The squared differences from the mean add up to 32.
| Step | Value |
|---|---|
| Mean | 40 ÷ 8 = 5 |
| Squared differences | 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32 |
| Variance | 32 ÷ 8 = 4 |
| Standard deviation | √4 = 2 |
Treating the same values as a sample divides by 7 rather than 8:
| Step | Value |
|---|---|
| Squared differences | 32 (as above) |
| Variance | 32 ÷ 7 = 4.5714 |
| Standard deviation | √4.5714 = 2.1381 |
What values can I enter?
Enter positive numbers, negative numbers, whole numbers and decimals, separated by commas, spaces, tabs, semicolons or new lines — so a column of numbers pasted from a spreadsheet works as well as a comma-separated list. Commas are treated as separators, not decimal points, in line with UK number formatting.
Entries that are not numbers, such as five or 2kg, are reported rather than silently ignored, and the result is held back until they are corrected.