Dispersion Calculator

Paste a dataset to compute every common measure of spread — range, variance, standard deviation, mean absolute deviation, IQR, and coefficient of variation — with the formulas shown.

Quick Facts

Method
Exact statistical formulas for spread
Range = max − min; variance = mean of squared deviations (÷n for population, ÷n−1 for sample); standard deviation = √variance.

Your Results

Calculated
Sample standard deviation (s)
-
√ of sample variance (÷ n−1)
Population standard deviation (σ)
-
√ of population variance (÷ n)
Sample variance (s²)
-
Σ(xᵢ − x̄)² ÷ (n−1)
Population variance (σ²)
-
Σ(xᵢ − μ)² ÷ n
Range
-
max − min
Interquartile range (IQR)
-
Q3 − Q1
Mean absolute deviation
-
mean of |xᵢ − x̄|
Coefficient of variation
-
s ÷ mean × 100%

Ready

Paste your numbers and press Calculate.

What "dispersion" means

Two datasets can share the same average and still be completely different. The sets {50, 50, 50} and {0, 50, 100} both have a mean of 50, but the first is perfectly consistent while the second swings from one extreme to the other. Measures of dispersion (also called spread or variability) quantify that difference: they tell you how far the individual values tend to sit from the center. A mean without a measure of dispersion is only half the story.

The measures this calculator computes

Given a data set x₁, x₂, …, xₙ with mean x̄, this tool reports every standard measure of spread:

  • Range = max − min. The simplest measure — the distance between the largest and smallest value. Fast to read, but driven entirely by the two most extreme points.
  • Variance. The average of the squared deviations from the mean. Population variance σ² = Σ(xᵢ − μ)² ÷ n. Sample variance s² = Σ(xᵢ − x̄)² ÷ (n − 1). Squaring keeps positive and negative deviations from cancelling and puts extra weight on far-out points.
  • Standard deviation = √variance. Because variance is in squared units, the square root brings the measure back into the original units of the data, which is why the standard deviation is the most-quoted measure of spread. Population σ = √σ²; sample s = √s².
  • Interquartile range (IQR) = Q3 − Q1. The range of the middle 50% of the data. It ignores the top and bottom quarters, so it is resistant to outliers.
  • Mean absolute deviation (MAD) = (1/n) Σ|xᵢ − x̄|. The average distance from the mean using absolute values instead of squares. Less sensitive to extreme values than the standard deviation.
  • Coefficient of variation (CV) = s ÷ x̄ × 100%. A unitless, relative measure that expresses the standard deviation as a percentage of the mean, letting you compare the spread of datasets with different units or scales.

Sample vs. population: why n − 1?

When your data is the entire group you care about, divide by n. When your data is a sample drawn from a larger population, divide by n − 1. This is Bessel's correction. Estimating deviations from the sample mean (rather than the true, unknown population mean) systematically underestimates the spread; dividing by n − 1 instead of n corrects that bias so the sample variance is an unbiased estimator of the population variance. The correction matters most for small samples — for a sample of 5 it inflates the variance by 25% — and becomes negligible as n grows large.

A worked example

Take the data set 4, 8, 15, 16, 23, 42 (n = 6). The sum is 108, so the mean is 18. The squared deviations from 18 are 196, 100, 9, 4, 25, and 576, which sum to 910. Population variance = 910 ÷ 6 ≈ 151.67, so σ ≈ 12.32. Sample variance = 910 ÷ 5 = 182, so s ≈ 13.49. The range is 42 − 4 = 38, and the coefficient of variation is 13.49 ÷ 18 × 100% ≈ 74.9%.

Which measure should you report?

For roughly symmetric data without extreme outliers, the standard deviation is the standard choice: it shares the data's units and feeds directly into z-scores, confidence intervals, and the empirical (68–95–99.7) rule. For skewed data or data with outliers, prefer the IQR, which describes the bulk of the distribution without being dragged around by a single extreme value. Use the coefficient of variation when comparing variability across datasets measured on different scales — for example, comparing the consistency of a process that outputs values near 5 with one that outputs values near 5,000.

Frequently Asked Questions

What is the difference between sample and population standard deviation?
Population standard deviation (σ) divides the sum of squared deviations by n and is used when your data is the complete population. Sample standard deviation (s) divides by n − 1 (Bessel's correction) and is used when your data is a sample of a larger group. Because of the smaller divisor, s is always slightly larger than σ for the same data. This calculator reports both so you can pick the one that matches your situation.
Why does the calculator square the deviations for variance instead of just averaging them?
If you simply averaged the raw deviations (xᵢ − x̄), the positives and negatives would always cancel to exactly zero, which is why that quantity is never used. Squaring makes every deviation positive and gives disproportionately more weight to values far from the mean. Taking the square root at the end (the standard deviation) restores the original units. If you want a spread measure that treats all deviations equally, use the mean absolute deviation, which averages |xᵢ − x̄| instead.
How are the quartiles and IQR calculated here?
The values are sorted, and Q1 and Q3 are found by linear interpolation between the ranked data points (the R-7 method, the same one Excel's PERCENTILE.INC and QUARTILE.INC use). Q1 sits at position 0.25·(n − 1) and Q3 at position 0.75·(n − 1), counting from zero. The IQR is Q3 − Q1. Other textbooks use slightly different quartile conventions (such as Tukey's hinges), so a quartile from another tool may differ by a fraction on small datasets.
Which measure of dispersion is least affected by outliers?
The interquartile range is the most robust, because it discards the top and bottom 25% of the data entirely. The mean absolute deviation is more robust than the standard deviation (which squares deviations and so amplifies extremes), but still uses every point. The range is the least robust — a single unusually large or small value changes it directly.