Median absolute deviation:
formula and worked example
A spread measure built from medians rather than means, so one wild value cannot drag it around.
Calcylator Editorial Team
Updated · 5 min read
What the median absolute deviation measures
Spread describes how widely values are scattered around a centre. The standard deviation is the best known measure, but it squares every gap, so a single extreme value can dominate it. The median absolute deviation, usually written MAD, takes a different route: it finds the typical distance of the data from the median, and does so using medians throughout.
That makes it a robust statistic, one that keeps working when the data contain errors or outliers. It is a common choice for flagging suspicious points in sensor readings, transaction amounts, delivery times and survey responses, where a few extreme values would otherwise distort the picture.
Its units are the same as the data, so a MAD of 2 on prices in rupees means a typical price lies about 2 rupees from the middle one.
The procedure and its inputs
First find the median of the data. Then take the absolute difference of every value from that median, and finally take the median of those differences.
- a:
- A
- b:
- B
- c:
- C
- d:
- D
- e:
- E
- A to E: the five observations, here 2, 4, 4, 8 and 12.
- Centre: the median of the five values, which is 4, built into the expression.
- Result: the middle value of the sorted absolute deviations, in the same units as the data.
With five values the middle position is the third one after sorting, which the expression picks with its index of 2 counted from zero.
Worked example: five values with a median of 4
Take the observations 2, 4, 4, 8 and 12.
A
2
B
4
C
4
D
8
E
12
Median absolute deviation
2 units
The values 2, 4, 4, 8 and 12 have a median of 4. Their distances from 4 are 2, 0, 0, 4 and 8, and the middle one is 2.
- Sort the data and find the median: 2, 4, 4, 8, 12, so the middle value is 4.
- Find the absolute deviations: |2−4| = 2, |4−4| = 0, |4−4| = 0, |8−4| = 4, |12−4| = 8.
- Sort the deviations: 0, 0, 2, 4, 8.
- Take the middle one: 2.
For comparison, the sample standard deviation of the same data is 4, double the MAD, because the 12 pulls it upward.
Reading MAD next to the median
A MAD of 2 around a median of 4 says half of the values lie within 2 of the middle. That is large relative to the centre, so the data are widely scattered. A MAD of 0.2 around the same median would describe a tight cluster.
Because it is relative to the data scale, compare MAD to the median or to another group's MAD, not to an absolute standard. Two batches of delivery times can be compared by which has the smaller MAD.
Some analysts multiply MAD by 1.4826 so that it estimates the standard deviation when the data follow a normal distribution. That adjusted value is the one commonly used for outlier screening, with the cut-off for flagging chosen by the analyst and varying between fields.
What a small change in one value does
MAD changes only when the middle deviation changes. Moving A from 2 to 2.2 puts it closer to the median of 4, shrinking its deviation from 2 to 1.8, and because that value is the middle of the sorted deviations, the MAD falls to 1.8.
| Scenario | A | Calculated result |
|---|---|---|
| Original assumptions | 2 | 2 units |
| A increased by 10% | 2.2 | 1.8 units |
In this example the median stays at 4 after the change, so the centre in the expression remains correct. If an edit shifts the median, the centre must be recomputed before the deviations are taken.
Common slips with MAD
- Confusing median absolute deviation with mean absolute deviation, which averages the deviations from the mean instead.
- Using the mean as the centre rather than the median, which gives a different number and loses the robustness.
- Forgetting to sort before picking the middle value, or picking the wrong position for an even number of values, where the answer is the average of the two middle ones.
- Comparing a raw MAD with a standard deviation directly without the 1.4826 scale factor.
A quick check on delivery times
Five parcels took 2, 4, 4, 8 and 12 days. A new parcel takes 30 days. Does the typical spread change?
- Add the new value: 2, 4, 4, 8, 12, 30. The median is (4 + 8) ÷ 2 = 6.
- Deviations from 6: 4, 2, 2, 2, 6, 24. Sorted: 2, 2, 2, 4, 6, 24.
- MAD is the average of the middle pair: (2 + 4) ÷ 2 = 3.
A late parcel of 30 days barely moves the MAD from 2 to 3, whereas the standard deviation would rise sharply.
Common questions
What is the median absolute deviation?
It is the median of the absolute differences between each data value and the median of the data. It measures spread in the same units as the data and is hardly affected by outliers, unlike the standard deviation.
How do you calculate MAD step by step?
Find the median of the data, subtract it from each value and take absolute values, then take the median of those results. For 2, 4, 4, 8, 12 the median is 4, the deviations are 2, 0, 0, 4, 8, and their median is 2.
Why use MAD instead of standard deviation?
Because squaring makes the standard deviation very sensitive to extreme values. MAD uses medians, so one wild value hardly changes it. It is preferred when data contain errors, skew or heavy tails.
Is MAD the same as mean absolute deviation?
No. Mean absolute deviation averages the distances from the mean, while MAD takes the median of the distances from the median. The names are similar, so check which one a source means before comparing figures.
What does the 1.4826 factor do?
It rescales MAD so that, for normally distributed data, it estimates the standard deviation. Multiplying by about 1.4826 makes the two measures comparable, and it is often used when screening for outliers.
Was this guide helpful?
Continue reading
View all blogsMargin of error for proportion: formula and worked example
Calculate a survey proportion's margin of error at 95% confidence, with a 50% result from 400 people, a sensitivity table and the sample-size trade-off.
4 min read
Correlation coefficient from covariance: formula and example
Turn a covariance into a correlation coefficient by dividing by both standard deviations. Includes a 15, 5, 6 example, a table and the limits r must respect.
4 min read
Covariance from correlation: formula and worked example
Recover a covariance from a correlation and two standard deviations, with a 0.6, 4, 3 example, a sensitivity table and a check against the valid range.
4 min read




