Understanding Variance and Standard Deviation

    By Oge Nwaozuzu6 min readUpdated: March 8, 2026

    Introduction

    Imagine two factories producing bolts. Both factories produce bolts with a mean diameter of 10.0 mm. But Factory A's bolts range from 9.98 to 10.02 mm, while Factory B's range from 9.5 to 10.5 mm. The means are identical, but Factory B has far more variability. Variance and standard deviation quantify exactly how much individual values typically deviate from the mean.

    What Is Variance?

    Variance measures the average squared distance of each data point from the mean. Squaring ensures that deviations above and below the mean do not cancel out.

    Population variance: σ² = Σ(xᵢ − μ)² / N

    Sample variance: s² = Σ(xᵢ − x̄)² / (n − 1)

    The sample formula divides by (n − 1) instead of n to correct for the bias introduced by estimating the population mean from the sample. This correction is called Bessel's correction.

    What Is Standard Deviation?

    The standard deviation is the square root of the variance:

    SD = √Variance

    Because variance is in squared units (e.g., mm²), the standard deviation converts it back to the original units (mm), making it directly interpretable. A standard deviation of 0.5 mm means values typically differ from the mean by about 0.5 mm.

    Step-by-Step Calculation

    Dataset: 4, 8, 6, 5, 7 (sample of 5 values).

    1. Find the mean: (4 + 8 + 6 + 5 + 7) / 5 = 30 / 5 = 6.
    2. Subtract the mean from each value: −2, 2, 0, −1, 1.
    3. Square each difference: 4, 4, 0, 1, 1.
    4. Sum the squares: 4 + 4 + 0 + 1 + 1 = 10.
    5. Divide by (n − 1): 10 / 4 = 2.5 (sample variance).
    6. Take the square root: √2.5 ≈ 1.58 (sample standard deviation).

    The values in this dataset typically differ from the mean (6) by about 1.58 units.

    Check the mean, variance, and spread with the sample and population standard deviation calculator.

    Population vs. Sample

    Use population formulas (÷ N) when the data represents the entire population. Use sample formulas (÷ n−1) when the data is a sample — which is almost always the case in practice. See Sample vs. Population for more details.

    Interpreting Standard Deviation

    • Small SD: Values cluster tightly around the mean. Low variability.
    • Large SD: Values are spread far from the mean. High variability.
    • SD = 0: All values are identical.

    For normally distributed data, the 68-95-99.7 rule applies: approximately 68% of values fall within 1 SD of the mean, 95% within 2 SDs, and 99.7% within 3 SDs.

    Standard Deviation vs. IQR

    FeatureStandard DeviationIQR
    Uses all data✓ Every value contributes✗ Only Q1 and Q3
    Outlier resistant✗ Strongly affected✓ Resistant
    Best forSymmetric, normal dataSkewed data, outlier-prone data
    Paired withMeanMedian
    Inferential useCentral to most testsUsed in non-parametric methods

    For a comprehensive comparison, see Five Number Summary vs. Mean & Standard Deviation.

    Decision Rule

    If the data is approximately symmetric with no major outliers, report the mean and standard deviation. If the data is skewed or contains outliers, report the median and IQR (from the five number summary). When in doubt, report both.

    Common Mistakes

    • Confusing variance and standard deviation: Variance is in squared units; SD is in original units. Report the SD for interpretability.
    • Using population formula for samples: Dividing by n instead of (n − 1) underestimates the true variability.
    • Ignoring skewness: Reporting SD for heavily skewed data gives a misleading picture of spread.
    • Comparing SDs across different scales: An SD of 5 means different things for test scores (0–100) vs. body temperature (36–38°C). Use the coefficient of variation (SD ÷ Mean × 100%) for comparisons across different scales.

    Explore Spread

    The Five Number Summary Calculator computes the IQR alongside Q1, median, and Q3 — the robust alternative to standard deviation. Enter any dataset to compare the IQR with the overall range and assess whether the mean or median better represents the data.

    Verify Your Calculations

    Use the free five number summary calculator to check your work.

    Open Calculator

    Written by Oge Nwaozuzu

    Statistics educator and data analyst. Creator of 5numbersummarycalculator.app.