Median Absolute Deviation Calculator

Robust spread of a data set: the median absolute deviation (MAD), scaled MAD (≈ σ), IQR and mean absolute deviation, with modified z-score outliers.

2 to 10000 values. Use a point for decimals (1.5), no thousands separators, and separate numbers with spaces or a comma and a space.

Results

Median absolute deviation (MAD)
0.35
Scaled MAD (MAD × 1.4826, estimates σ)
0.518911
Median
2.8
Interquartile range (Q3 − Q1)
0.7
Q1, Q3 (median of each half)
2.4, 3.1
IQR ÷ 1.349 (another robust estimate of σ)
0.518911
Mean absolute deviation (around the mean)
1.274
Standard deviation (sample), for comparison
2.2677
Mean
3.43
Possible outliers (|modified z| > 3.5)
9.8 (M = 13.49)
Count
10

How it’s calculated

The median absolute deviation (MAD) measures spread in a way that a few extreme values cannot distort. Find the median, take each value’s distance from it, and the MAD is the median of those distances. Because it is built from medians, up to half the data can be wild without breaking it, unlike the standard deviation, which one outlier can inflate badly.

MAD = median( |xᵢ − median(x)| ) scaled MAD = MAD / 0.6745 ≈ 1.4826 × MAD (estimates σ for normal data) IQR = Q3 − Q1 (IQR / 1.349 also estimates σ for normal data) mean absolute deviation = Σ |xᵢ − mean| / n modified z-score Mᵢ = 0.6745 (xᵢ − median) / MAD; |Mᵢ| > 3.5 → possible outlier

The constant 0.6745 is the 75th percentile of the standard normal distribution, so for normal data the scaled MAD is close to the standard deviation. The modified z-score rule is the Iglewicz and Hoaglin rule described in the NIST e-Handbook. Quartiles use the median-of-halves method, as in the quartile calculator.

Example: 2.1, 2.4, 2.4, 2.6, 2.7, 2.9, 3.0, 3.1, 3.3, 9.8 (one reading is far too high). The median is (2.7 + 2.9)/2 = 2.8. The distances are 0.7, 0.4, 0.4, 0.2, 0.1, 0.1, 0.2, 0.3, 0.5, 7.0, whose median is (0.3 + 0.4)/2 = 0.35, so the scaled MAD is 0.519. The standard deviation is 2.27, inflated by the one bad value, while the scaled MAD stays close to the spread of the other nine. The value 9.8 has modified z = 0.6745 × 7.0 ÷ 0.35 = 13.49, so it is flagged. These are the default values.

Frequently asked questions

What is the difference between median absolute deviation and mean absolute deviation?

Both average the distances from a centre, but the median absolute deviation uses the median twice (centre and average), so it ignores outliers. The mean absolute deviation uses the mean and is more affected by extreme values. Both are shown.

Why multiply the MAD by 1.4826?

For normally distributed data the raw MAD is about 0.6745 standard deviations. Dividing by 0.6745 (multiplying by 1.4826) puts it on the same scale as the standard deviation, so the two can be compared.

Why is my MAD zero?

If at least half the values are identical, the median distance is 0. The MAD then says nothing about the spread of the rest; use the IQR or standard deviation instead.

Is a value with modified z above 3.5 definitely an error?

No. It is only flagged for a closer look. Check how it was measured before removing anything, and report what you did.

Embed this calculator

Add this free calculator to your own website. Copy the code below into your page’s HTML:

Need this calculator branded, changed or built around your own prices?See custom business solutions →

Sources

Formulas are taken from the free public references above. Results are provided “as is” for informational and educational purposes only. See our disclaimer.

Added · Last updated · How we check our calculators

Spotted a mistake or missing option? Report a problem· Suggest a calculator