Skip to content
CalcTide logo
Education & Math

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.

Education & MathBy

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

  1. 1Type or paste your numbers into the input field.
  2. 2Separate values with commas, spaces, or new lines.
  3. 3Choose Sample if your data is a subset, or Population if it is the whole group.
  4. 4Click Calculate to see the standard deviation, variance, mean, count, and sum.
  5. 5Remove labels, units, missing-value codes, and thousands separators that could be mistaken for value separators.
  6. 6Check that the parsed count matches the number of observations you intended to enter.
  7. 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

Numbers2, 4, 4, 4, 5, 5, 7, 9
TypePopulation
ResultStandard deviation 2, Variance 4, Mean 5

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

Numbers1, 2, 3, 4, 5
TypeSample
ResultStandard deviation 1.5811, Variance 2.5, Mean 3

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

Numbers5
TypePopulation
ResultStandard deviation 0, Variance 0, Mean 5

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

Numbers-1, -2, -3, -4, -5
TypeSample
ResultStandard deviation 1.5811, Variance 2.5, Mean -3

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

Numbers12, 12, 12, 12
TypePopulation
ResultStandard deviation 0, Variance 0, Mean 12

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.

TypeDivisorWhen to use
PopulationnYour data covers the entire group you care about.
Samplen - 1Your 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.

Calculate the Average

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/.

Frequently Asked Questions

Standard deviation is a measure of how spread out a set of numbers is around their mean. A low standard deviation means the values cluster near the average, while a high one means they are widely scattered.
Population standard deviation divides the squared differences by the count n, while sample standard deviation divides by n - 1. Use population when your data is the entire group and sample when it is a subset used to estimate a larger group.
Find the mean, subtract it from each value, square those differences, and add them up. Divide the total by n for a population or n - 1 for a sample, then take the square root. For 1, 2, 3, 4, 5 the sample standard deviation is about 1.5811.
Variance is the average of the squared differences from the mean, and the standard deviation is its square root. For the set 2, 4, 4, 4, 5, 5, 7, 9 the population variance is 4 and the standard deviation is 2.
The population standard deviation of 2, 4, 4, 4, 5, 5, 7, 9 is exactly 2. The mean is 5, the squared differences total 32, dividing by 8 gives a variance of 4, and the square root of 4 is 2.
A sample standard deviation divides by n - 1, so a single value would mean dividing by zero, which is undefined. Population standard deviation works with one value and simply returns 0 because there is no spread.
No. Variance is built from squared deviations and cannot be negative, and standard deviation is its nonnegative square root.
Yes. Negative observations are valid. Standard deviation measures distances from the mean, so the sign of the original scale does not create a problem.
No. It addresses a specific variance bias under common sampling assumptions. It cannot fix nonrandom selection, small-sample uncertainty, outliers, dependence, or measurement problems.
The calculation rounds mean, sum, variance, and standard deviation to 4 decimal places for display. The rounded digits should not imply greater accuracy than the source data.
It estimates standard deviation calculator outputs using the visible inputs and formula assumptions on this page.

Explore More in Education & Math