The standard deviation formula
Standard deviation measures how spread out a set of numbers is around their mean. You square each deviation from the mean, average those squares (the variance), then take the square root:
The only difference between the two: the population formula divides by N, while the sample formula divides by N − 1 (Bessel's correction), which corrects the bias when you're estimating from a sample rather than measuring an entire population.
Worked example
For the set 10, 12, 23, 23, 16, 23, 21, 16 (N = 8):
Which one should I use?
Use the sample standard deviation when your numbers are a subset drawn from a larger group and you're estimating the spread of that group — the most common case in research and surveys. Use the population standard deviation only when your data covers every member of the group you care about.