MAD Calculator — Mean & Median Absolute Deviation
Paste any dataset and get both definitions of MAD — the mean-based average absolute deviation and the robust median-based MAD (plus scaled MAD ×1.4826) — with per-point deviation tables and an outlier-robustness demo.
Calculate MAD
Deviation table (per data point)
| # | x | |x − mean| | |x − median| |
|---|
Robustness demo: outlier vs MAD and SD
The same data with one outlier added. The sample standard deviation explodes, while the median-based MAD barely moves — that is why MAD is the robust spread measure.
| Measure | [1, 2, 3, 4, 5] | [1, 2, 3, 4, 5, 50] | Change |
|---|
Sample SD jumps from 1.5811 to 19.2397 (about 12×), while median MAD only moves from 1 to 1.5. Squaring the outlier's deviation is what makes the SD fragile; the median ignores it.
Worked example: 1, 2, 3, 4, 5 (both definitions)
Definition 1 — mean absolute deviation: MAD = Σ|x − x̄| / n
- Mean: (1 + 2 + 3 + 4 + 5) / 5 = 3
- Absolute deviations from the mean: 2, 1, 0, 1, 2
- Sum = 6, divide by n = 5 → MAD (mean) = 1.2
Definition 2 — median absolute deviation: MAD = median(|x − x̃|)
- Median of the data: 3
- Absolute deviations from the median, sorted: 0, 1, 1, 2, 2
- Middle value → MAD (median) = 1
- Scaled MAD = 1 × 1.4826 = 1.4826 (consistent σ estimator for normal data)
For comparison on the same data: population SD = 1.4142, sample SD = 1.5811.
How to read your MAD
- 0 means no spread at all — every value is identical (e.g. 5, 5, 5, 5, 5 gives MAD = 0).
- MAD is in the same units as your data — a MAD of 1.2 on test scores means the typical score is about 1.2 points from the mean.
- Compare scaled MAD with the sample SD: if scaled MAD is much smaller than the SD, outliers or heavy tails are inflating the SD — trust the MAD.
- Use the median MAD when your data is skewed or may contain outliers; use the mean MAD when you want the average absolute error around the mean.
Scope boundaries
- Average and Standard Deviation Calculator — computes mean and standard deviation only; it has no absolute-deviation measures. Use this page when you need MAD (mean-based or median-based) or a robust, outlier-resistant spread.
- Mean Median Mode Calculator — measures of center only. This page measures spread (dispersion), which is the complementary question: how far values typically fall from that center.
Frequently asked questions
What is the mean absolute deviation (MAD)?
The mean absolute deviation is the average of the absolute distances of each data point from the mean: MAD = Σ|x − x̄| / n. For the classic example 1, 2, 3, 4, 5, the mean is 3, the absolute deviations are 2, 1, 0, 1, 2, their sum is 6, and 6 / 5 = 1.2, so the mean absolute deviation is 1.2.
What is the median absolute deviation?
The median absolute deviation is the median of the absolute deviations from the median: MAD = median(|x − x̃|). For 1, 2, 3, 4, 5, the median is 3, the absolute deviations sorted are 0, 1, 1, 2, 2, and the middle value is 1, so the median absolute deviation is 1. It is the robust version of MAD because the median is not dragged by outliers.
What is the scaled MAD and the 1.4826 constant?
The scaled MAD multiplies the median absolute deviation by 1.4826, which equals 1/Φ⁻¹(0.75) ≈ 1.4826022185. This scaling makes the MAD a consistent estimator of the standard deviation σ when the data is normally distributed. For 1, 2, 3, 4, 5 the median MAD is 1, so the scaled MAD is 1 × 1.4826 = 1.4826.
How is MAD different from standard deviation?
The standard deviation squares each deviation before averaging, so a single outlier dominates it; MAD uses absolute values or the median, so it resists outliers. Demo: for 1, 2, 3, 4, 5, 50 the sample standard deviation is 19.2397 while the median MAD is only 1.5 (scaled MAD 2.2239). Without the outlier (1, 2, 3, 4, 5), the sample SD is 1.5811 and the median MAD is 1 — the outlier multiplied the SD by about 12 but barely moved the MAD.
When should I use MAD instead of standard deviation?
Use MAD when your data may contain outliers, is skewed, or comes from heavy-tailed distributions — for example income data, sensor readings with glitches, or reaction times. The median-based (scaled) MAD is the safest default robust spread. Use the standard deviation when your data is clean and approximately normal and you need compatibility with classical formulas.
Can the MAD be zero?
Yes. The MAD is zero exactly when there is no spread — every value is identical. For example 5, 5, 5, 5, 5 gives a mean MAD of 0, a median MAD of 0, a scaled MAD of 0, and both standard deviations are 0 as well.
What is the MAD of just two numbers?
For 2 and 8, both the mean and the median are 5, the absolute deviations are 3 and 3, so the mean MAD and the median MAD are both 3, the scaled MAD is 3 × 1.4826 = 4.4478, the population standard deviation is 3 (it coincides here), and the sample standard deviation is 4.2426.
How do I paste my data into the calculator?
Type or paste numbers separated by commas, spaces, semicolons, tabs, or line breaks — for example "1, 2.5, 3" on separate lines also works. Negative numbers, decimals, and scientific notation like 1.5e2 are accepted. Anything that is not a number produces an error message naming the bad token.
Free tool by NRTechStudio