Median Absolute Deviation (MAD) Calculator

Calculate MAD, scaled MAD, mean absolute deviation, and MAD-based outlier detection. Compare robust vs classical spread measures with visual breakdown.

About the Median Absolute Deviation (MAD) Calculator

The median absolute deviation (MAD) calculator is the ultimate robust measure of statistical dispersion. MAD calculates the median of the absolute deviations from the data's median — making it resistant to up to 50% outliers, the highest breakdown point of any common spread estimator.

This tool computes the raw MAD, the scaled MAD (multiplied by 1.4826 to estimate standard deviation for normal data), the mean absolute deviation, and performs MAD-based outlier detection. A comparison chart shows how MAD, scaled MAD, standard deviation, and IQR relate for your specific data.

Enter your data, choose a center point and scaling option, and get a complete robust variability analysis with deviation tables and step-by-step calculations. Check the example with realistic values before reporting. Use the steps shown to verify rounding and units. Cross-check this output using a known reference case. Use the example pattern when troubleshooting unexpected results. Validate that outputs match your chosen standards.

Why Use This Median Absolute Deviation (MAD) Calculator?

MAD is the most robust measure of spread in common use, with a 50% breakdown point that standard deviation and range cannot match. This calculator provides MAD alongside scaled MAD, mean absolute deviation, and SD, with a visual comparison that instantly reveals how much outliers are inflating classical measures.

The deviation table and outlier detection give you actionable results — not just a number, but identification of which values are driving the spread in your data.

How to Use This Calculator

  1. Enter numbers separated by commas or spaces (minimum 2 values).
  2. Select whether deviations are measured from the median (standard MAD) or mean.
  3. Choose whether to scale MAD by 1.4826 for normal distribution comparison.
  4. Read the MAD from the main output — it measures typical deviation robustly.
  5. Compare MAD to standard deviation in the bar chart: large differences signal outliers.
  6. Check the deviation table to see which values are flagged as outliers.
  7. Review the robustness reference table to understand each measure's strengths.

Formula

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.

Example Calculation

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.

Tips & Best Practices

MAD in Robust Statistics

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).

MAD in Signal Processing

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.

Computational Considerations

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.

Frequently Asked Questions

What is the median absolute deviation?

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.

Why multiply MAD by 1.4826?

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.

What is a breakdown point?

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.

How is MAD different from mean absolute deviation?

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.

When should I use MAD instead of standard deviation?

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.

How does MAD-based outlier detection work?

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.

Related Pages