Command Palette

Search for a command to run...

Back to all guides
Math & Science

Complete Guide to Standard Deviation: Formula, Calculation, and Examples

Master standard deviation with this comprehensive guide. Learn the population vs. sample formulas, step-by-step calculations, real-world examples, and when to use standard deviation.

10 min readPublished February 12, 2025

What Does Standard Deviation Measure?

Standard deviation is one of the most important concepts in statistics, measuring how spread out a set of data values is around the mean (average). A low standard deviation means the data points are clustered closely around the mean, indicating consistency. A high standard deviation means the data points are widely scattered, indicating greater variability. Understanding standard deviation allows you to go beyond the average and assess the reliability and distribution of your data.

For example, if two basketball players each average 20 points per game, standard deviation tells you which player is more consistent. Player A might score between 18 and 22 points every game (low standard deviation), while Player B might alternate between 5 and 35 points (high standard deviation). Both have the same mean, but their performance profiles are dramatically different. Standard deviation captures this distinction in a single number. Use our Standard Deviation Calculator to compute it instantly from your dataset.

The standard deviation is expressed in the same units as the original data, which makes it intuitive to interpret. If you are measuring heights in centimeters, the standard deviation is also in centimeters. If you are measuring test scores on a 100-point scale, the standard deviation tells you how many points, on average, scores deviate from the mean. This property makes standard deviation more practical than variance, which is expressed in squared units and is harder to relate back to the original measurements.

Population vs Sample Standard Deviation

One of the most common sources of confusion in statistics is the distinction between population standard deviation and sample standard deviation. The population standard deviation (denoted by the Greek letter σ) is used when your data represents the entire group you are studying. The sample standard deviation (denoted by s) is used when your data is a subset of a larger population. The key difference lies in the denominator of the formula: population standard deviation divides by N (the total number of data points), while sample standard deviation divides by N − 1 (called Bessel's correction).

Why subtract 1 when working with a sample? When you calculate the mean from a sample, the data points are naturally closer to that sample mean than they would be to the true population mean. Dividing by N − 1 instead of N corrects for this underestimation, producing an unbiased estimate of the true population standard deviation. The correction has a noticeable effect with small samples but becomes negligible with large datasets. For a sample of 5 data points, dividing by 4 instead of 5 changes the result by 25%. For a sample of 1,000 data points, dividing by 999 instead of 1,000 barely matters.

Step-by-Step Calculation with an Example

Let's calculate the sample standard deviation of a small dataset to demonstrate the process. Suppose five students scored the following on a test: 72, 85, 90, 68, and 95. The steps are as follows.

Step 1: Calculate the mean. Add all values and divide by the count. Mean = (72 + 85 + 90 + 68 + 95) / 5 = 410 / 5 = 82.

Step 2: Subtract the mean from each value to find the deviations.72 − 82 = −10, 85 − 82 = 3, 90 − 82 = 8, 68 − 82 = −14, 95 − 82 = 13.

Step 3: Square each deviation.(−10)² = 100, 3² = 9, 8² = 64, (−14)² = 196, 13² = 169.

Step 4: Sum the squared deviations. 100 + 9 + 64 + 196 + 169 = 538.

Step 5: Divide by N − 1 for sample standard deviation. 538 / 4 = 134.5. This is the sample variance.

Step 6: Take the square root.√134.5 ≈ 11.6. The sample standard deviation is approximately 11.6 points.

This tells us that, on average, test scores deviate from the mean by about 11.6 points. Since the mean is 82, a typical student scored between roughly 70 and 94 (one standard deviation below and above the mean). The entire calculation can be summarized by the formula: s = √[Σ(xi − x̄)² / (N − 1)], where xiis each data point and x̄ is the sample mean.

The Relationship Between Variance and Standard Deviation

Variance is the average of the squared deviations from the mean, and standard deviation is simply the square root of the variance. While both measure spread, they serve different purposes. Variance is mathematically useful because squared deviations are always positive, which avoids the problem of positive and negative deviations canceling each other out. However, because variance is expressed in squared units, it is difficult to interpret directly. If you measure heights in centimeters, the variance is in square centimeters, which does not have an intuitive physical meaning.

Standard deviation solves this problem by taking the square root, returning the measure to the original units of the data. In practice, standard deviation is the preferred metric for reporting and communicating variability. Variance remains important in theoretical statistics, in formulas for confidence intervals and hypothesis testing, and as an intermediate step in calculating standard deviation. Understanding both measures and their relationship gives you a deeper grasp of statistical analysis.

Standard Deviation and the Normal Distribution

The normal distribution, also called the bell curve or Gaussian distribution, is one of the most fundamental concepts in statistics. When data follows a normal distribution, it is symmetrically distributed around the mean, with most values clustered near the center and fewer values appearing as you move further away. Standard deviation is the key parameter that determines the width of the bell curve. A small standard deviation produces a tall, narrow curve where data is tightly clustered. A large standard deviation produces a short, wide curve where data is spread out.

The normal distribution appears naturally in countless real-world phenomena. Human heights, blood pressure readings, measurement errors in experiments, and standardized test scores all tend to follow an approximately normal distribution. This is partly explained by the Central Limit Theorem, which states that the means of sufficiently large samples from any distribution will approximate a normal distribution. This powerful property makes standard deviation and the normal distribution the backbone of inferential statistics.

The 68-95-99.7 Rule (Empirical Rule)

One of the most practical applications of standard deviation is the empirical rule, also known as the 68-95-99.7 rule. For data that follows a normal distribution, this rule describes the proportion of data that falls within one, two, and three standard deviations of the mean.

  • 68% of data falls within one standard deviation of the mean (μ ± 1σ).
  • 95% of data falls within two standard deviations of the mean (μ ± 2σ).
  • 99.7% of data falls within three standard deviations of the mean (μ ± 3σ).

For example, if the average IQ score is 100 with a standard deviation of 15, then approximately 68% of people score between 85 and 115, 95% score between 70 and 130, and 99.7% score between 55 and 145. This rule allows you to quickly assess whether a particular data point is typical or unusual. A score of 130 is two standard deviations above the mean, placing it in the top 2.5% of the distribution. A score of 145 is three standard deviations above the mean, placing it in the top 0.15%.

Real-World Applications of Standard Deviation

In finance, standard deviation is used to measure the volatility of investment returns. A stock with a high standard deviation of returns is considered risky because its price fluctuates significantly, while a bond with a low standard deviation offers more predictable returns. Portfolio managers use standard deviation to balance risk and reward, constructing portfolios that achieve target returns with acceptable levels of volatility. The Sharpe ratio, a widely used measure of risk-adjusted return, is calculated by dividing excess returns by standard deviation.

In manufacturing, standard deviation is critical for quality control. Products must meet specifications, and standard deviation measures how consistently those specifications are met. A process with a low standard deviation produces items that are nearly identical, which reduces waste, rework, and customer complaints. Six Sigma, a famous quality management methodology, aims to reduce the standard deviation of a process so that six standard deviations fit within the acceptable tolerance range, corresponding to a defect rate of just 3.4 per million opportunities.

In education, standard deviation helps interpret test scores and evaluate student performance. If a class average is 75 with a standard deviation of 5, scores are relatively close together. If the standard deviation is 20, there is enormous variation in understanding. Educators can use this information to identify students who need extra help or to assess whether an exam was well-designed. Standard deviation also underpins the calculation of z-scores, which allow comparison of performance across different tests or subjects.

Key Takeaways

  • Standard deviation measures how spread out data is around the mean, in the same units as the original data.
  • Population standard deviation divides by N; sample standard deviation divides by N − 1 (Bessel's correction) to provide an unbiased estimate.
  • To calculate standard deviation: find the mean, compute deviations, square them, average the squares, and take the square root.
  • Variance is standard deviation squared; it is useful in formulas but less intuitive to interpret.
  • The 68-95-99.7 rule states that nearly all data in a normal distribution falls within three standard deviations of the mean.
  • Standard deviation is widely used in finance (risk measurement), manufacturing (quality control), and education (score interpretation).

Frequently Asked Questions

What is a good standard deviation?

There is no universal "good" standard deviation because it depends entirely on context. A standard deviation of $50 is small for annual income data but enormous for the price of a cup of coffee. The meaningfulness of standard deviation depends on the scale of your data and the specific application. In general, compare the standard deviation to the mean: a coefficient of variation (standard deviation divided by the mean) below 0.5 suggests relatively low variability, while a value above 1.0 suggests high variability.

Can standard deviation be negative?

No. Standard deviation is always zero or positive because it is the square root of the average of squared deviations. Squaring each deviation eliminates all negative values, so the sum of squared deviations is always non-negative. If every data point is identical, the deviations are all zero, and the standard deviation is zero, indicating no variability whatsoever.

When should I use population vs sample standard deviation?

Use population standard deviation when your dataset includes every member of the group you are studying. For example, if you are analyzing the test scores of all 30 students in a single classroom, that is your entire population. Use sample standard deviation when your data is a subset of a larger group, such as surveying 500 people to make conclusions about a country's entire population. In most real-world research, you are working with samples, so sample standard deviation is the appropriate choice.

How is standard deviation related to margin of error?

Margin of error is closely related to standard deviation through the formula: Margin of Error = z × (σ / √n), where z is the z-score for your confidence level (1.96 for 95% confidence), σ is the standard deviation, and n is the sample size. This formula shows that margin of error decreases as sample size increases and as standard deviation decreases. A survey with low variability and a large sample size will have a smaller margin of error, meaning the results are more precise.

Try the Complete Guide to Standard Deviation tool

Put what you learned into practice with our free online tool.

Related Guides