Median Absolute Deviation (MAD) Calculator
Enter your numbers separated by commas, spaces, or new lines and the calculator finds the median absolute deviation, the normalized MAD (a robust stand-in for the standard deviation), the dataset median, and a count of statistical outliers. A step-by-step panel shows every stage of the calculation with your actual values.
Formula
Worked example
For the dataset {2, 3, 4, 5, 6, 8, 9, 100}: median = (5 + 6)/2 = 5.5; absolute deviations = {3.5, 2.5, 1.5, 0.5, 0.5, 2.5, 3.5, 94.5}; sorted = {0.5, 0.5, 1.5, 2.5, 2.5, 3.5, 3.5, 94.5}; MAD = (2.5 + 2.5)/2 = 2.5. Normalized MAD = 2.5 x 1.4826 = 3.71. The value 100 is flagged as an outlier (deviation 94.5 >> 3 x 3.71 = 11.1).
What is the Median Absolute Deviation?
The Median Absolute Deviation (MAD) is a robust measure of statistical dispersion - how spread out the values in a dataset are. Unlike the standard deviation, which uses the mean and squares the deviations, MAD uses the median and takes absolute values. The formula is: MAD = median(|xi - median(X)|). Because it relies on the median rather than the mean, MAD is highly resistant to the influence of extreme values (outliers). A single very large or very small number can distort the standard deviation dramatically while barely moving the MAD at all.
How to calculate MAD step by step
Step 1: Sort your data and find the median. Step 2: Subtract the median from each data point, then take the absolute value of each result - these are the absolute deviations. Step 3: Sort the absolute deviations. Step 4: Find the median of those absolute deviations. That value is the MAD. For example, with the dataset {11, 12, 12, 14, 15, 16} the sorted median is (12 + 14) / 2 = 13. The absolute deviations are {2, 1, 1, 1, 2, 3}, and their median is (1 + 2) / 2 = 1.5, so MAD = 1.5.
Normalized MAD and the 1.4826 scale factor
The raw MAD is in the same units as the data, but it is not directly comparable to the standard deviation because the two measure different things. For data drawn from a normal (Gaussian) distribution, multiplying MAD by 1.4826 produces a consistent estimator of the standard deviation: Normalized MAD = 1.4826 x MAD. This scale factor comes from the relationship between the median absolute deviation and the standard deviation for a standard normal distribution (1 / qnorm(0.75) = 1.4826). Use the normalized version when you want a drop-in replacement for the standard deviation that is resistant to outliers.
Outlier detection using MAD
One of the most practical uses of MAD is detecting outliers in a robust way. The standard z-score (using mean and standard deviation) is sensitive to the very outliers it is trying to detect - a classic catch-22. A modified z-score based on MAD avoids this: modified z = 0.6745 x (xi - median) / MAD. Values with |modified z| > 3.5 are commonly flagged as potential outliers (equivalent to flagging points more than 3 normalized-MADs from the median). This calculator uses the 3 normalized-MAD boundary for simplicity. Because MAD itself is not distorted by outliers, this rule identifies extreme values reliably even in heavily skewed datasets.
Dispersion measures compared
| Measure | Based on | Outlier sensitivity | Best for |
|---|---|---|---|
| MAD | Median of absolute deviations | Very low | Skewed data, data with outliers |
| IQR | Q3 minus Q1 | Very low | Boxplots, categorical comparisons |
| Standard Deviation | Mean of squared deviations | High | Normally distributed data |
| Mean Absolute Deviation | Mean of absolute deviations | Moderate | General purpose |
| Range | Max minus Min | Extreme | Quick overview, uniform distributions |
MAD versus other common measures of spread. Use this table to choose the right measure for your data.
Frequently asked questions
What does MAD tell you about a dataset?
MAD tells you the typical distance between each data point and the center (median) of the dataset. A small MAD means the values cluster tightly around the median; a large MAD means they are spread out. Because MAD uses the median for both the center and the spread, it is not pulled by extreme values the way the standard deviation is.
What is the difference between MAD and standard deviation?
Both measure spread, but they react very differently to outliers. Standard deviation squares the deviations from the mean, which gives extreme values a disproportionately large weight. MAD takes absolute deviations from the median and then finds the median of those - a double-median operation that keeps outliers from dominating the result. For normally distributed data without outliers they give similar answers (after applying the 1.4826 scale factor). For skewed data or data with outliers, MAD is far more representative of the typical spread.
When should I use MAD instead of standard deviation?
Prefer MAD when your data contains outliers, when the distribution is skewed, or when you cannot assume normality. It is especially useful in finance (daily returns contain rare but enormous swings), quality control (sensor readings sometimes spike), environmental science, and any situation where a single anomalous reading should not define the measure of variability. Use standard deviation when the data is normally distributed and outliers have been verified and removed.
What is the 1.4826 normalization factor?
For a normally distributed population, the MAD equals approximately 0.6745 times the standard deviation. Multiplying MAD by 1 / 0.6745 = 1.4826 rescales it so that it is a consistent estimator of the standard deviation - meaning it converges to the true sigma as sample size grows. Use the normalized MAD when you want a robust alternative to the standard deviation that can be plugged into formulas expecting sigma.
How is MAD used to detect outliers?
A modified z-score replaces the usual mean and standard deviation with the median and MAD: modified z = 0.6745 x (xi - median) / MAD. Points with |modified z| above 3.5 are commonly labeled outliers. Equivalently, a point is suspicious if its distance from the median exceeds 3 times the normalized MAD (3 x 1.4826 x MAD). Because MAD is itself robust, this rule is not influenced by the outliers it is trying to find - which is a key advantage over the standard z-score.
Does the order of the data matter?
No. MAD depends only on the values, not their order. You can enter numbers in any sequence and the result will be identical.
How many data points do I need for a reliable MAD?
MAD can be computed from as few as two points, but the estimate becomes unreliable with very small samples. As a rule of thumb, use at least 10 observations for a stable result. With fewer than 10 points, the single observation that happens to be the median of absolute deviations has too much influence on the final value.
Sources
- Rousseeuw, P.J. and Croux, C. (1993). Alternatives to the Median Absolute Deviation. Journal of the American Statistical Association, 88(424)
- Leys, C. et al. (2013). Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median. Journal of Experimental Social Psychology, 49(4)