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.
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
- NIST/SEMATECH e-Handbook, 1.3.5.6 Measures of Scale (median absolute deviation, IQR) — NIST
- NIST/SEMATECH e-Handbook, 1.3.5.17 Detection of Outliers (modified z-scores, 0.6745 and MAD) — NIST
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