A spread measure that resists outliers
The standard deviation and the mean absolute deviation both start from the mean, and a single extreme value can drag them far from what the bulk of the data show. The median absolute deviation, usually abbreviated MAD, replaces the mean with the median at both stages. It takes the median of the list, measures how far each value sits from that median, and then takes the median of those distances. Half the values fall within one MAD of the median. This page returns the raw, unscaled figure in the same units as the data. It is a standard tool in robust statistics, and the NIST Engineering Statistics Handbook covers the family of deviation measures.
Steps of the calculation
The formula is MAD = median(|x − median(x)|). Sort the list and find its median, which is the middle value for an odd count and the average of the two middle values for an even count. Subtract that median from each value and discard the sign. Then find the median of the resulting distances using the same rule. The page accepts up to 10,000 numbers separated by commas, semicolons, spaces or line breaks, with dots for decimals. It performs the arithmetic in floating point and shows up to 12 significant digits. No sample or population adjustment is involved.
The default outlier list
The page opens with 1, 2, 3, 4, 100, a list with an obvious outlier. The median is 3. The distances from 3 are 2, 1, 0, 1 and 97. Sorted, they read 0, 1, 1, 2, 97, and the middle one is 1. The unscaled MAD is therefore 1. The mean absolute deviation of the same numbers is 31.2, and the sample standard deviation is over 43. The single value of 100 dominates those two, while the median-based measure reports what the other four values suggest. That contrast is the main reason to use this statistic when data may contain errors or heavy tails.
More examples, odd and even counts
For 5, 7, 8, 9, 10, 12, 40, the median is 9. The distances are 4, 2, 1, 0, 1, 3 and 31. Sorted: 0, 1, 1, 2, 3, 4, 31, with a middle value of 2, so the MAD is 2 even though 40 sits far away. For an even count, 2, 4, 6, 8 has a median of 5. The distances are 3, 1, 1, 3, sorted as 1, 1, 3, 3, and the median of those is the average of 1 and 3, which is 2. The MAD can also be zero: in 10, 10, 10, 50 the median is 10, the distances are 0, 0, 0 and 40, and their median is 0. More than half the values equal the median.
Why the result is unscaled
You will often see the MAD multiplied by about 1.4826. That constant makes the figure a consistent estimate of the standard deviation when the data come from a normal distribution, because for such data the MAD equals about 0.6745 standard deviations. This page does not apply the constant. It reports the plain median of absolute deviations, so you can state exactly what you computed. If you want a normal-consistent robust estimate of the standard deviation, multiply the output by 1.4826 yourself and say that you did. For the default list that would give about 1.4826. Mixing the scaled and unscaled versions is a frequent cause of confusion when comparing results from different software.
Uses in data cleaning
A common application is flagging suspicious values. Compute the median and the MAD, then mark values whose distance from the median exceeds some multiple of the scaled MAD, with thresholds such as 3 or 3.5 appearing in the literature. Because the median and MAD hardly move when an outlier is added, the outlier cannot hide itself by inflating the measure of spread, a problem called masking. Sensor streams, survey responses, timing data and financial returns all benefit. Pick any threshold with the data in mind, because the page only supplies the MAD and does not flag anything on its own.
How it relates to other statistics
The MAD is not the same as the mean absolute deviation, even though the abbreviations coincide, so always write out which one you mean. It is also different from the interquartile range, though for symmetric data the two are related: the MAD is about half the interquartile range. Like the median, it ignores much of the data's fine structure. Two lists can share a median and a MAD while differing in shape. In exchange you gain a breakdown point of 50 percent, meaning up to half the values can be arbitrarily bad before the MAD becomes meaningless. The standard deviation has a breakdown point of zero. The trade-off is statistical efficiency: on clean, normally distributed data, the MAD varies more from sample to sample than the standard deviation does, so with well-behaved data and enough observations the classical measures remain the better estimators.
A worked comparison on repeated measurements
Imagine a lab that weighs the same reference sample six times and records 10.2, 10.1, 10.3, 10.2, 10.2 and 12.9 grams, where the last reading came from a bumped balance. The sorted list is 10.1, 10.2, 10.2, 10.2, 10.3, 12.9, so the median is 10.2. The distances are 0.1, 0, 0, 0, 0.1 and 2.7, which sort to 0, 0, 0, 0.1, 0.1, 2.7, and the middle pair averages to 0.05. The MAD is 0.05 grams, a faithful picture of how tightly the good readings cluster. The sample standard deviation of the same six readings is about 1.1 grams, which would overstate the scatter of the balance by a factor of twenty or more.
Numeric entry rules for median deviation
Enter numbers only, using dots for decimals, because a comma decimal would be read as a list separator. The list can contain up to 10,000 values and every value must be finite. A single value has a MAD of zero, since its one distance from the median is zero. Duplicates are kept and counted, so repeated values pull the median toward themselves and are not collapsed. Keep the unscaled label with any result you save or share, together with the center, because the same abbreviation covers several statistics. Floating-point arithmetic means very long decimals may show small representation effects. The page does not test for normality, flag outliers or choose thresholds, and the output only has meaning within the data and units you entered.