EasyUnitConverter.com

Standard Deviation Calculator

Calculate the standard deviation, variance, and coefficient of variation for a data set. See also Variance Calculator and Mean Calculator.

How to Calculate Standard Deviation

Standard deviation measures how spread out values are from the mean. To calculate: (1) find the mean, (2) subtract the mean from each value and square the result, (3) find the average of those squared differences (divide by n for population, n−1 for sample), (4) take the square root. A low standard deviation means values are close to the mean; a high one means they are spread out.

Standard Deviation Formulas

Population: σ = √[Σ(xᵢ − μ)² / N]

Sample: s = √[Σ(xᵢ − x̄)² / (n − 1)]

Variance = σ² or s²

Coefficient of Variation = (σ / |μ|) × 100%

Example Calculation

Data: 10, 12, 23, 23, 16, 23, 21, 16

Mean = 144 / 8 = 18

Σ(xᵢ − x̄)² = 64 + 36 + 25 + 25 + 4 + 25 + 9 + 4 = 192

Sample Variance = 192 / 7 ≈ 27.428571

Sample Std Dev = √27.428571 ≈ 5.237229

Population vs Sample Standard Deviation

FeaturePopulation (σ)Sample (s)
DivisorNn − 1
Use whenYou have all data pointsData is a subset
Symbolσ (sigma)s
BiasExactCorrected (Bessel's)

Solved Examples

Example 1: Manufacturing Quality Control

A machine produces bolts with lengths (mm): 50.2, 49.8, 50.1, 50.3, 49.9, 50.0, 50.2, 49.7. Calculate the sample standard deviation.

Mean = (50.2+49.8+50.1+50.3+49.9+50.0+50.2+49.7)/8 = 400.2/8 = 50.025

Deviations: 0.175, -0.225, 0.075, 0.275, -0.125, -0.025, 0.175, -0.325

Squared deviations: 0.0306, 0.0506, 0.0056, 0.0756, 0.0156, 0.0006, 0.0306, 0.1056

Sum of squared deviations = 0.3150

Sample variance = 0.3150 / (8-1) = 0.0450

Sample std dev = sqrt(0.0450) = 0.2121 mm

Answer: The sample standard deviation is 0.2121 mm. This tells us bolt lengths typically deviate about 0.21 mm from the mean, indicating good manufacturing precision.

Example 2: Comparing Two Classrooms

Class A scores: 70, 75, 80, 85, 90 (mean = 80). Class B scores: 60, 70, 80, 90, 100 (mean = 80). Which class has more variability?

Class A: deviations = -10, -5, 0, 5, 10

Sum of squares = 100+25+0+25+100 = 250

SD_A = sqrt(250/4) = sqrt(62.5) = 7.91

Class B: deviations = -20, -10, 0, 10, 20

Sum of squares = 400+100+0+100+400 = 1000

SD_B = sqrt(1000/4) = sqrt(250) = 15.81

Answer: Class B (SD = 15.81) has exactly twice the variability of Class A (SD = 7.91), despite both having the same mean of 80. Standard deviation reveals how spread out the scores are.

Example 3: Population vs Sample Standard Deviation

All 5 employees in a department have years of experience: 2, 4, 6, 8, 10. Calculate both population and sample standard deviation.

Mean = 30/5 = 6

Squared deviations: 16, 4, 0, 4, 16

Sum = 40

Population SD (sigma) = sqrt(40/5) = sqrt(8) = 2.828

Sample SD (s) = sqrt(40/4) = sqrt(10) = 3.162

Answer: Population SD = 2.828, Sample SD = 3.162. Since this is the entire department (all members), use population SD. Use sample SD only when the data represents a subset of a larger population.

Practice Questions

Question 1

Daily high temperatures (F) for a week: 68, 72, 75, 71, 69, 74, 70. Calculate the sample standard deviation.

Answer: Mean = 499/7 = 71.29. Sum of squared deviations = 10.86+0.50+13.79+0.08+5.22+7.36+1.65 = 39.43 (approx). s = sqrt(39.43/6) = sqrt(6.57) = 2.56 degrees F.

Question 2

If every value in a dataset is multiplied by 3, what happens to the standard deviation?

Answer: The standard deviation is also multiplied by 3. If SD = 5 and you multiply all data by 3, the new SD = 15. Standard deviation scales linearly with multiplication but is unaffected by adding a constant.

Question 3

A dataset has mean 50 and standard deviation 10. Using the empirical rule, what percentage of data falls between 30 and 70?

Answer: 30 = mean - 2SD and 70 = mean + 2SD. By the empirical rule (68-95-99.7), approximately 95% of data falls within 2 standard deviations of the mean.

Common Mistakes

Dividing by n instead of n-1 for sample data

When calculating from a sample, divide the sum of squared deviations by (n-1), not n. This Bessel correction accounts for the fact that the sample mean slightly underestimates variability. Using n gives the population standard deviation.

Forgetting to square root the variance

Standard deviation is the square root of variance. Reporting variance when asked for SD (or vice versa) is a common error. Variance is in squared units; SD is in the original units of measurement.

Comparing SDs across different scales

A standard deviation of 10 for test scores (mean 80) is not comparable to SD of 10 for salaries (mean 50000). Use the coefficient of variation (SD/mean) to compare variability across different scales or units.

Key Takeaways

  • Standard deviation measures the average distance of data points from the mean, expressed in the same units as the data.
  • Use population SD (divide by n) for the entire group; use sample SD (divide by n-1) for a subset.
  • The empirical rule: approximately 68% of data is within 1 SD, 95% within 2 SD, and 99.7% within 3 SD of the mean (for normal distributions).
  • SD = 0 means all values are identical. A larger SD means more spread in the data.
  • Adding a constant to all values does not change SD. Multiplying all values by k multiplies SD by |k|.

Frequently Asked Questions

What is the difference between population and sample standard deviation?

Population standard deviation divides by N (total count) and is used when you have data for the entire population. Sample standard deviation divides by n−1 (Bessel's correction) and is used when your data is a sample from a larger population.

What does a high standard deviation mean?

A high standard deviation means the data points are spread far from the mean. A low standard deviation means they are clustered close to the mean.

What is the coefficient of variation?

The coefficient of variation (CV) is the standard deviation divided by the mean, expressed as a percentage. It allows comparison of variability between data sets with different units or scales.

Can standard deviation be negative?

No. Standard deviation is always zero or positive because it is the square root of variance, which is a sum of squared values. A standard deviation of zero means all values are identical.

Related Calculators: