EducationMarch 23, 2026

How to Calculate Standard Deviation: Step-by-Step Guide

By The hakaru Team·Last updated March 2026

Standard deviation is a statistical measure that quantifies how spread out the values in a dataset are from the mean (average). A low standard deviation means values cluster tightly around the mean, while a high standard deviation indicates values are dispersed over a wider range. It is one of the most commonly used measures of variability in statistics, finance, science, and quality control.

Quick Answer

  • *The standard deviation formula is s = √[Σ(xₖ - x̄)² / (n - 1)] for a sample, where you subtract the mean from each value, square the results, average them, and take the square root.
  • *According to the American Statistical Association, standard deviation is used in over 90% of published research papers that report variability measures.
  • *In a normal distribution, 68% of data falls within 1 standard deviation of the mean, 95% within 2, and 99.7% within 3 (the 68-95-99.7 rule).
  • *Use population SD (σ) when you have all data; use sample SD (s) when working with a subset — most real-world cases use sample.

What Is Standard Deviation?

Standard deviation measures the average distance between each data point and the mean. Think of it as an answer to the question: “On average, how far is each value from the center of the dataset?”

If five friends earn $40K, $42K, $41K, $39K, and $43K, the mean is $41K and the standard deviation is roughly $1,581. Their incomes are tightly clustered. But if the incomes were $20K, $35K, $41K, $55K, and $74K, the standard deviation jumps to approximately $20,355 — indicating much greater spread despite the same $45K mean.

The Standard Deviation Formula

There are two versions of the formula, depending on whether your data represents an entire population or a sample from a larger population.

Population Standard Deviation (σ)

σ = √[Σ(xₖ - μ)² / N]

Use this when your dataset includes every member of the group (e.g., every employee in a company, every student in a class).

Sample Standard Deviation (s)

s = √[Σ(xₖ - x̄)² / (n - 1)]

Use this when your data is a subset of a larger population (e.g., surveying 200 out of 10,000 customers). Dividing by n−1 instead of n is called Bessel’s correction, and it compensates for the fact that a sample tends to underestimate the true variability.

Where:

  • xₖ = each individual value
  • μ or x̄ = mean of the values
  • N or n = number of values
  • Σ = sum of all values

How to Calculate Standard Deviation: Step by Step

Let’s work through a concrete example. Suppose a teacher records quiz scores for 6 students: 78, 82, 85, 90, 88, 77.

Step 1: Find the Mean

Mean = (78 + 82 + 85 + 90 + 88 + 77) / 6 = 500 / 6 = 83.33

Step 2: Subtract the Mean from Each Value

Score (xₖ)xₖ - x̄(xₖ - x̄)²
78-5.3328.41
82-1.331.77
851.672.79
906.6744.49
884.6721.81
77-6.3340.07

Step 3: Sum the Squared Differences

Σ(xₖ - x̄)² = 28.41 + 1.77 + 2.79 + 44.49 + 21.81 + 40.07 = 139.34

Step 4: Divide by (n - 1)

Since this is a sample (6 students from a larger class), divide by n−1 = 5:
Variance = 139.34 / 5 = 27.87

Step 5: Take the Square Root

s = √27.87 = 5.28

The sample standard deviation is 5.28 points. This means quiz scores typically deviate about 5.28 points from the class average of 83.33. Most students scored between roughly 78 and 89.

Population vs. Sample Standard Deviation: When to Use Each

FactorPopulation (σ)Sample (s)
DivisorNN - 1
When to useYou have ALL data pointsData is a subset of a larger group
ExampleAll 30 employees’ salariesSurvey of 200 out of 10,000 customers
Common inCensus data, complete inventoriesSurveys, experiments, research studies
Symbolσ (sigma)s

According to the Shanker Institute, a standard deviation is the most common measure of statistical dispersion used in educational assessment, where it helps teachers understand how widely student performance varies within a class and across schools.

The 68-95-99.7 Rule (Empirical Rule)

For data that follows a normal (bell-curve) distribution, standard deviation has a powerful interpretation:

  • 68% of values fall within 1 standard deviation of the mean
  • 95% of values fall within 2 standard deviations
  • 99.7% of values fall within 3 standard deviations

For example, if the average height of adult men in the U.S. is 5’9” with a standard deviation of 2.8 inches (according to the CDC’s National Health Statistics Reports, 2021), then roughly 68% of men stand between 5’6” and 6’0”, and 95% stand between 5’4” and 6’3”.

Real-World Applications of Standard Deviation

Finance and Investing

In finance, standard deviation measures investment risk. According to Morningstar, the S&P 500 has had a historical annual standard deviation of approximately 15.6%(2000–2024), meaning annual returns typically fluctuate about 15.6 percentage points from the long-term average. A stock with a higher standard deviation is considered more volatile and riskier than one with a lower standard deviation.

Quality Control and Manufacturing

Manufacturers use standard deviation to maintain product quality. The Six Sigma methodology, developed by Motorola in 1986, aims for processes where defects occur no more than 3.4 times per million opportunities — meaning virtually all output falls within six standard deviations of the target value. According to the American Society for Quality (ASQ), companies implementing Six Sigma have reported billions of dollars in savings, with General Electric alone attributing over $2 billion in savings during its first five years.

Education

Standardized tests like the SAT report scores with a mean and standard deviation. The SAT has a mean of about 1050 and a standard deviation of roughly 200, so a score of 1250 is one standard deviation above the mean — better than approximately 84% of test takers.

Science and Research

Researchers use standard deviation to determine whether results are statistically significant. If an experimental result falls more than 2 standard deviations from the expected value, it is typically considered significant at the 95% confidence level.

Standard Deviation vs. Variance: What Is the Difference?

Variance is simply the standard deviation squared. If the standard deviation is 5.28, the variance is 27.87.

MeasureFormulaUnitsBest For
Standard Deviation√[Σ(xₖ - x̄)² / (n-1)]Same as dataInterpreting spread in context
VarianceΣ(xₖ - x̄)² / (n-1)Squared unitsStatistical calculations (ANOVA, regression)

Standard deviation is more intuitive because it is expressed in the same units as your data. If you are measuring test scores in points, the standard deviation is also in points. Variance would be in “points squared,” which is harder to interpret directly.

Common Mistakes When Calculating Standard Deviation

  • Using population formula on a sample: This underestimates variability. Always use n−1 for samples.
  • Forgetting to square the differences: Without squaring, positive and negative deviations cancel each other out, giving you a sum near zero.
  • Confusing standard deviation with standard error: Standard error (SE = s/√n) measures how precisely you know the mean, not how spread out individual values are.
  • Assuming normal distribution: The 68-95-99.7 rule only applies to normally distributed data. Skewed data requires different interpretation.

Frequently Asked Questions

What is the difference between population and sample standard deviation?

Population standard deviation divides by N (the total number of values) and is used when your dataset includes every member of the group you are studying. Sample standard deviation divides by N−1 (called Bessel’s correction) and is used when your data is a subset of a larger population. In most real-world scenarios, you use sample standard deviation because you rarely have access to the entire population.

What does a high standard deviation mean?

A high standard deviation means the data points are spread far from the mean, indicating high variability. For example, if a class has a mean test score of 75 with a standard deviation of 15, scores range widely (roughly 60 to 90 for most students). A low standard deviation of 3 would mean most students scored between 72 and 78.

Can standard deviation be negative?

No, standard deviation can never be negative. Since it is calculated by taking the square root of the variance (which involves squared differences), the result is always zero or positive. A standard deviation of zero means every value in the dataset is identical.

When should I use standard deviation vs variance?

Use standard deviation when you want a measure of spread in the same units as your data, making it easier to interpret. Use variance when you need to perform further statistical calculations, such as ANOVA tests or regression analysis, because variance has mathematical properties (like additivity) that standard deviation does not.