Standard Deviation Calculator

Calculate the standard deviation and variance of a data set. Choose sample or population, paste your numbers and see every step of the calculation.

Separate numbers with commas, spaces or line breaks.
Type
Sample standard deviation (s)
2.13809
Variance (s²)
4.571429
Mean
5
Count (n)
8
Sum
40
Sum of squared deviations
32
Standard error of the mean
0.755929
Population SD (for comparison)
2
How it was calculated
  1. Mean: 40 ÷ 8 = 5
  2. Subtract the mean from each value and square it, then add: Σ(x − mean)² = 32
  3. Divide by n − 1: 32 ÷ 7 = 4.571429 (variance)
  4. Take the square root: √4.571429 = 2.13809

How to use the standard deviation calculator

  1. Paste or type your data, separated by commas, spaces or line breaks.
  2. Choose Sample if your data is a subset of a larger group, or Population if it includes every member of the group.
  3. See the standard deviation, variance, mean and a step-by-step breakdown.

Standard deviation formulas

Population: σ = √( Σ(x − μ)² ÷ N ) Sample: s = √( Σ(x − x̄)² ÷ (n − 1) )

Here x is each value, μ or x̄ is the mean, and N or n is the number of values. The sample formula divides by n − 1 (Bessel's correction) to correct for the fact that a sample tends to underestimate the spread of the full population.

Example

Take the data set 2, 4, 4, 4, 5, 5, 7, 9:

  1. The mean is 40 ÷ 8 = 5.
  2. The squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, which add up to 32.
  3. Population variance = 32 ÷ 8 = 4, so the population standard deviation is 2.
  4. Sample variance = 32 ÷ 7 ≈ 4.571, so the sample standard deviation is about 2.138.

Sample or population — which should I choose?

Use population when your data includes every member of the group you care about — for example, the test scores of every student in one class when you only care about that class. Use sample when your data is a subset used to draw conclusions about a bigger group — for example, surveying 200 voters to understand a whole city. In most research and statistics coursework, the sample formula is the right choice.

What does standard deviation tell you?

Standard deviation measures how spread out values are around the mean. A small standard deviation means values cluster closely around the average; a large one means they are widely spread. For data that follows a normal (bell-shaped) distribution, the 68–95–99.7 rule applies: about 68% of values fall within one standard deviation of the mean, 95% within two, and 99.7% within three.

Variance and standard error

Variance is the standard deviation squared — the average squared distance from the mean. Standard error of the mean (SD ÷ √n) estimates how much the sample mean would vary between samples and is used to build confidence intervals.

Frequently asked questions

What is standard deviation?

Standard deviation is a measure of how spread out numbers are from their mean. A low standard deviation means values are close to the average; a high one means they are more spread out.

What is the difference between sample and population standard deviation?

Population standard deviation divides the sum of squared deviations by N, the total number of values. Sample standard deviation divides by n − 1 to give an unbiased estimate when your data is a sample of a larger population.

How do you calculate standard deviation by hand?

Find the mean, subtract it from each value and square the result, add the squares, divide by N (population) or n − 1 (sample), and take the square root.

What is the relationship between variance and standard deviation?

Variance is the square of the standard deviation. Standard deviation is easier to interpret because it is in the same units as the original data.

Can standard deviation be negative?

No. Standard deviation is the square root of an average of squared values, so it is always zero or positive. It equals zero only when all values are identical.

Results are rounded for display. For academic or professional work, double-check critical calculations and follow the rounding rules your teacher, school or organization requires.

Last updated: