Advertisement
Advertisement
STATISTICS

Median Absolute Deviation Calculator — robust spread and outlier screening

Compute the median absolute deviation, scale it to be comparable with a standard deviation, and score every observation with the modified z-score that outlier rules actually use.

Separate values with commas, spaces or new lines. Non-numeric entries are ignored rather than treated as zero.
1.4826 makes the scaled figure an unbiased estimate of sigma for large normal samples. Change it only if your reference uses another convention.
3.5 is the value Iglewicz and Hoaglin recommend. Some teams use 3. The cut-off is a convention, not a law.
Median absolute deviation
0
 
0
Median
0
Scaled MAD (robust sigma)
0
Sample standard deviation
0
Values above the cut-off
Working:
Tip: compare the scaled MAD with the standard deviation in the grid. If the standard deviation is much the larger of the two, a small number of extreme values is doing most of the work in it.
Advertisement

The median absolute deviation calculator above measures how spread out a dataset is using a statistic that extreme values cannot drag around. It takes the median of your data, measures how far each observation sits from that median, and then takes the median of those distances. Two medians, and the result barely moves when you replace a value with something absurd.

Arb Digital publishes it because most spread statistics fail exactly when you need them most. A standard deviation squares every distance, so one mistyped figure — a price entered in cents instead of dollars, a session duration recorded in milliseconds — can double it. Any rule built on that inflated number then quietly stops flagging the very anomalies it was written to catch. Our standard deviation calculator computes the classical measure; this page computes the one that survives contamination, and the difference between them is itself a diagnostic.

What This Median Absolute Deviation Calculator Does

It reports four things. The raw median absolute deviation, in the units of your data. The scaled version, multiplied by 1.4826 so that it can be read on the same scale as a standard deviation. The sample standard deviation alongside it for comparison. And a modified z-score for every observation, with anything past your cut-off flagged.

That last part is what makes the statistic useful in practice rather than only in a textbook. A spread number on its own does not tell you which rows to look at. The modified z-score does: it divides each observation's distance from the median by the scaled MAD, so it answers "how unusual is this particular value, measured against a scale the unusual values did not get to influence".

The bars rank the most extreme observations by modified z-score, largest first, so the rows worth opening are at the top. Everything is computed in the browser and nothing is transmitted anywhere.

How to Use It

  1. Paste your values separated by commas, spaces or line breaks. Anything that is not a number is skipped, so a pasted column with a header row will still work.
  2. Leave the constant at 1.4826 unless your reference uses a different convention. That value is what makes the scaled figure comparable to a standard deviation under normality.
  3. Set the cut-off. 3.5 is the published recommendation; 3 is common in engineering monitoring and flags more points.
  4. Compare the scaled MAD with the standard deviation. A large gap means the classical figure has been inflated by a few points.
  5. Investigate the flagged rows rather than deleting them. A flag is a request to look, not a verdict.

The Formula and How It Is Calculated

Let the data be x₁ through xₙ with median m. The median absolute deviation is the median of the absolute distances |xᵢ − m|. That is the whole definition, and its simplicity is the point: no squaring, no mean, nothing that gives a distant point extra weight. Wolfram MathWorld's absolute deviation page sets out the general family of absolute-deviation measures this belongs to.

The raw MAD is not directly comparable to a standard deviation. For data drawn from a normal distribution, the MAD converges to roughly 0.6745 times sigma, because 0.6745 is the value that cuts off a quarter of the distribution on each side of the centre. Dividing by 0.6745 — equivalently, multiplying by 1.4826 — rescales the MAD so that it estimates sigma itself. That rescaled figure is often written MADN, and it is what the tool shows as the robust sigma.

The modified z-score follows directly. For each observation, it is 0.6745 times (xᵢ − m) divided by the MAD, which is algebraically the same as (xᵢ − m) divided by the scaled MAD. The NIST/SEMATECH e-Handbook's section on the detection of outliers states the rule directly: Iglewicz and Hoaglin recommend the modified z-score and flagging values whose absolute score exceeds 3.5.

Advertisement

The Breakdown Point, And Why 50 Percent Matters

Every estimator has a breakdown point: the fraction of the data an adversary would need to corrupt in order to push the estimate arbitrarily far. For the mean and the standard deviation, that fraction is one observation out of n, which tends to zero as the sample grows. One bad row is enough, and a bigger sample does not help.

For the median and the median absolute deviation, the breakdown point is 50 percent. You would have to corrupt half the dataset before the MAD could be made to say anything you liked. That is the highest breakdown point any sensible estimator can have, and it is the formal statement of what people mean when they call the MAD robust.

The practical reading is about how you screen data, not about which number is better. Where you know the data is clean, the standard deviation is more efficient — it uses more of the information and has a smaller standard error on genuinely normal data. Where the data arrived from a form, an API, an import or a person, the MAD is the one that still means something when a handful of rows are wrong.

Where This Sits Against Our Other Spread Tools

The naming here trips people up constantly, so it is worth being exact. Mean absolute deviation is the average of the absolute distances from the mean; it is more robust than a standard deviation because it does not square, but its breakdown point is still effectively zero because the mean it measures from can be dragged anywhere. Median absolute deviation, the subject of this page, uses the median in both steps and is robust in both.

Our mean absolute deviation calculator is the tool for the first of those, and it reports a per-observation deviation table. This page is the tool for the second, and its job is the scaled figure and the modified z-scores that turn a spread statistic into a screening rule. If what you want is the classical trio, our mean, median and mode calculator and variance calculator cover those.

For a different robust approach entirely, the interquartile range measures the width of the middle half of the data and forms the basis of the boxplot fence rule. Our interquartile range calculator computes it, and our outlier calculator applies the classical 1.5 times IQR fences. The MAD rule and the IQR rule disagree on skewed data, which is not a defect in either.

When The MAD Is Zero, And Other Degenerate Cases

If more than half of your observations share the same value, the median of the absolute deviations is zero, and the modified z-score divides by zero for every point. This is not rare: count data with many zeros, satisfaction scores clustered on a single option, latency measurements rounded to the same tick.

The tool detects this and says so rather than printing infinities. There is no universally agreed fix. One common approach is to fall back on the mean absolute deviation about the median, scaled by 0.7979 instead of 0.6745. Another is to accept that a dataset with a majority tied at one value has no meaningful robust scale and to screen it a different way, for instance by frequency rather than by distance. Neither is wrong; both should be stated when reported.

Two other cases are worth flagging. With fewer than about five observations, the MAD is computed from so few distances that its own sampling variability swamps it, and a modified z-score built on it means very little. And on strongly skewed data, the symmetric rule ±3.5 will flag more points on the long tail than on the short one, because the MAD assumes the spread is the same in both directions. Skewness is not contamination, and a rule that treats it as such will delete the shape of your distribution.

Reading The Gap Between The Two Spread Figures

The most useful single output on this page is the comparison between the scaled MAD and the standard deviation. On clean data drawn from a roughly normal distribution the two land close together, because the scaling constant is chosen to make that happen. When they diverge, the divergence tells you which way the trouble runs.

A standard deviation several times the scaled MAD is the signature of a small number of extreme values, of a heavy-tailed distribution, or of a mixture of two populations that should have been analysed separately. A standard deviation below the scaled MAD is much rarer and usually points to a bounded or strongly bimodal distribution, or simply to a very small sample where the MAD is jumpy.

Because that ratio is scale-free, it makes a good automated health check. Compute both figures for every metric you monitor, watch the ratio rather than either number, and you get an early signal that a data source has started producing junk without needing a threshold on the metric itself. Standardising an individual value against a clean scale is what our z-score calculator does with the classical mean and standard deviation.

Analytics numbers that swing on a handful of rows?

Arb Digital builds reporting on measures that do not move when one record is wrong, so a data glitch reads as a data glitch rather than as a trend.

Browse All Free Tools Talk To Our Team

Common Mistakes to Avoid

  • Confusing mean and median absolute deviation — they differ in both the centre used and the way the distances are summarised, and only the second is robust.
  • Comparing a raw MAD to a standard deviation — the raw figure is systematically about a third smaller on normal data. Scale it first.
  • Deleting every flagged value — the modified z-score identifies candidates for inspection. Removing points because a rule flagged them biases whatever you compute next.
  • Applying the symmetric cut-off to skewed data — a long right tail will trip the rule repeatedly even when nothing is wrong with the data.
  • Ignoring a MAD of zero — it means more than half your values are tied, and every modified z-score is undefined rather than infinite.

Related Free Tools From Arb Digital

Compute the classical spread with the standard deviation calculator, get the mean-based version with the mean absolute deviation calculator, apply the boxplot fence rule with the outlier calculator, measure the middle half with the interquartile range calculator, or summarise a dataset end to end with the descriptive statistics calculator. The free online tools hub lists every statistics tool we publish.

Frequently Asked Questions

What is the difference between mean and median absolute deviation?

Mean absolute deviation averages the distances from the mean. Median absolute deviation takes the median of the distances from the median. Only the second is unaffected by extreme values, because both of its steps use a median.

Why multiply the MAD by 1.4826?

On normal data the MAD converges to about 0.6745 times sigma. Multiplying by 1.4826, the reciprocal of that constant, rescales it so the result estimates sigma and can be compared with a standard deviation.

What modified z-score counts as an outlier?

The NIST e-Handbook reports the Iglewicz and Hoaglin recommendation of 3.5. That is a convention rather than a law, and some teams use 3 instead, which flags more points.

What happens if the MAD comes out as zero?

It means more than half your values are identical, so every modified z-score would divide by zero. The tool says so instead of printing infinities, and the dataset needs a different screening approach.

Is the MAD better than a standard deviation?

Not in general. On clean data the standard deviation is more efficient. The MAD is better when contamination is possible, because it takes more than half the data to be wrong before it can be pushed anywhere.

How many observations do I need?

The statistic is defined for any sample, but below about five values it is computed from too few distances to be stable, and a modified z-score built on it carries very little information.

Should I delete the values that get flagged?

No. A flag marks a value as worth checking. Removing points because a rule flagged them biases every statistic computed afterwards and hides genuine heavy tails or skew.

This page explains a standard descriptive statistic for educational purposes. It reports figures computed from data you enter and makes no recommendation about which observations to keep, exclude or act on.

Advertisement
Advertisement

Take it further