How to Calculate Standard Deviation Step by Step
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Calculating standard deviation becomes easier when you see it as a measure of how spread out data is around its mean. The calculation finds typical squared distance from the mean and then converts that result back to the original units.
From a data set to a single number
Start by finding the arithmetic mean. Suppose your data values are 2, 4, 4, 6. Their total is 16, so the mean is 4. Next find each value's difference from the mean. The differences are -2, 0, 0, and 2. These differences show how far each observation lies above or below the centre.
If you simply added those differences, positive and negative values would cancel. That is why the calculation includes squaring each difference. The squared differences are 4, 0, 0, and 4. Their total is 8. The next step uses these squared distances to find the variance.
Variance comes before standard deviation
For a complete population, divide the sum of squared differences by the number of values. In this example, 8 divided by 4 gives a population variance of 2. Standard deviation is the square root of variance, so the population standard deviation is the square root of 2, which is about 1.41.
The reason for the final square root is useful to remember. Squaring the deviations created squared units. If the original data was measured in centimetres, the variance would involve square centimetres. Taking the square root returns standard deviation to centimetres. This connection helps make the calculation feel less like an arbitrary sequence of buttons.
Samples use a slightly different calculation
If your data is a sample being used to estimate variation in a larger population, the usual sample variance formula divides by n minus 1 instead of n. This adjustment helps correct the tendency of a sample to underestimate the population's variability. Your course or calculator may therefore distinguish population standard deviation from sample standard deviation.
When calculating standard deviation, first check which version the question expects. Then keep the stages organised: mean, deviations, squared deviations, variance, square root. A smaller standard deviation means values are generally clustered more closely around the mean. A larger standard deviation means they are more spread out, although the shape of the data still matters.
A sample calculation, and what the number tells you
Take the same data, 2, 4, 4, 6, but now treat it as a sample from a larger population. The mean is still 4 and the squared deviations still sum to 8, but you divide by n minus 1, which is 3, giving a sample variance of 2.67 and a sample standard deviation of about 1.63. The sample figure is larger, which is the point: four observations cannot reveal the full spread of the population they came from, so the formula compensates.
Interpreting the result is the other half of the skill. For data that is roughly bell-shaped, about two thirds of the values sit within one standard deviation of the mean and about 95 percent within two. A test score of 85 with a class mean of 70 and a standard deviation of 5 is exceptional; the same score with a standard deviation of 15 is merely good. The number only means something next to the mean it was measured from.
The takeaway
Calculating standard deviation is a step-by-step process for measuring spread. Find the mean, calculate each deviation, square those deviations, find the appropriate variance, and take its square root. Also check whether the question treats your data as a whole population or as a sample from something larger.