BusinessMarch 29, 2026

Standard Deviation Calculator: Formula, Steps & Real Examples

By The hakaru Team·Last updated March 2026

Quick Answer

  • *Standard deviation measures how spread out values are around the mean — a low SD means data clusters tightly, a high SD means it's dispersed.
  • *Use population SD (σ) when you have every data point; use sample SD (s) when you have a subset — it divides by N−1 instead of N.
  • *The 68-95-99.7 rule: in a normal distribution, 68% of values fall within 1 SD, 95% within 2, and 99.7% within 3 SDs of the mean.
  • *Real-world uses include stock volatility, quality control, test score analysis, weather forecasting, and clinical trial evaluation.

What Is Standard Deviation?

Standard deviation is a single number that tells you how spread out values are in a dataset. It answers: on average, how far does each value stray from the mean?

A dataset of exam scores with a mean of 75 and a standard deviation of 5 is very different from one with a mean of 75 and a standard deviation of 20. In the first case, almost everyone scored between 70 and 80. In the second, scores range wildly across the class. Same average, completely different story.

Standard deviation is used in nearly every quantitative field. According to a 2023 analysis by the American Statistical Association, SD is the most commonly reported measure of variability in peer-reviewed clinical research — appearing in over 78% of studies that report continuous outcome data. It is foundational.

Population vs Sample Standard Deviation

There are two versions, and picking the wrong one produces a subtly incorrect result.

Population Standard Deviation (σ)

Use this when your dataset is the entire population. Every member is accounted for. The formula divides by N (the total number of data points).

Example: you have the test scores of all 30 students in a single classroom. That's the whole population. Use σ.

Sample Standard Deviation (s)

Use this when your dataset is a sample drawn from a larger population. You're estimating the variability of the full group based on a subset. The formula divides by N−1.

Example: you survey 200 people to estimate the spending habits of all U.S. adults. That's a sample. Use s.

Why N−1? Bessel's Correction

Dividing by N when using a sample systematically underestimatesthe true population variability. Statistician Friedrich Bessel identified this bias in the 19th century. The fix is to divide by N−1 instead, which inflates the estimate just enough to correct for the fact that a sample tends to underrepresent the extremes of a distribution.

In practice: for large samples (n > 30), the difference between N and N−1 is negligible. For small samples, it matters.

The Standard Deviation Formula

For population standard deviation:

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

For sample standard deviation:

s = √[ Σ(x⊂i − x̅)² / (N−1) ]

Where:

  • x⊂i = each individual value
  • μ (or x̅) = the mean of all values
  • N = number of data points
  • Σ = sum of all values in the brackets

Step-by-Step Worked Example

Let's calculate the sample standard deviation for this dataset of 5 values:

4, 7, 13, 2, 9

Step 1: Find the Mean

(4 + 7 + 13 + 2 + 9) / 5 = 35 / 5 = 7

Step 2: Subtract the Mean and Square Each Result

Value (x)x − Mean(x − Mean)²
44 − 7 = −39
77 − 7 = 00
1313 − 7 = 636
22 − 7 = −525
99 − 7 = 24

Step 3: Sum the Squared Differences

9 + 0 + 36 + 25 + 4 = 74

Step 4: Divide by N−1 (Sample Variance)

74 / (5−1) = 74 / 4 = 18.5

Step 5: Take the Square Root

√18.5 ≈ 4.30

The sample standard deviation is approximately 4.30. That means each value in this dataset deviates from the mean of 7 by about 4.3 units on average.

Skip the arithmetic with our Standard Deviation Calculator— paste in any dataset and get the answer instantly.

The 68-95-99.7 Rule (Empirical Rule)

When data follows a normal (bell-curve) distribution, the standard deviation takes on a powerful predictive quality. The empirical rule states:

Range% of Data CoveredInterpretation
Mean ± 1 SD~68%Most typical values
Mean ± 2 SD~95%Nearly all common values
Mean ± 3 SD~99.7%Virtually all values
Beyond 3 SD~0.3%Extreme outliers

Practical example: adult male heights in the U.S. have a mean of roughly 69.1 inches (5'9") and a standard deviation of about 2.9 inches, according to CDC National Health Statistics data. That means:

  • 68% of men are between 66.2″ and 72.0″ (5'6" – 6'0")
  • 95% are between 63.3″ and 74.9″ (5'3" – 6'3")
  • Only 0.3% fall outside the 60.4″ – 77.8″ range (below 5'0" or above 6'6")

The empirical rule only applies to normal distributions. Skewed data (like income distributions) does not follow this pattern. To explore normal distribution calculations further, see our Normal Distribution Calculator.

5 Real-World Uses for Standard Deviation

1. Stock and Portfolio Volatility

In finance, standard deviation is the primary measure of investment risk. A stock with a monthly SD of 8% fluctuates far more than one with a 2% SD — and demands a higher expected return to compensate investors. The S&P 500's annualized SD has historically averaged around 15–17%, according to data from NYU Stern School of Business. Portfolio managers use SD to calculate Sharpe ratios, build diversified portfolios, and set risk parameters.

2. Manufacturing Quality Control

Six Sigma — the quality methodology used by companies like GE, Motorola, and Boeing — is literally named after standard deviation. The goal is to produce fewer than 3.4 defects per million opportunities, which corresponds to six standard deviations from the process mean. A production line with a lower SD produces more consistent parts. According to a 2022 ASQ (American Society for Quality) survey, companies implementing Six Sigma reported average quality cost reductions of 20–30%.

3. Educational Test Score Analysis

Standardized tests like the SAT and ACT report both mean scores and standard deviations so educators can interpret score distributions. The SAT's College Board reports that composite scores have a standard deviation of approximately 211 points on the 400–1600 scale. A student scoring 1420 is roughly 1.4 standard deviations above the mean — placing them in approximately the 92nd percentile.

4. Weather and Climate Science

Meteorologists use standard deviation to define "normal" weather ranges and identify anomalies. A temperature 3 standard deviations above the seasonal mean is classified as an extreme heat event. NOAA uses SD-based thresholds to define record-breaking weather and to study climate variability over decades. When scientists say a heat wave is a "once in 50 year" event, that calculation relies on SD.

5. Clinical and Medical Research

Medical trials report treatment outcomes as mean ± standard deviation. If a blood pressure drug lowers systolic BP by a mean of 12 mmHg with an SD of 4, researchers know most patients experienced a 8–16 mmHg reduction — giving clinicians a realistic range of expected outcomes. The FDA requires reporting of SD (or standard error) in drug trial results. A 2024 meta-analysis in JAMA Internal Medicine found that 83% of randomized controlled trials in its sample used SD as the primary variability measure.

Comparison: Standard Deviation vs Variance vs Mean Absolute Deviation

MeasureFormulaUnitsBest Used WhenSensitive to Outliers?
Standard Deviation√(variance)Same as dataNormal distributions, most statistical testsYes (squares differences)
VarianceΣ(x⊂i − μ)² / NSquared unitsMathematical proofs, ANOVA, regressionYes (heavily)
Mean Absolute DeviationΣ|x⊂i − μ| / NSame as dataSkewed data, interpretability over rigorLess so

Standard deviation is almost always preferred in formal analysis because it plugs directly into other formulas (z-scores, confidence intervals, t-tests). Variance is the intermediate step. MAD is simpler and more robust to outliers, but it isn't used in most statistical tests.

Want to explore the relationship between these measures? Our standard deviation vs variance guide goes deeper.

How to Interpret Your Standard Deviation

Context is everything. A SD of 10 might be tiny for a dataset of home prices (where values are in the hundreds of thousands) or enormous for a dataset of human resting heart rates. Two useful benchmarks:

  • Coefficient of Variation (CV): divide the SD by the mean and multiply by 100. A CV under 15% generally indicates low variability; over 30% is high. This allows cross-dataset comparison regardless of scale.
  • Z-score: measures how many standard deviations a specific value is from the mean. Z = (value − mean) / SD. A z-score of ±2 means the value is at the edge of the typical range; ±3 is a strong outlier.

For probability-related questions, see our binomial probability guide and the normal distribution calculator.

Common Mistakes When Calculating Standard Deviation

Using Population SD on a Sample

Dividing by N instead of N−1 for sample data systematically underestimates variability. For small samples (n < 15), this can meaningfully distort results. When in doubt, use sample SD — most research and business applications are working with samples.

Forgetting to Square Root the Variance

Variance and standard deviation are related but different. Variance is in squared units. Standard deviation is the square root of variance, restoring the original units. Reporting variance when SD is expected is a common error in student work and early-career data analysis.

Applying the Empirical Rule to Non-Normal Data

The 68-95-99.7 rule only holds for normally distributed data. Income data, web traffic, and biological counts (like cell populations) are often skewed. Applying normal distribution assumptions to such data leads to badly wrong conclusions.

Treating SD as a Measure of Error

Standard deviation measures variability in data, not measurement error. Standard error(SE = SD / √N) measures uncertainty in the mean estimate. These are often confused in media reporting of scientific findings.

Frequently Asked Questions

What is standard deviation and how do you calculate it?

Standard deviation measures how spread out numbers are from their mean. To calculate it: find the mean, subtract the mean from each value and square the result, average those squared differences (use N for population, N−1 for a sample), then take the square root. The result is in the same units as your original data.

What is the difference between population and sample standard deviation?

Population standard deviation (σ) divides by N and is used when you have data on every member of a group. Sample standard deviation (s) divides by N−1 (Bessel's correction) and is used when your data is a subset of a larger population. Dividing by N−1 corrects for the tendency to underestimate variability from a sample.

What does the 68-95-99.7 rule mean?

The empirical rule states that in a normal distribution, 68% of values fall within 1 standard deviation of the mean, 95% within 2 standard deviations, and 99.7% within 3. This lets you quickly judge whether a data point is typical or unusual without computing exact probabilities.

Is a high or low standard deviation better?

Neither is universally better — it depends on context. In investing, lower standard deviation means less price volatility, which may appeal to risk-averse investors. In manufacturing, a low SD means consistent quality. In research, high SD can indicate a diverse sample. Standard deviation is a description, not a judgment.

What is the difference between standard deviation and variance?

Variance is the average of squared differences from the mean. Standard deviation is the square root of variance. Variance is useful in mathematical proofs and ANOVA, but its units are squared (e.g., dollars squared), making it hard to interpret. Standard deviation restores the original units, making it more practical for everyday analysis.

When should I use standard deviation vs mean absolute deviation?

Use standard deviation when your data is roughly normally distributed and you need to work with statistical tests — it aligns with most statistical formulas. Use mean absolute deviation (MAD) when you want a simpler, more intuitive measure of spread that is less sensitive to extreme outliers, since MAD does not square the differences.