Median Absolute Deviation Calculator

Median Absolute Deviation Calculator

Emerging AI Skill PRO

Enter Calculation

Formula

MAD=median(|xi−median(x)|)\text{MAD} = \operatorname{median}\left(\left|\, {x_i} - \operatorname{median}(x) \,\right|\right)
Usage stats

Advertisement

Results

Median Absolute Deviation (MAD)
2
median of absolute deviations
Data count (n) 5
Median 6
Scaled MAD (× 1.4826) 2.9652

Report an error on this page

What Is the Median Absolute Deviation?

The Median Absolute Deviation (MAD) is a robust measure of statistical dispersion. Unlike the standard deviation, which is heavily influenced by outliers, the MAD is based on medians and therefore resists the effect of extreme values. It tells you the typical distance between each data point and the center of your data.

How to Use This Calculator

Enter your numbers separated by commas or spaces (for example 2, 4, 6, 8, 10) and the calculator returns the MAD along with the data count, the median, and the scaled MAD. The result updates instantly so you can compare data sets quickly.

The Formula Explained

First, find the median of your data set. Then compute the absolute deviation of each value from that median, \(\left|\, x_i - \operatorname{median}(x) \,\right|\). Finally, take the median of those absolute deviations:

$$\text{MAD} = \operatorname{median}\left(\left|\, x_i - \operatorname{median}(x) \,\right|\right)$$

The scaled MAD multiplies the result by the constant \(1.4826\), which makes it a consistent estimator of the standard deviation when the data follow a normal distribution.

Advertisement
Number line showing data points and their absolute distances to the median
Each data point's absolute distance from the median; the MAD is the median of these distances.

Worked Example

Take the data set 1, 2, 3, 4, 5. The median is 3. The absolute deviations are \(|1-3|=2\), \(|2-3|=1\), \(|3-3|=0\), \(|4-3|=1\), \(|5-3|=2\), giving 2, 1, 0, 1, 2. Sorted: 0, 1, 1, 2, 2. The median of these deviations is 1, so the MAD = 1. The scaled MAD is $$1 \times 1.4826 = 1.4826.$$

Two-step diagram: find the median, then take the median of absolute deviations
Computing MAD in two steps: find the median, then find the median of the absolute deviations.

MAD vs. Standard Deviation: Effect of an Outlier

The median absolute deviation is a robust measure of spread. A single extreme value barely changes it, while the mean and standard deviation can change dramatically. The table compares two data sets that differ only in their last value (5 replaced by 100).

Statistic Data set A: 1, 2, 3, 4, 5 Data set B: 1, 2, 3, 4, 100
Median 3 3
Absolute deviations from the median 2, 1, 0, 1, 2 2, 1, 0, 1, 97
MAD (median of deviations) 1 1
Scaled MAD (MAD × 1.4826) 1.4826 1.4826
Mean 3 22
Sample standard deviation ≈ 1.58 ≈ 43.6

Calculation details: for set A the sample variance is \(\frac{4+1+0+1+4}{5-1} = 2.5\), so the SD is \(\sqrt{2.5} \approx 1.58\). For set B the mean is \(\frac{110}{5} = 22\), the squared deviations are 441, 400, 361, 324 and 6084 (sum 7610), so the variance is \(\frac{7610}{4} = 1902.5\) and the SD is \(\sqrt{1902.5} \approx 43.6\).

The outlier moved the mean from 3 to 22 and inflated the SD by a factor of about 28, yet the median stayed at 3 and the MAD stayed at 1.

Even-count example

Take the data set 2, 4, 6, 8, 10, 12. The median is the mean of the two middle values: \(\frac{6+8}{2} = 7\). The absolute deviations are 5, 3, 1, 1, 3, 5; sorted, they are 1, 1, 3, 3, 5, 5. The median of those is \(\frac{3+3}{2} = \) 3. The scaled MAD is \(3 \times 1.4826 = 4.4478\). For comparison, the mean is 7 and the sample SD is \(\sqrt{70/5} = \sqrt{14} \approx 3.74\).

Advertisement

Interpreting Your MAD Result

  • Size of the MAD: a small MAD means most values lie close to the median; a large MAD means the data are widely spread. The MAD is in the same units as your data (for example, dollars or centimetres), so compare it with the median to judge the relative spread.
  • Scaled MAD: multiplying the MAD by 1.4826 gives a robust estimate of the standard deviation, but only when the data are roughly normally distributed. For skewed or heavy-tailed data, the scaled MAD and the standard deviation can differ substantially.
  • Outlier rule (scaled MAD): a common rule flags a point \(x\) when \(\frac{|x - \text{median}|}{1.4826 \times \text{MAD}}\) exceeds about 3.
  • Outlier rule (modified z-score): Iglewicz and Hoaglin suggest \(M = \frac{0.6745\,(x - \text{median})}{\text{MAD}}\) and flagging points with \(|M| > 3.5\). In data set B (1, 2, 3, 4, 100), the value 100 gives \(M = \frac{0.6745 \times 97}{1} \approx 65.4\), which is far beyond 3.5. In set A, the value 5 gives \(M = 0.6745 \times 2 = 1.349\), so it is not flagged.
  • A MAD of 0: this can occur when more than half of the values are identical. For example, in 5, 5, 5, 5, 9 the median is 5 and the absolute deviations are 0, 0, 0, 0, 4, so the MAD is 0. In that case the outlier rules above cannot be used (division by zero), and you should look at the data directly.
  • Even-sized sets: the median of an even number of values is the mean of the two middle values. This applies both to the median of the data and to the median of the absolute deviations.

The 3 and 3.5 thresholds are rules of thumb, not strict tests. Treat flagged points as candidates to investigate, not as values to delete automatically.

FAQ

Why use MAD instead of standard deviation? MAD is robust to outliers, making it a better measure of spread for skewed data or data with extreme values.

What does the scaled MAD mean? Multiplying by \(1.4826\) converts the MAD into an estimate of the standard deviation for normally distributed data, allowing direct comparison.

Does the order of my numbers matter? No. The calculator sorts internally, so you can enter values in any order.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators