What is a standard deviation calculator?
A standard deviation calculator measures how spread out a set of numbers is around their mean. Enter your data points and the calculator instantly reports the count, the mean, the variance, and the standard deviation — for both the population and a sample interpretation of your data. A small standard deviation means the values cluster tightly around the average; a large one means they are widely scattered.
Standard deviation is one of the most widely used measures of dispersion in statistics. It appears everywhere from quality control and finance (where it is often called volatility) to test-score analysis and scientific research, because it expresses variability in the same units as the original data.
Population versus sample
There are two closely related versions of variance and standard deviation, and choosing the right one matters.
- Population statistics describe a complete data set — every member you care about is included. The population variance divides the sum of squared deviations by the count , and its symbols are (variance) and (standard deviation).
- Sample statistics describe a smaller subset drawn from a larger population, and you want to estimate the spread of that whole population from the sample. The sample variance divides by instead of (this is known as Bessel’s correction), which corrects the bias that arises from using the sample mean instead of the unknown true mean. Its symbols are (variance) and (standard deviation).
Because dividing by the smaller produces a slightly larger result, the sample standard deviation is always greater than or equal to the population standard deviation for the same data. The sample version requires at least two data points; with a single value there is no spread to estimate.
How does it work?
The population standard deviation is the square root of the average squared distance of each value from the mean:
where is the population mean and is the number of values. The sample standard deviation uses the sample mean and divides by :
The calculation follows four steps:
- Find the mean by adding all values and dividing by how many there are.
- Find each deviation by subtracting the mean from every value.
- Square each deviation and add the squares together.
- Divide by (population) or (sample), then take the square root to get the standard deviation. Skipping the square root leaves you with the variance.
Worked example
Consider the data set , which has values.
First, the mean:
Next, the squared deviations from the mean of are , which sum to . The population variance and standard deviation are:
Treating the same numbers as a sample instead, divide the sum of squares by :
As expected, the sample standard deviation is larger than the population standard deviation .
For a smaller set such as , the mean is , the sum of squared deviations is , the population standard deviation is , and the sample standard deviation is .
Practical notes
Use the population formula when your numbers represent the entire group you are analyzing — for example, the test scores of every student in a single class when that class is all you care about. Use the sample formula when your numbers are a subset used to infer something about a larger group, which is the common case in surveys, experiments, and most real-world statistics.
Standard deviation pairs naturally with the average and with interval estimates such as the confidence interval, which uses the standard deviation and sample size to bound the true mean. It also underlies the critical values used in hypothesis testing.
Frequently asked questions
What is the difference between variance and standard deviation?
Variance is the average of the squared deviations from the mean, expressed in squared units. Standard deviation is the square root of the variance, which returns the measure to the original units of the data and makes it easier to interpret.
Should I use the population or sample standard deviation?
Use the population version (, divide by ) when your data covers the entire group of interest. Use the sample version (, divide by ) when your data is a sample from a larger population and you want an unbiased estimate of that population’s spread.
Can the standard deviation be zero or negative?
It can be zero, which happens only when every value in the data set is identical — there is no spread. It can never be negative, because it is the square root of a sum of squared (non-negative) terms.