how to calculate standard deviation

Standard Deviation Calculator

Enter numbers separated by commas, spaces, semicolons, or line breaks.

What standard deviation means

Standard deviation is a measure of spread. It tells you how far values in a dataset tend to be from the average (mean). A small standard deviation means the values are tightly clustered around the mean. A large standard deviation means the values are more spread out.

In practical terms, standard deviation helps you judge consistency and variability in data such as test scores, investment returns, manufacturing quality, and scientific measurements.

The formulas you need

Population standard deviation

σ = √( Σ(xi − μ)2 / N )

  • σ = population standard deviation
  • μ = population mean
  • N = number of values in the full population

Sample standard deviation

s = √( Σ(xi − x̄)2 / (n − 1) )

  • s = sample standard deviation
  • = sample mean
  • n = sample size

For sample standard deviation, we divide by (n − 1) rather than n. This is called Bessel’s correction and it helps reduce bias when estimating population variability from a sample.

How to calculate standard deviation step by step

1) Find the mean

Add all data values, then divide by the number of values.

2) Find each deviation from the mean

For each value, subtract the mean: (value − mean).

3) Square each deviation

Square each result so negatives don’t cancel positives.

4) Find the variance

Add the squared deviations. Then divide by N for a population, or by n − 1 for a sample.

5) Take the square root

The square root of variance is the standard deviation.

Worked example

Use the dataset: 4, 8, 6, 5, 3, 7

  • Mean = (4 + 8 + 6 + 5 + 3 + 7) / 6 = 33 / 6 = 5.5
  • Deviations: -1.5, 2.5, 0.5, -0.5, -2.5, 1.5
  • Squared deviations: 2.25, 6.25, 0.25, 0.25, 6.25, 2.25
  • Sum of squares = 17.5
  • Population variance = 17.5 / 6 = 2.9167
  • Population SD = √2.9167 = 1.7078
  • Sample variance = 17.5 / 5 = 3.5
  • Sample SD = √3.5 = 1.8708

Try this exact dataset in the calculator above and switch between population and sample mode to see both answers.

Common mistakes to avoid

  • Using n instead of n − 1 for sample standard deviation.
  • Forgetting to square deviations before summing.
  • Rounding too early in the process.
  • Mixing up standard deviation with variance (variance is before taking the square root).

When standard deviation is useful

  • Finance: measuring volatility of returns.
  • Education: understanding spread of exam scores.
  • Quality control: tracking production consistency.
  • Science: evaluating precision in repeated measurements.

Final takeaway

If you remember one thing: standard deviation summarizes how much variation exists around the mean. Use population SD for complete populations and sample SD when you only have a subset. Once you practice the five-step process a few times, it becomes straightforward and fast.

🔗 Related Calculators