Standard Deviation Calculator
The population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9 is exactly 2 because the mean is 5 and the variance is 4. Enter a numeric list and choose sample or population to calculate standard deviation, variance, mean, count, and sum. The two modes use different denominators. Population mode divides squared deviations by n. Sample mode divides by n - 1 and needs at least 2 values. The calculation function requires a finite numeric array. The page input is intended for values separated by commas, spaces, or line breaks, but ambiguous text, units, missing-value markers, and nonnumeric tokens should be cleaned before calculation. Outputs display to 4 decimal places.
Quick answer
Standard deviation tells you how spread out a set of numbers is around the mean.
What this tells you
- •Standard deviation tells you how spread out a set of numbers is around the mean.
- •A small standard deviation means the values sit close to the average, and a large one means they are spread wide.
- •Use population when your numbers are the entire group, and use sample when they are a subset you are using to estimate a larger group.
- •The variance is the square of the standard deviation, so the two always move together.
- •Sample mode is the default and rejects a one-value list because n - 1 would be zero.
- •Population mode accepts one finite value and returns zero variance and zero standard deviation.
- •Negative values and repeated values are valid, while NaN and infinity are invalid.
- •Displayed mean, sum, variance, and standard deviation are rounded to 4 decimal places.
How to Use
- 1Type or paste your numbers into the input field.
- 2Separate values with commas, spaces, or new lines.
- 3Choose Sample if your data is a subset, or Population if it is the whole group.
- 4Click Calculate to see the standard deviation, variance, mean, count, and sum.
- 5Remove labels, units, missing-value codes, and thousands separators that could be mistaken for value separators.
- 6Check that the parsed count matches the number of observations you intended to enter.
- 7Choose the mode from the study design, not from whichever result looks preferable.
How It Works
Formula
mean = sum of values / count. variance = sum of (value - mean)^2 divided by n for a population or by n - 1 for a sample. standard deviation = square root of the variance.Start by finding the mean of every value. Subtract the mean from each value, square the result so positives and negatives both count, then add those squared differences together. Divide that total by the count n for a population or by n - 1 for a sample. The square root of that figure is the standard deviation, expressed in the same units as your original data.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9
The sum is 40 and the count is 8, so the mean is 5. The squared differences from the mean add up to 32, and dividing by 8 gives a variance of 4. The square root of 4 is 2, so the population standard deviation is exactly 2.
Sample standard deviation of 1, 2, 3, 4, 5
The mean is 3. The squared differences are 4, 1, 0, 1, and 4, which sum to 10. Dividing by n - 1 = 4 gives a variance of 2.5, and the square root of 2.5 is about 1.5811.
Population with one value
The only value equals its mean, so its squared deviation is zero. Population mode divides zero by n = 1 and returns zero spread.
Sample with negative values
Shifting every value below zero does not change the spread. Squared deviations from -3 total 10, and dividing by 4 gives the same sample variance as 1 through 5.
Repeated population values
Every value equals the mean, so every deviation and squared deviation is zero. A zero standard deviation means no variation in this entered list.
Sample vs Population Standard Deviation
How the two formulas differ and when to use each one.
| Type | Divisor | When to use |
|---|---|---|
| Population | n | Your data covers the entire group you care about. |
| Sample | n - 1 | Your data is a subset used to estimate a larger group. |
Dividing a sample by n - 1 instead of n corrects the tendency to underestimate the true spread.
Choosing the denominator and reading the result
Population standard deviation describes the values entered as the complete group of interest. Its variance divides the sum of squared deviations by n. Sample standard deviation treats the values as a sample used to estimate a wider population and divides by n - 1, often called Bessel's correction.
The sample result is larger than the population result for the same nonconstant list because n - 1 is smaller than n. This correction addresses average downward bias in estimated variance under common random-sampling assumptions. It does not repair a biased, nonrandom, or unrepresentative sample.
Standard deviation uses the same units as the original values. Variance uses squared units, which makes it less intuitive but useful in statistical calculations. Neither measure describes the shape of a distribution, and both can be strongly affected by outliers.
A low standard deviation does not prove data quality or practical consistency. Rounding, truncation, duplicated records, restricted sampling, and measurement limits can make spread look artificially small. Pair the result with a plot, range, quantiles, sample design, and subject-matter context.
Common mistakes
- Confusing sample with population. Population divides by n while a sample divides by n - 1, so picking the wrong one changes the result.
- Dividing by n when you should divide by n - 1 for a sample. This is the most common error and makes the standard deviation look smaller than it should.
- Forgetting to square each deviation before adding them. Without squaring, positive and negative differences cancel out and the spread reads as zero.
- Reporting the variance as the standard deviation. The standard deviation is the square root of the variance, not the variance itself.
- Choosing sample or population based only on data-set size instead of what the observations represent
- Leaving units, labels, or missing-value codes in pasted input and assuming they were interpreted correctly
- Treating a rounded 0.0000 display as proof that unrounded variation is exactly zero
- Using standard deviation alone for a skewed distribution or one with influential outliers
- Assuming n - 1 corrects selection bias or poor measurement quality
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="standard-deviation-calculator" async></script>Preview the embed at /embed/standard-deviation-calculator/.