Descriptive Statistics Measures of Dispersion Variability 22 min read July 22, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Standard Deviation vs Variance: What's the Difference?

A class of 30 students scores an average of 74 on an exam. But how spread out are those scores? Two measures answer this question: variance and standard deviation. Both describe the dispersion of data around the mean, yet they differ in units, interpretation, and when statisticians reach for each one.

This guide covers both formulas for population and sample versions, provides fully worked examples across five real-world datasets, explains the mathematical relationship between the two measures, and ends with a decision guide for choosing correctly — plus an interactive calculator you can use right now.

What You'll Learn
  • ✓ The exact definitions of variance and standard deviation
  • ✓ All four formulas: population variance, sample variance, population SD, sample SD
  • ✓ Five fully worked examples with step-by-step calculations
  • ✓ Why variance uses squared units — and why that matters
  • ✓ When to use variance versus standard deviation in practice
  • ✓ Real-world applications in finance, medicine, manufacturing, and machine learning
  • ✓ An interactive variance and standard deviation calculator with step-by-step output

Definitions: Variance and Standard Deviation

Definition — Variance (σ² or s²)
Variance is the average of the squared deviations from the mean. It measures how far each data point sits from the mean of the dataset, expressed in squared units of the original data.
Variance = Σ(xᵢ − μ)² / N
Definition — Standard Deviation (σ or s)
Standard deviation is the square root of variance. It measures the average distance between each data point and the mean, expressed in the same units as the original data — which makes it directly interpretable.
Standard Deviation = √Variance = √[Σ(xᵢ − μ)² / N]

Both measures come from the same underlying calculation. You compute variance first, then take the square root to get standard deviation. They answer the same question — how spread out is the data? — but in different units. Descriptive statistics relies on both depending on context, and understanding when to use each one is a core skill in data analysis.

The choice between them is not arbitrary. Variance has mathematical properties that make it essential for theoretical work and certain statistical procedures. Standard deviation is preferred when you need to communicate a result clearly or compare spread to the mean itself — because it speaks the same language as the data.

💡
The core relationship

Standard deviation = √Variance, and Variance = (Standard deviation)². These two facts connect every formula, calculation, and application covered on this page.

All Four Formulas Explained

There are four distinct formulas — two for variance (population and sample) and two for standard deviation (population and sample). The difference between population and sample formulas comes down to one thing: the denominator.

Population vs Sample: Why the Denominator Changes

When you have data for an entire population of N members, divide by N. When you have a sample of n members drawn from a larger population, divide by n − 1. The subtraction of 1 is called Bessel's correction, named after the mathematician Friedrich Bessel. Without it, sample variance systematically underestimates the true population variance — particularly with small samples. Dividing by n − 1 corrects that bias.

Population
Population Variance (σ²)
σ² = Σ(xᵢ − μ)² / N
Units: squared (e.g., cm², $², °C²)
Population
Population Std Dev (σ)
σ = √[Σ(xᵢ − μ)² / N]
Units: same as original data
Sample
Sample Variance (s²)
s² = Σ(xᵢ − x̄)² / (n − 1)
Units: squared (e.g., cm², $², °C²)
Sample
Sample Std Dev (s)
s = √[Σ(xᵢ − x̄)² / (n − 1)]
Units: same as original data
SymbolNameDenominatorWhen to Use
σ²Population VarianceNYou have data on the entire population
σPopulation Standard DeviationNYou have data on the entire population
Sample Variancen − 1You have a sample from a larger population
sSample Standard Deviationn − 1You have a sample from a larger population

In practice, most research and data science work involves samples, so s and s² are far more common than σ and σ². Statistical software such as Excel, R, Python's NumPy, and SPSS all compute sample standard deviation by default with their standard functions.

Standard Deviation vs Variance: Key Differences

📊
Featured Snippet — Core Difference

The main difference between standard deviation and variance is units. Variance is the average squared deviation from the mean (measured in squared units). Standard deviation is the square root of variance (measured in the same units as the data). Both measure spread; standard deviation is easier to interpret alongside the mean.

Feature Variance (σ² or s²) Standard Deviation (σ or s)
Definition Average squared deviation from the mean Square root of variance
Formula (population) σ² = Σ(xᵢ − μ)² / N σ = √[Σ(xᵢ − μ)² / N]
Formula (sample) s² = Σ(xᵢ − x̄)² / (n − 1) s = √[Σ(xᵢ − x̄)² / (n − 1)]
Units Squared units (kg², cm², $²) Same units as data (kg, cm, $)
Sensitivity to outliers Very high (deviations are squared) High (inherits from variance)
Can be negative? No — always ≥ 0 No — always ≥ 0
Equals zero when? All values are identical All values are identical
Additive property Yes — variances of independent variables add No — SDs do not add directly
Interpretability Harder — squared units lack intuitive meaning Easier — same scale as the data
Used in ANOVA? Yes (F-statistic) Indirectly
Used for confidence intervals? Indirectly Yes (standard error = s/√n)
Used in machine learning? Yes (loss functions, PCA, covariance) Yes (feature scaling, normalization)
Primary use case Mathematical derivations, combined analysis Reporting, interpretation, data visualization

The Unit Problem with Variance

The squared-unit issue is not trivial. Suppose you measure house prices in dollars. The variance comes out in dollars-squared — a unit with no physical meaning you can relate to. Is a variance of $40,000,000 large or small? Hard to say. The standard deviation of $6,325 is immediately comparable to the mean price (say $350,000) and tells you something concrete about how prices cluster.

This is why reports, academic papers, and dashboards almost always present standard deviation rather than variance. Variance does its most important work behind the scenes — inside formulas for ANOVA, regression, and hypothesis tests — while standard deviation faces the audience.

Worked Examples: Step-by-Step Calculations

The following examples cover five real-world datasets. Each one calculates both variance and standard deviation from scratch to show the complete procedure.

Example 1 — Education

Student Exam Scores

Five students score: 68, 74, 81, 74, 63 on a statistics exam. Calculate the sample variance and sample standard deviation.

StudentScore (xᵢ)xᵢ − x̄(xᵢ − x̄)²
A6868 − 72 = −416
B7474 − 72 = +24
C8181 − 72 = +981
D7474 − 72 = +24
E6363 − 72 = −981
Sum of squared deviations186
1

Find the mean: x̄ = (68 + 74 + 81 + 74 + 63) / 5 = 360 / 5 = 72

2

Calculate each squared deviation: See table above. Sum = 186.

3

Sample variance: s² = 186 / (5 − 1) = 186 / 4 = 46.5 points²

4

Sample standard deviation: s = √46.5 ≈ 6.82 points

✓ Sample variance s² = 46.5 points²  |  Sample standard deviation s ≈ 6.82 points. The typical score deviates about 6.82 points from the class mean of 72.

Example 2 — Finance

Employee Monthly Salaries ($)

A department has four employees with monthly salaries: $3,200 | $4,100 | $3,800 | $5,300. This is the complete department (population). Calculate population variance and population standard deviation.

1

Population mean: μ = (3,200 + 4,100 + 3,800 + 5,300) / 4 = 16,400 / 4 = $4,100

2

Squared deviations: (3200−4100)² = 810,000  |  (4100−4100)² = 0  |  (3800−4100)² = 90,000  |  (5300−4100)² = 1,440,000. Sum = 2,340,000.

3

Population variance: σ² = 2,340,000 / 4 = $585,000 per month²

4

Population standard deviation: σ = √585,000 ≈ $764.85 per month

✓ Population variance σ² = $585,000/month²  |  Population standard deviation σ ≈ $764.85/month. Salaries typically fall within about $765 of the $4,100 average.

Example 3 — Weather / Science

Daily High Temperatures (°C)

Six daily temperatures are recorded: 22, 19, 25, 21, 28, 23 °C. Treat as a sample. Calculate sample variance and standard deviation.

1

Mean: x̄ = (22 + 19 + 25 + 21 + 28 + 23) / 6 = 138 / 6 = 23°C

2

Squared deviations: (22−23)²=1 | (19−23)²=16 | (25−23)²=4 | (21−23)²=4 | (28−23)²=25 | (23−23)²=0. Sum = 50.

3

Sample variance: s² = 50 / (6 − 1) = 50 / 5 = 10°C²

4

Sample standard deviation: s = √10 ≈ 3.16°C

✓ Sample variance s² = 10°C²  |  Sample standard deviation s ≈ 3.16°C. Temperatures deviate from the 23°C mean by about 3.16°C on average.

Example 4 — Manufacturing / Quality Control

Bolt Diameters (mm)

A production line samples 5 bolts with diameters: 10.1, 9.9, 10.2, 10.0, 9.8 mm. Calculate sample variance and standard deviation for quality control.

1

Mean: x̄ = (10.1 + 9.9 + 10.2 + 10.0 + 9.8) / 5 = 50.0 / 5 = 10.00 mm

2

Squared deviations: (0.1)²=0.01 | (−0.1)²=0.01 | (0.2)²=0.04 | (0.0)²=0 | (−0.2)²=0.04. Sum = 0.10.

3

Sample variance: s² = 0.10 / 4 = 0.025 mm²

4

Sample standard deviation: s = √0.025 ≈ 0.158 mm

✓ Sample variance s² = 0.025 mm²  |  Sample standard deviation s ≈ 0.158 mm. Bolt diameters vary by about 0.16 mm from the target 10.00 mm — an engineer can compare this to their tolerance specification.

Example 5 — Finance / Investment

Monthly Stock Returns (%)

A stock recorded monthly returns over 6 months: +3.2%, −1.5%, +4.8%, +0.9%, −2.1%, +3.7%. Calculate sample variance and standard deviation as a measure of investment risk.

1

Mean return: x̄ = (3.2 − 1.5 + 4.8 + 0.9 − 2.1 + 3.7) / 6 = 9.0 / 6 = 1.50%

2

Squared deviations: (1.7)²=2.89 | (−3.0)²=9.00 | (3.3)²=10.89 | (−0.6)²=0.36 | (−3.6)²=12.96 | (2.2)²=4.84. Sum = 40.94.

3

Sample variance: s² = 40.94 / 5 = 8.19 %²

4

Sample standard deviation: s = √8.19 ≈ 2.86%

✓ Sample variance s² ≈ 8.19 %²  |  Sample standard deviation s ≈ 2.86%. This stock typically returns within ±2.86% of its 1.50% average monthly return — the volatility measure used in portfolio risk analysis.

The Mathematical Relationship

Variance and standard deviation are not two independent calculations. They are two steps of the same process, and their relationship is exact:

Mathematical Relationship
SD = √Variance      Variance = SD²
σ = √σ²   Population
s = √s²   Sample
σ² = σ²   Square the SD to get variance

This relationship has a concrete consequence: if you know one, you can calculate the other instantly. A sample standard deviation of s = 8.5 means the sample variance is s² = 72.25. A population variance of σ² = 100 means the population standard deviation is σ = 10.

Why Square the Deviations at All?

When you subtract the mean from each data point, you get a deviation. Some deviations are positive, some are negative, and if you simply add them all up, they cancel each other and sum to zero — which tells you nothing about spread. Two solutions exist: take the absolute value, or square the deviations. Statistics chose squaring for three reasons.

Squaring eliminates negative values

Any deviation squared is non-negative, so the sum of squared deviations is always positive — it correctly reflects the total spread regardless of whether individual values fall above or below the mean.

Squaring penalizes large deviations more heavily

A deviation of 10 contributes 100 to the sum of squares, while a deviation of 2 contributes only 4. This makes variance (and standard deviation) more sensitive to outliers than the mean absolute deviation, which is sometimes exactly the behavior you want when extreme values carry more risk.

Squared deviations enable additive combination

Variances of independent random variables add together: Var(X + Y) = Var(X) + Var(Y). Standard deviations do not have this property. This additivity makes variance the natural currency for combining uncertainty across multiple variables — essential in probability theory, ANOVA, and portfolio construction.

When to Use Variance vs Standard Deviation

Decision Guide: Which Measure to Use?

Do you need results in the original data units?
Use Standard Deviation
Are you combining spread from multiple independent variables?
Use Variance (variances add; SDs don't)
Are you running ANOVA, regression, or an F-test?
Use Variance (these tests operate on variance)
Are you building a covariance matrix or doing PCA?
Use Variance (diagonal elements are variances)
Are you communicating results to a non-technical audience?
Use Standard Deviation
Do you need to compute a z-score or confidence interval?
Use Standard Deviation
Are you working on a machine learning loss function?
Use Variance (MSE = variance of residuals)
⚡ Quick Reference — Use Standard Deviation When:
  • You want a number in the same units as the mean for direct comparison
  • You're computing a z-score: z = (x − μ) / σ
  • You're building confidence intervals using the standard error (SE = s / √n)
  • You're visualizing data with error bars on a chart
  • You're comparing spread across datasets measured in the same unit
  • You're using the empirical rule (68–95–99.7%) for a normal distribution
⚡ Quick Reference — Use Variance When:
  • You need the additive property: Var(X + Y) = Var(X) + Var(Y) for independent X and Y
  • You're running ANOVA or an F-test (which compare ratios of variances)
  • You're constructing a covariance or correlation matrix
  • You're measuring portfolio risk where covariances between assets matter
  • You're optimizing a mean squared error (MSE) loss function
  • You're deriving theoretical results in probability or mathematical statistics

Real-World Applications

📈

Finance & Investment

Variance (σ²) measures total portfolio risk. Covariance between asset returns determines how risks combine. Modern Portfolio Theory by Harry Markowitz built on variance as the core risk metric. Standard deviation, called volatility, communicates that risk in percentage terms investors can reason about.

🏥

Healthcare & Clinical Research

Standard deviation appears in clinical trial reports to describe the spread of patient outcomes around the mean response. Researchers use sample variance in repeated-measures ANOVA to compare treatment effects across multiple time points.

🔧

Manufacturing & Quality Control

Six Sigma methodology defines process capability using standard deviation (σ). A process "in control" keeps output within ±3σ of the target. Variance tracking over time detects drift before defects reach customers.

🤖

Machine Learning & AI

Mean Squared Error (MSE) — a core loss function — is the variance of residuals. Bias-variance tradeoff uses variance formally. Principal Component Analysis (PCA) seeks directions of maximum variance. Feature standardization divides by standard deviation.

🌡️

Meteorology & Climate

Climate scientists report temperature anomaly standard deviation to quantify how much year-to-year temperatures deviate from a historical baseline. Variance is used when combining uncertainty estimates from multiple climate models.

Sports Analytics

Consistency is measured by standard deviation of performance metrics across games. A player with a lower standard deviation in shooting percentage is more predictable. Analysts use variance when building composite performance indices from multiple statistics.

Finance Case Study: Portfolio Variance

Case Study — Finance

Why Portfolio Theory Uses Variance, Not Standard Deviation

Two stocks each have a standard deviation of 10%. Naively you might assume that a 50/50 portfolio has SD = 10%. It does not — unless the stocks move perfectly together (correlation = +1). The correct formula uses variance and covariance:

σ²_portfolio = w₁²σ₁² + w₂²σ₂² + 2w₁w₂Cov(R₁, R₂)

If the two stocks have a correlation of −0.5 (they tend to move in opposite directions), the portfolio variance drops significantly below 100 (10²). You cannot do this calculation with standard deviations directly — which is exactly why variance is the preferred unit in portfolio mathematics. The portfolio's standard deviation is then √(portfolio variance), converting back to an interpretable percentage. This is why both measures are needed.

The SPREAD Framework

The following framework provides a memorable step-by-step procedure for computing variance and standard deviation from any dataset. Each letter maps to one action.

S
Start with the Mean
Calculate x̄ (or μ): sum all values, divide by n (or N)
P
Plot Deviations
Subtract the mean from every data point: (xᵢ − x̄)
R
Raise to Squares
Square each deviation: (xᵢ − x̄)² — negatives become positive
E
Evaluate Variance
Divide the sum of squared deviations by N (or n − 1 for samples)
A
Apply Square Root
Take √Variance to convert back to the original unit scale
D
Describe Variability
Report both σ² (or s²) and σ (or s) with their units and context

Computing in Excel, R, Python, and SPSS

Software Sample Standard Deviation Sample Variance
Excel / Google Sheets =STDEV(A1:A10) =VAR(A1:A10)
Excel — Population =STDEVP(A1:A10) =VARP(A1:A10)
Python (NumPy) np.std(data, ddof=1) np.var(data, ddof=1)
Python (population) np.std(data, ddof=0) np.var(data, ddof=0)
Python (pandas) df['col'].std() df['col'].var()
R sd(x) var(x)
SPSS Analyze → Descriptives → Std Dev Analyze → Descriptives → Variance
⚠️
NumPy default is population variance

np.std() and np.var() default to ddof=0 (population formulas). For sample statistics — which is almost always what you want in data science — pass ddof=1. pandas .std() and .var() default to ddof=1 (sample), consistent with R's sd() and var().

Common Misconceptions

MisconceptionWhat's WrongThe Correct Understanding
"Standard deviation is always smaller than variance" ✗ False ✓ When variance < 1, the standard deviation is actually larger than variance (e.g., variance = 0.25, SD = 0.5)
"You can add standard deviations the way you add variances" ✗ False ✓ Variances of independent variables add; standard deviations do not. You must square to get variance, add, then take the square root
"The mean ± 1 SD always contains 68% of data" ✗ Incomplete ✓ The 68–95–99.7 empirical rule only applies to normally distributed data. For non-normal data, use Chebyshev's theorem instead
"Sample variance uses n in the denominator" ✗ False ✓ Sample variance uses n − 1 (Bessel's correction) to correct for the downward bias that occurs when estimating population variance from a sample
"A larger standard deviation means the data is wrong" ✗ False ✓ High spread simply means the data is more variable. Whether that's a problem depends on context — it's normal for stock returns to be volatile and expected for temperatures across seasons
"Variance and standard deviation measure the same thing" ✗ Oversimplified ✓ They quantify the same spread but differ in units and mathematical properties. These differences determine which measure to use in each statistical procedure

Interactive Variance & Standard Deviation Calculator

Variance & Standard Deviation Calculator

Mean (x̄ or μ)
Variance
Standard Deviation
n (data points)
Step-by-Step Calculation

Extended Comparison Table

Standard Deviation vs Standard Error

Standard deviation and standard error are often confused. Standard deviation describes the spread of individual data points around the mean. Standard error (SE = s / √n) describes the precision of the sample mean as an estimate of the population mean — it gets smaller as sample size grows. Standard deviation does not depend on sample size.

MeasureWhat It DescribesFormula
Standard Deviation (SD)Spread of individual data pointss = √[Σ(xᵢ−x̄)²/(n−1)]
Standard Error (SE)Precision of the sample meanSE = s / √n
VarianceSpread of individual data points (squared units)s² = Σ(xᵢ−x̄)²/(n−1)
Coefficient of Variation (CV)Relative spread as a percentage of the meanCV = (s / x̄) × 100%
Interquartile Range (IQR)Middle 50% spread — resistant to outliersIQR = Q3 − Q1

Formula Cheat Sheet

FormulaNotationTypeKey Note
Population Varianceσ² = Σ(xᵢ−μ)²/NDescriptiveUse when you have all data (census)
Sample Variances² = Σ(xᵢ−x̄)²/(n−1)InferentialBessel's correction: divide by n−1
Population Standard Deviationσ = √σ²DescriptiveSame units as data
Sample Standard Deviations = √s²InferentialMost common in practice
Standard Error of MeanSE = s/√nInferentialShrinks as sample grows
Z-scorez = (x−μ)/σStandardizationHow many SDs from the mean
Coefficient of VariationCV = (σ/μ)×100%Relative measureCompares spread across different scales
Variance of sum (independent)Var(X+Y) = Var(X)+Var(Y)ProbabilityVariances add; SDs don't
n−1
Sample denominator (Bessel's correction)
SD²
How to get variance from SD
√Var
How to get SD from variance
≥ 0
Both measures are always non-negative

Frequently Asked Questions

Variance is the average of the squared deviations from the mean and is expressed in squared units, such as cm² or kg². Standard deviation is the square root of the variance, so it is reported in the same units as the original data. Both measure variability, but standard deviation is generally easier to interpret because it uses the original measurement scale.
Variance squares each deviation from the mean to eliminate negative values, but this also squares the units of measurement. Taking the square root returns the result to the original units, making the measure easier to interpret while preserving the information contained in the variance.
No. Variance is always zero or positive because it is calculated from squared deviations, and the square of any real number is never negative. A variance of zero occurs only when every observation has exactly the same value.
Sample variance uses n − 1 rather than n because of Bessel's correction. This adjustment compensates for the fact that the sample mean is used instead of the true population mean, making the sample variance an unbiased estimator of the population variance.
Neither measure is universally better. Standard deviation is preferred when interpreting variability because it is expressed in the original units of the data. Variance is often used in mathematical formulas and statistical theory because of its useful algebraic properties, such as the way variances combine for independent variables.
Yes. When the variance is between 0 and 1, its square root is larger than the variance itself. For example, if the variance is 0.25, the standard deviation is 0.50. When the variance equals 1, both values are equal. When the variance is greater than 1, the standard deviation is smaller than the variance.
The normal distribution is completely described by its mean and standard deviation. The standard deviation determines the spread of the bell-shaped curve: a larger standard deviation produces a wider distribution, while a smaller standard deviation produces a narrower one. In a normal distribution, approximately 68%, 95%, and 99.7% of observations fall within one, two, and three standard deviations of the mean, respectively.
Variance and standard deviation are widely used in machine learning for feature scaling, principal component analysis (PCA), model evaluation, and the bias-variance tradeoff. Standardization uses the standard deviation to place features on a common scale, while variance helps identify informative features and quantify prediction errors.

Sources & Further Reading

The concepts on this page draw from standard statistical theory. The following resources provide rigorous treatments for further study.

NIST Engineering Statistics Handbook — Measures of Scale — authoritative reference for variance and standard deviation in engineering contexts.
OpenStax Introductory Statistics: Measures of the Spread of the Data — free open-access textbook covering variance and standard deviation with examples.
Khan Academy — Standard Deviation Step-by-Step — accessible walkthrough of the full calculation procedure.
NumPy Documentation — numpy.std() — technical reference for standard deviation computation in Python, including the ddof parameter.