Standard Deviation Explained Step by Step

Standard deviation sounds like a topic only statisticians need, but it answers a very practical question: how spread out are these numbers? Two sets of data can have the same average and still look completely different.

Oct 29, 2026 · 19 min read

Quick Answer

  • Standard deviation measures how far the values in a data set typically sit from the mean.
  • A small standard deviation means the values are bunched close to the mean.
  • A large standard deviation means the values are spread far from the mean.
  • It is measured in the same units as the data. If the data is in dollars, so is the standard deviation.
  • The calculation has five steps: find the mean, subtract it from each value, square the differences, average the squares, then take the square root.

There are two common versions of standard deviation: population standard deviation and sample standard deviation. They use the same basic process but divide the sum of squared deviations by different numbers.

If you only need a result, a calculator can save time. If you want to understand what the result means and how it is calculated, the worked example below explains each step.

Why the Mean Alone Is Not Enough

Imagine two classes that each took the same exam. Both classes have a mean score of 75.

  • Class A: 70, 72, 75, 78, 80
  • Class B: 50, 65, 75, 85, 100

The averages are identical, yet nobody would say the two classes performed the same way. In Class A everyone scored within 5 points of the mean. In Class B the scores range from 50 to 100. Standard deviation puts a number on that difference.

The mean tells us the center of each set of scores, but it does not reveal whether most students scored close to 75 or whether their results varied considerably. Standard deviation adds that missing information.

This distinction matters in many situations. Two stores might have the same average daily sales, but one may experience steady sales while the other has dramatic ups and downs. Two factories might report the same average product measurement, yet one may produce items much more consistently than the other.

In each case, the average alone does not tell the whole story.

What standard deviation tells you

Consider three possible patterns in a data set:

  • Low standard deviation: Most values are close to the mean, indicating relatively consistent results.
  • High standard deviation: Values are more spread out, indicating greater variation.
  • Zero standard deviation: Every value is identical, so there is no variation.

Standard deviation describes the amount of spread, not whether the values are good, bad, correct, or incorrect. The meaning depends on the subject being studied.

Population vs Sample Standard Deviation

There are two versions, and the only difference is the final division.

  • Population standard deviation is used when your data contains every member of the group you care about. You divide by n, the number of values.
  • Sample standard deviation is used when your data is only a sample taken from a larger group. You divide by n − 1.

Dividing by n − 1 corrects for the fact that a sample tends to underestimate the spread of the full group. If you are unsure which to use, ask whether your data is the complete set or a sample of something bigger. Most real-world data, such as survey answers or a few test measurements, is a sample.

The formulas for both types

The population standard deviation formula is:

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

The sample standard deviation formula is:

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

Here is what the symbols mean:

Symbol Meaning
σ Population standard deviation
s Sample standard deviation
Σ Add together all the listed values
x An individual value in the data set
μ Population mean
x̄ Sample mean
N Number of values in the population
n Number of values in the sample

Both formulas measure spread around the mean. The population formula divides by the total number of population values, while the sample formula divides by one less than the sample size.

When should you use each formula?

Suppose a teacher wants to analyze the scores of every student in a particular class. If the class itself is the entire group of interest, population standard deviation is appropriate.

Now imagine a researcher selects 50 students from a school district to estimate how much scores vary across the entire district. Because the 50 students represent a larger group, sample standard deviation is generally appropriate.

The important question is not simply how many values you have. It is whether those values represent the entire group you want to describe or a sample used to learn about a larger group.

Step-by-Step Example

We will use this data set: 2, 4, 4, 4, 5, 5, 7, 9

There are eight values, and their mean is 5. We will calculate both population and sample standard deviation from the same data so you can see why the final answers differ.

Step 1: Find the mean

Add all the values together:

2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40

Divide the total by the number of values:

40 ÷ 8 = 5

The mean is 5.

Step 2: Subtract the mean from each value

These differences are called deviations.

Subtract 5 from each value:

  • 2 − 5 = −3
  • 4 − 5 = −1
  • 4 − 5 = −1
  • 4 − 5 = −1
  • 5 − 5 = 0
  • 5 − 5 = 0
  • 7 − 5 = 2
  • 9 − 5 = 4

A negative deviation means the value is below the mean. A positive deviation means it is above the mean. A deviation of zero means the value is exactly equal to the mean.

Step 3: Square each deviation

Squaring removes the negative signs and gives extra weight to values that are far from the mean.

Value Deviation from mean (5) Squared deviation
2 −3 9
4 −1 1
4 −1 1
4 −1 1
5 0 0
5 0 0
7 2 4
9 4 16
Total 0 32

Notice that the deviations add up to zero. That always happens, which is exactly why we square them before adding.

The sum of the squared deviations is 32.

Why do we square the deviations instead of simply adding them? Because positive and negative deviations cancel each other out. Squaring makes every contribution nonnegative and gives larger deviations more influence on the result.

Step 4: Average the squared deviations

This average is called the variance.

  • Population variance: 32 ÷ 8 = 4
  • Sample variance: 32 ÷ 7 = 4.571

For the population calculation, divide by all eight values. For the sample calculation, divide by seven because the sample formula uses n − 1.

The sample variance shown here is rounded to three decimal places. Keep additional precision when possible if you are continuing with more calculations.

Step 5: Take the square root

The final step is to take the square root of the variance.

  • Population standard deviation: √4 = 2
  • Sample standard deviation: √(32 ÷ 7) ≈ 2.138

So for this data set, the values typically sit about 2 units away from the mean of 5.

The two answers differ because the formulas use different divisors. Neither result is automatically wrong; the appropriate answer depends on whether the values represent a complete population or a sample.

Summary of the calculation

Calculation Population Sample
Number of values 8 8
Mean 5 5
Sum of squared deviations 32 32
Divisor 8 7
Variance 4 4.571
Standard deviation 2.000 2.138

This table is a useful way to check your work. If your final answer differs substantially, review the mean, the deviations, the squared values, and the divisor before rounding.

Comparing the Two Classes

Now apply the same five steps to the classes from the start of this guide.

Measure Class A (70, 72, 75, 78, 80) Class B (50, 65, 75, 85, 100)
Mean 75 75
Range 10 50
Sum of squared deviations 68 1,450
Population standard deviation 3.69 17.03
Sample standard deviation 4.12 19.04

Both classes have the same mean, but Class B has a standard deviation about four to five times larger. That single number captures what the average hid.

Class A’s scores are relatively close to 75. Class B has much more variation, with scores extending farther above and below the mean.

This comparison also shows why the range and standard deviation are not interchangeable. The range only considers the smallest and largest values, while standard deviation uses the distance of every value from the mean.

What happens if the scores become more consistent?

Imagine Class B improves its consistency and its scores become 70, 73, 75, 77, and 80. The mean is still 75, but the scores are now closer together. The standard deviation decreases because the deviations from the mean are smaller.

This is the central idea behind standard deviation: when values cluster more tightly around the mean, standard deviation decreases; when they spread farther away, it increases.

How to Read a Standard Deviation

For data that forms a roughly bell-shaped curve, a useful rule of thumb applies:

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

Suppose an exam has a mean of 75 and a standard deviation of 5, and the scores are roughly bell-shaped. Then about 68% of students scored between 70 and 80, and about 95% scored between 65 and 85.

This rule does not hold for every data set. It works best when the data is roughly symmetrical and has no extreme outliers.

The empirical rule in a practical example

Suppose a manufacturing process produces components with an average length of 100 millimeters and a standard deviation of 2 millimeters. If the measurements follow an approximately normal distribution:

  • About 68% of measurements would fall between 98 and 102 millimeters.
  • About 95% would fall between 96 and 104 millimeters.
  • About 99.7% would fall between 94 and 106 millimeters.

These are approximate percentages, not guarantees about every batch of products. The rule depends on the distribution being approximately normal.

Does standard deviation tell you where an individual value falls?

Standard deviation alone does not tell you the exact position of every observation. However, you can combine it with the mean to calculate a z-score, which describes how many standard deviations a value is above or below the mean.

The formula is:

z = (x − μ) / σ

For example, suppose an exam has a mean score of 75 and a standard deviation of 5. A student who scores 85 has a z-score of:

(85 − 75) ÷ 5 = 2

The student’s score is two standard deviations above the mean.

A negative z-score means the value is below the mean, while a positive z-score means it is above the mean. To explore this relationship, use the Standard Normal Distribution Calculator.

Standard Deviation vs Variance

Variance is the standard deviation squared. It appears in the middle of the calculation (step 4), but its units are squared too, so a variance in dollars is measured in dollars squared, which is hard to picture. Taking the square root brings the number back to the original units, which is why standard deviation is easier to interpret.

For example, if the population variance is 25, the population standard deviation is:

√25 = 5

If the original measurements are in centimeters, the variance is expressed in square centimeters, while standard deviation is expressed in centimeters.

Which measure should you use?

Feature Variance Standard deviation
What it measures Spread around the mean Spread around the mean
Calculation Average squared deviations, using the appropriate divisor Square root of variance
Units Squared units Original data units
Ease of interpretation Often less intuitive Usually easier to explain
Common uses Statistical formulas and mathematical analysis Understanding and comparing variability

Both measures describe variability. Standard deviation is often easier to communicate because it uses the same units as the original data, while variance remains important in many statistical calculations.

Standard Deviation vs Mean Absolute Deviation

The mean absolute deviation (MAD) is a simpler measure of spread. Instead of squaring the deviations, you take their absolute values and average them.

  • Class A: (5 + 3 + 0 + 3 + 5) ÷ 5 = 3.2
  • Class B: (25 + 10 + 0 + 10 + 25) ÷ 5 = 14

MAD is easier to calculate by hand, but standard deviation is far more widely used in statistics because squaring emphasizes large deviations and because it connects to many other formulas, including the normal distribution.

Why do the two measures produce different results?

Mean absolute deviation uses the absolute distance between each value and the mean. Standard deviation squares each deviation before averaging and then takes the square root.

Because squaring gives larger deviations more influence, standard deviation can be particularly sensitive to extreme values. MAD is often easier to explain when you want a straightforward average distance from the mean.

Neither measure is universally better. The right choice depends on the question you are trying to answer and the statistical method you are using.

Real-Life Applications of Standard Deviation

Standard deviation is useful wherever consistency or variation matters. It is not limited to classroom exercises or statistical research.

1. Exam scores

Teachers can use standard deviation to understand whether students’ results are tightly grouped or widely spread. Two classes with the same average may have very different levels of variation.

A small standard deviation means scores are clustered near the class average. A large one indicates a wider range of performance around that average.

2. Business sales

A business may compare daily sales across different weeks. A low standard deviation can indicate relatively steady sales, while a high standard deviation may reflect unpredictable demand or occasional sales spikes.

The average sales figure and standard deviation together provide more information than the average alone.

3. Manufacturing quality control

Factories can measure the dimensions, weight, or performance of products coming off an assembly line. A high standard deviation may indicate inconsistent production that deserves further investigation.

However, standard deviation should be considered alongside the required product tolerances. A low standard deviation does not automatically mean that the process is meeting specifications if its average is off target.

4. Investment returns

Investors and analysts sometimes use standard deviation to describe the variability of investment returns over a particular period. Higher variation can indicate less predictable returns, although standard deviation does not capture every type of financial risk.

It also does not tell you whether an investment will make money or whether future returns will resemble past results.

5. Weather measurements

Researchers can compare daily temperatures or rainfall amounts over a period. Standard deviation helps describe how much the measurements vary around their average.

For example, two locations might have the same average daily temperature but different temperature variability.

6. Delivery times

A delivery company could calculate the standard deviation of its delivery times to see whether arrivals are consistent. A low standard deviation suggests delivery times tend to stay close to their average, while a high one indicates greater variation.

In practice, the company would also examine late deliveries, average delivery time, and service targets before drawing conclusions.

What Factors Can Affect Standard Deviation?

Several characteristics of a data set influence its standard deviation.

Distance from the mean: Values farther from the mean generally contribute more to the sum of squared deviations.

Outliers: A single extreme value can substantially increase standard deviation because its deviation is squared.

Consistency: When observations cluster closely around the mean, standard deviation tends to be smaller.

Units and scale: If every value is converted from one unit to another using a constant multiplier, standard deviation is multiplied by the absolute value of that multiplier. For example, converting measurements from meters to centimeters multiplies standard deviation by 100.

Adding a constant: If the same number is added to every observation, the mean changes by that amount, but standard deviation stays the same because the distances from the mean do not change.

These properties help explain why standard deviation is useful for comparing data sets, but comparisons still need context. A standard deviation of 5 may be large for one type of measurement and small for another.

Common Mistakes to Avoid

  1. Forgetting the square root. If your answer is the variance, you are one step short.
  2. Using the wrong divisor. Use n for a complete population and n − 1 for a sample.
  3. Skipping the squaring step. The raw deviations always add to zero, so you cannot average them directly.
  4. Rounding too early. Keep several decimal places until the final answer, especially when squaring.
  5. Ignoring outliers. One extreme value can inflate the standard deviation a great deal, so always look at the data before trusting the result.

A few additional errors to watch for

Confusing the mean with the median: Standard deviation is calculated using deviations from the mean, not the median.

Mixing population and sample formulas: The two methods use the same deviations but different divisors. Check which one your question requires.

Assuming a high standard deviation is always bad: A high value simply means greater spread. Whether that spread is desirable depends on the context.

Comparing unrelated measurements without considering scale: A standard deviation of 10 can mean very different things for household income, exam scores, or product dimensions. Consider the units, average, and purpose of the comparison.

Treating the empirical rule as universal: The 68–95–99.7 rule applies to approximately normal distributions, not to every data set.

How to Calculate Standard Deviation With a Calculator

Manual calculations are useful for learning the formula, but they can become time-consuming when a data set contains dozens or hundreds of values. A calculator can reduce arithmetic errors and make it easier to verify the result.

After working through an example by hand, you can verify it with the Standard Deviation Calculator. To compare it with the simpler measure, try the Mean Absolute Deviation Calculator. If you want to see how many standard deviations a value sits from the mean, use the Standard Normal Distribution Calculator.

When checking your result, make sure you know whether you need population or sample standard deviation. If the calculator offers both options, select the one that matches your data. Also check that you entered all values correctly and that the displayed answer has not been rounded more than necessary.

A calculator is most helpful when it supports understanding rather than replacing it. Knowing the five steps makes it easier to recognize an incorrect result and explain what the final number means.

Frequently Asked Questions

Can standard deviation be negative?

No. It is the square root of a sum of squares, so it is always zero or positive.

Can standard deviation be zero?

Yes. If every value in the data set is identical, there is no spread at all, so the standard deviation is 0.

Is a high standard deviation bad?

Not by itself. Whether it is good or bad depends on the situation. A high standard deviation in a manufacturing process may signal poor quality control, while a high standard deviation in daily stock returns simply reflects a volatile market.

Which Excel functions calculate standard deviation?

STDEV.P calculates the population standard deviation and STDEV.S calculates the sample standard deviation.

Does standard deviation work for any kind of data?

It applies to numerical data. It is most informative when the data is roughly symmetrical, and less reliable when the data is heavily skewed or has extreme outliers.

More precisely, standard deviation can be calculated for numerical data even when it is skewed. However, interpretations based on a bell-shaped distribution, such as the empirical rule, may not apply well to heavily skewed data or data with extreme outliers.

What is the difference between population and sample standard deviation?

Population standard deviation divides the sum of squared deviations by the total number of values, N. Sample standard deviation divides by n − 1 to account for estimating population variability from a sample.

Use the population formula when your data includes the entire group of interest. Use the sample formula when the observations represent a sample from a larger population.

What is the easiest way to calculate standard deviation by hand?

Find the mean, subtract it from each value, square the deviations, add the squared values, divide by the appropriate number, and take the square root. Remember to divide by N for a population or n − 1 for a sample.

Can two data sets have the same standard deviation but different means?

Yes. Adding the same constant to every value changes the mean but leaves standard deviation unchanged. For example, the data sets 2, 4, 6 and 12, 14, 16 have the same standard deviation, even though their means differ by 10.

Does a larger standard deviation mean a larger range?

Not necessarily. Standard deviation and range measure different aspects of spread. Range depends only on the minimum and maximum values, while standard deviation uses every value’s distance from the mean. Two data sets can have similar ranges but different standard deviations.

Why do we square deviations instead of using their original values?

Positive and negative deviations cancel out when added together. Squaring makes the values nonnegative and gives larger deviations more weight. This allows the calculation to measure spread around the mean.

Is standard deviation the same as average distance from the mean?

Not exactly. Standard deviation is based on squared deviations, averaged using the appropriate divisor, and then square-rooted. Mean absolute deviation averages the absolute distances from the mean. The two measures describe spread but generally produce different results.

Final Takeaway

The mean tells you where the center of the data is, and the standard deviation tells you how tightly the data clusters around it. Work through the five steps once by hand and the idea becomes easy to remember: measure the distance from the mean, square it, average it, then take the square root.

The most important choice is knowing whether your data represents a complete population or a sample. Once you choose the correct formula, the calculation follows the same process in either case.

When you interpret the result, consider the size of the standard deviation alongside the mean, the units, the distribution, and the purpose of the analysis. That context turns a number into useful information.