What is a Median Absolute Deviation Calculator?
A median absolute deviation calculator finds MAD = median(|x − median|): the typical distance of values from the median, using medians at both steps so outliers barely affect it. Multiplying by 1.4826 gives the scaled MAD, a robust estimate of the standard deviation, and dividing each value’s distance from the median by the scaled MAD gives a robust z-score for spotting outliers.
What the Median Absolute Deviation Calculator does
Enter a dataset and the calculator returns the raw MAD, the scaled MAD (×1.4826) and a robust z-score for every value, highlighting any beyond the cut-off you choose (±3.5 by default). It also shows the ordinary standard deviation, so you can see how much a few extreme values are inflating it, and the MAD fences, median ± cut-off × scaled MAD.
The median absolute deviation (sometimes called the median average deviation or absolute median deviation) is one of the most outlier-resistant measures of spread: up to half of the data can be wildly wrong before it breaks down. That makes it the standard choice for cleaning data, screening sensor readings and building robust z-scores when you cannot trust the mean and SD. If you want the average distance from the mean instead, use the mean absolute deviation calculator.
How to use the Median Absolute Deviation Calculator
- Type or paste your numbers into Data values, or pick one of the example data sets.
- Choose an outlier cut-off. Keep 3.5 for the classic modified z-score rule, or pick 2.5 or 3 for stricter screening.
- Read the MAD and the scaled MAD at the top of the results.
- Check the deviation table: highlighted rows have a robust z-score beyond the cut-off and are likely outliers. When values are flagged, the results also list the cleaned data with its mean and SD, ready to copy.
- Follow the step-by-step solution to see the median, the sorted absolute deviations, the scaling and the fences.
How to calculate the median absolute deviation by hand
Calculating the median absolute deviation takes four steps. Each one uses only sorting and medians, so you can do it with pencil and paper for small data sets:
- Find the median M of the data: sort the values and take the middle one (or the average of the two middle values when n is even).
- Subtract the median from every value and drop the sign, giving the absolute deviations |xᵢ − M|.
- Sort the absolute deviations and take their median. That number is the MAD.
- Optionally multiply by 1.4826 to get the scaled MAD, which estimates the standard deviation when the core of the data is normal.
Median absolute deviation formula
| Symbol | Meaning |
|---|---|
| xᵢ | each data value |
| M | median of the data |
| 1.4826 | 1 / Φ⁻¹(0.75), the scale factor for normal data |
| k | outlier cut-off for |zᵢ|, 3.5 by default |
Where does 1.4826 come from? For a normal distribution, half of the values lie within 0.6745σ of the median, so the population MAD equals 0.6745σ. Dividing by 0.6745 (multiplying by 1.4826) turns the MAD into an estimate of σ.
Do not confuse this with the mean absolute deviation from the median, Σ|xᵢ − M| / n. That formula averages the distances instead of taking their median, so a single extreme value still pulls it up. The calculator reports it too, as “Mean absolute deviation around the median”.
Worked example
Worked example: a sensor with one bad reading
Problem. A temperature sensor logs 12, 15, 14, 18, 13, 16, 15, 41, 17, 14 °C. The 41 looks suspicious. Find the MAD, the scaled MAD, and check the 41 with a robust z-score.
- 01Sorted: 12, 13, 14, 14, 15, 15, 16, 17, 18, 41, so the median is (15 + 15) / 2 = 15.
- 02Absolute deviations: 3, 0, 1, 3, 2, 1, 0, 26, 2, 1.
- 03Sorted: 0, 0, 1, 1, 1, 2, 2, 3, 3, 26. The median is (1 + 2) / 2, so MAD = 1.5.
- 04Scaled MAD = 1.4826 × 1.5 = 2.2239 °C.
- 05Robust z for 41: (41 − 15) / 2.2239 = 11.69, far beyond 3.5. The fences are 15 ± 3.5 × 2.2239 = 7.22 to 22.78 °C.
Answer. The MAD is 1.5 °C and the robust SD estimate is 2.2239 °C. The reading of 41 °C is a clear outlier. By contrast, the ordinary sample SD is 8.4492 °C, almost four times larger, because that single value dominates it.
Why the MAD resists outliers
A statistic’s breakdown point is the share of the data that can be replaced by arbitrary values before the statistic becomes meaningless. The standard deviation has a breakdown point of 0%: one huge value can make it as large as you like. The IQR tolerates 25% bad data. The MAD tolerates 50%, the highest possible.
The price is efficiency: when the data really are normal with no outliers, the scaled MAD varies more from sample to sample than the SD (it is about 37% as efficient). Many analysts therefore use the MAD to detect outliers and then report the usual SD of the cleaned data. When you compare several groups, reporting their medians and median absolute deviations side by side gives a summary that one stray value cannot distort.
| Measure of spread | Breakdown point | Scale factor to estimate σ (normal data) |
|---|---|---|
| Standard deviation | 0% | 1 |
| Mean absolute deviation | 0% | × 1.2533 |
| Interquartile range | 25% | ÷ 1.349 |
| Median absolute deviation | 50% | × 1.4826 |
Which outlier cut-off should you use?
There is no single correct threshold for the robust z-score. The choice trades missed outliers against false alarms, so pick it before you look at the data and report it alongside your results.
| Cut-off |z| | Source or label | Share of normal data flagged |
|---|---|---|
| 3.5 | Iglewicz and Hoaglin (1993), modified z-score | about 0.05% |
| 3 | Leys et al. (2013): very conservative | about 0.27% |
| 2.5 | Leys et al. (2013): moderately conservative, their recommended default | about 1.2% |
| 2 | Leys et al. (2013): poorly conservative | about 4.6% |
Median absolute deviation in Excel, R and Python
Software packages disagree on whether “MAD” means the raw or the scaled value, so check before comparing results with this calculator:
- Excel and Google Sheets: =MEDIAN(ABS(A1:A10-MEDIAN(A1:A10))) returns the raw MAD. Google Sheets needs it wrapped in ARRAYFORMULA.
- R: mad(x) returns the scaled MAD (constant = 1.4826); mad(x, constant = 1) returns the raw MAD.
- Python (SciPy): scipy.stats.median_abs_deviation(x) returns the raw MAD; add scale="normal" for the scaled one.
- Python (statsmodels): statsmodels.robust.mad(x) returns the scaled MAD by default.
- pandas: the old Series.mad() computed the mean absolute deviation, not the median one, and was removed in pandas 2.0.
References
The scale factor, cut-offs and breakdown figures on this page come from these sources:
- Iglewicz, B. and Hoaglin, D. C. (1993). How to Detect and Handle Outliers. ASQC Quality Press. Source of the modified z-score and the 3.5 cut-off.
- Leys, C., Ley, C., Klein, O., Bernard, P. and Licata, L. (2013). Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median. Journal of Experimental Social Psychology, 49(4), 764–766. Source of the 3, 2.5 and 2 cut-offs.
- Rousseeuw, P. J. and Croux, C. (1993). Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424), 1273–1283. Source of the 50% breakdown point and 37% efficiency.
- NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.17, Detection of Outliers.
Common use cases
- Outlier screening: flag values whose robust z-score exceeds about 3.5 before running an analysis.
- Sensor and log data: estimate typical noise levels when occasional glitches produce extreme readings.
- Robust standardization: replace (x − mean) / SD with (x − median) / scaled MAD so that a few extreme values do not distort everyone else’s scores.
- Skewed or heavy-tailed data: describe spread for incomes, response times or prices alongside the median.
- Reaction-time and survey data: psychology researchers often drop responses beyond median ± 2.5 × scaled MAD, as recommended by Leys et al. (2013).
Assumptions and limitations
- If more than half of the values are identical, the MAD is 0 and robust z-scores are undefined. This happens with heavily rounded or discrete data.
- The 1.4826 factor assumes the core of the data is normal. For skewed data the scaled MAD is still a useful spread measure, but it is not an estimate of a normal σ.
- The MAD treats deviations above and below the median symmetrically, so for strongly skewed data it can misstate spread on one side. Tukey fences based on Q1 and Q3 handle asymmetry better.
- With very small samples (fewer than about 10 values), the MAD jumps around a lot from sample to sample; treat outlier flags as prompts to check the data, not as proof.
- Not to be confused with the mean absolute deviation, Σ|x − x̄| / n, which shares the abbreviation MAD.
Frequently asked questions
How do you calculate the median absolute deviation?
What is the formula for median deviation?
What is the difference between the MAD and the scaled MAD?
Why multiply the MAD by 1.4826?
How do I use the MAD to detect outliers?
Is the median absolute deviation the same as the mean absolute deviation?
How do I calculate the MAD in Excel?
Cite this page
Statculator. (2026, November 14). Median Absolute Deviation Calculator. Retrieved November 14, 2026, from https://statculator.com/descriptive-statistics/median-absolute-deviation-calculator/