Calculate MAD, scaled MAD, mean absolute deviation, and MAD-based outlier detection. Compare robust vs classical spread measures with visual breakdown.
The median absolute deviation (MAD) is a robust measure of spread built from the median rather than the mean. It takes the median of the absolute distances from the dataset's median, which makes it much less sensitive to outliers than standard deviation.
This calculator reports the raw MAD, the scaled MAD used as a standard-deviation analogue under normality, the mean absolute deviation, and a MAD-based outlier view. The comparison section helps show how strongly a few extreme points may be stretching the classical spread measures relative to the robust ones.
It is especially useful when you suspect a dataset contains outliers, skew, or contamination that would make mean-based spread summaries misleading.
MAD is valuable when you want to know how variable the main body of the data is without letting a few extreme observations dominate the answer. That is why it appears so often in robust statistics, anomaly detection, and pre-analysis data screening.
Putting MAD beside scaled MAD, mean absolute deviation, and standard deviation makes it easier to see whether the dataset is broadly noisy or whether a handful of points are doing most of the damage.
MAD = median(|xᵢ − median(x)|). Scaled MAD = 1.4826 × MAD (≈ σ for normal data). Mean Absolute Deviation = Σ|xᵢ − center| / n. Outlier threshold: |xᵢ − median| > 3 × scaled MAD.
Result: MAD = 2, Scaled MAD = 2.9652
Median = 25. Absolute deviations: |22−25|=3, |25−25|=0, |27−25|=2, ... Sorted |deviations|: 0,1,1,2,2,3,3,65. MAD = median = 2. Scaled MAD = 2 × 1.4826 = 2.9652. The value 90 has |90−25|/2.97 = 21.9 MADs from center — a clear outlier.
Peter Huber popularized MAD as a robust scale estimator in the 1960s and 70s. It forms the foundation of many robust statistical methods: M-estimators use MAD for initial scale estimates, robust regression uses MAD to identify influential outliers, and anomaly detection systems use MAD-based thresholds because they resist "masking" (where a cluster of outliers makes classical methods fail to flag any of them).
In signal processing, MAD is used to estimate the noise level in a signal. The "universal threshold" for wavelet denoising is λ = MAD × √(2 ln n) / 0.6745, where MAD is computed from the finest-scale wavelet coefficients. This approach is robust because signal components don't corrupt the noise estimate.
MAD requires sorting (O(n log n)) or can use a selection algorithm (O(n)). For streaming data, approximate MAD can be maintained with P² quantile estimators or binned approaches. In distributed systems, MAD is harder to compute than mean/SD because median is not decomposable — but approximate distributed MAD algorithms exist.
Last updated:
MAD is calculated in two steps: (1) find the median of your data, (2) compute the absolute deviation of each value from the median, then find the median of those deviations. It measures "typical" distance from the center using the most robust possible approach — both the center (median) and the spread (median of deviations) resist outliers.
The factor 1.4826 (= 1/Φ⁻¹(3/4) where Φ is the normal CDF) makes the scaled MAD a consistent estimator of the standard deviation when data is normally distributed. Without scaling, MAD is about 67.45% of the SD for normal data. The scaling lets you directly compare MAD to SD.
The breakdown point is the fraction of data that can be arbitrary (outliers) before a statistic becomes unreliable. MAD has a 50% breakdown point — the highest possible. Standard deviation has a 0% breakdown point — even a single extreme outlier can make it arbitrarily large. IQR has a 25% breakdown point.
MAD uses the median of absolute deviations (from the median), while mean absolute deviation uses the mean of absolute deviations (from the mean or median). MAD is much more robust because it uses the median twice. Mean absolute deviation is affected by every data point and has no outlier resistance.
Use MAD when (1) data may contain outliers, (2) the distribution is skewed, (3) you need a robust preprocessing step before formal analysis, or (4) you're comparing groups where some may have contaminated data. MAD is especially common in signal processing, anomaly detection, and robust regression.
Compute the modified z-score: zᵢ = |xᵢ − median| / (1.4826 × MAD). Values with |zᵢ| > 3 are typically flagged as outliers. This is more reliable than classical z-scores (using mean and SD) because both the center and scale estimates are robust to the very outliers you're trying to detect.