How to use the median absolute deviation calculator

Learn how to calculate median absolute deviation, scaled MAD and robust Z-scores from raw data or a frequency table in seven steps.

  1. 1. Enter your data: In Raw data mode, paste the observations. To use a frequency distribution, switch to Values & frequencies, enter each distinct value with its frequency and use + Add value for more rows.
  2. 2. Check the entries: Every value must be a number. In frequency mode each frequency must be a whole number of zero or more, with at least one above zero. An error message appears below the settings if something is invalid.
  3. 3. Review the median: The Dataset median appears in the results panel, with the observation count, the sum of absolute deviations, the minimum, the maximum and the range.
  4. 4. Examine the absolute deviations: The Absolute deviations table lists each observation in its original order with |xi − median|. The chart below it plots the observations against the median.
  5. 5. View raw and scaled MAD: The raw MAD appears at the top of the results, and the scaled MAD (1.4826 × MAD) appears beside the median in the summary.
  6. 6. Optionally enable robust outlier screening: Tick Show robust outlier screening to add robust Z-scores and flags to the table. Use the Robust |Z| threshold slider to change the cutoff, and read the number and percent of flagged values in the Outlier screening summary.
  7. 7. Review the calculation steps: Open How this was calculated to follow each step with your numbers. Set Display precision to show 2 to 8 decimal places.

Median absolute deviation measures how far the values in a data set typically sit from its median. This median absolute deviation calculator finds the raw MAD and the scaled MAD from raw data or a frequency table, and it lists every absolute deviation so you can see where the spread comes from. The MAD calculator also computes robust Z-scores and flags potential outliers against a threshold you can adjust, with each calculation step shown.

Median absolute deviation formula

Median absolute deviation takes two medians: one of the data set and one of the distances from it. The median and absolute deviation work as a pair, with the median setting the center and each absolute deviation measuring a value's distance from that center. The calculator follows the four formulas below in this order.

Dataset median

M = Median(x1, x2, ..., xn)

Absolute deviation

di = |xi − M|

Median absolute deviation

MAD = Median(|xi − M|)

Scaled MAD

Scaled MAD = 1.4826 × MAD

Here M is the median of the data set, xi is the i-th observation, n is the number of observations and di is the absolute deviation of xi from M. When n is even, M is the average of the two central values, and the same rule applies when taking the median of the deviations. The constant 1.4826 puts MAD on the scale of a standard deviation for roughly normal data, as the scaled MAD section below explains.

How to calculate median absolute deviation

This median absolute deviation example uses the calculator's demo data: 1, 2, 3, 4, 5, 6, 7, 8, 9, 100. To find median absolute deviation by hand, work through the six steps below.

  1. Sort the data in ascending order. The demo values are already in order, and n = 10. The calculator sorts internally and keeps your original order in its table.
  2. Find the median. With 10 values it is the average of the 5th and 6th: M = (5 + 6) / 2 = 5.5.
  3. Subtract the median from each value and drop the sign: 4.5, 3.5, 2.5, 1.5, 0.5, 0.5, 1.5, 2.5, 3.5 and 94.5.
  4. Sort the absolute deviations: 0.5, 0.5, 1.5, 1.5, 2.5, 2.5, 3.5, 3.5, 4.5, 94.5.
  5. Find the median of those deviations, the average of the 5th and 6th: (2.5 + 2.5) / 2 = 2.5. This is the MAD.
  6. Multiply by 1.4826 to get the scaled MAD: 1.4826 × 2.5 = 3.7065.
xx − M (M = 5.5)|x − M|
1−4.54.5
2−3.53.5
3−2.52.5
4−1.51.5
5−0.50.5
60.50.5
71.51.5
82.52.5
93.53.5
10094.594.5

Entering the same values in the calculator returns a MAD of 2.5 and a scaled MAD of 3.7065. The value 100 sits 94.5 from the median, but it only lands at the end of the sorted deviations, so its size does not change the MAD.

What is absolute deviation?

Absolute deviation is the distance between an observation and the median of the data set, with direction ignored. On this page the center is always the median. Its formula is |xi − M|: subtract the median from the value and keep the result without its sign. Individual absolute deviations cannot be negative, and a value equal to the median has an absolute deviation of 0.

That gives the definition of median absolute deviation. In math, it is the median of the absolute deviations of a data set's values from the data set's median.

Scaled MAD and outlier detection

Raw MAD and scaled MAD

Raw MAD is the median of the absolute deviations and stays in the units of the data. Scaled MAD multiplies it by 1.4826. The calculator reports both, so you can use the raw value as the plain median distance and the scaled value where you want a spread on the scale of a standard deviation.

Why 1.4826 is used

In a normal distribution, MAD is a fixed fraction of the standard deviation. Multiplying by 1.4826 undoes that fraction, so the scaled MAD estimates the standard deviation when the data are close to normal. The assumption matters. For skewed or heavy-tailed data the scaled MAD does not equal the standard deviation, and it should be read as a robust spread measure on its own.

Robust Z-scores and potential outliers

A robust Z-score swaps the mean and standard deviation of the usual Z-score for the median and the scaled MAD:

Robust Z = (xi − M) / (1.4826 × MAD)

The score is positive above the median and negative below it. The calculator flags an observation when the absolute value of its robust Z-score is greater than the threshold you set. In the demo data, 100 has a robust Z of 25.4958 and is flagged, while 1 has a robust Z of −1.2141 and is not. One of the ten values is flagged, which is 10%.

A flag is a screening aid and does not prove a value is wrong. A flagged value can be a typing error, a measurement from a different population or a genuine extreme, so check it before changing or removing anything. No threshold suits every data set, which is why the cutoff is adjustable.

When MAD is zero

If MAD is 0, the robust Z-score would divide by zero and is undefined. The calculator then shows a warning, leaves the robust Z column empty and flags nothing. This happens when many values are tied at the median.

Median absolute deviation vs mean absolute deviation

Both measures are abbreviated MAD, and they are not interchangeable. Median absolute deviation takes the median of the distances from the median. Mean absolute deviation averages the distances from the arithmetic mean, so an extreme value affects it twice: it pulls the mean toward itself and adds a large distance of its own. For the demo data the mean is 14.5 and the mean absolute deviation is 17.1, against a median absolute deviation of 2.5. You can calculate the mean version with the mean absolute deviation calculator. For the spread measure most courses teach first, see the standard deviation calculator.

Median Absolute Deviation Calculator – MAD Formula & Examples

Frequently Asked Questions

Q: What is median absolute deviation?

A robust measure of spread: the median of the distances between each value and the data set's median. Both the center and the spread are medians, so extreme values change it very little.

Q: What is the formula for median absolute deviation?

MAD = Median(|xi − M|), where M is the median of the data. The scaled version is 1.4826 × MAD.

Q: How do you calculate median absolute deviation?

Take a median twice: first of the data to get M, then of the absolute distances |xi − M|. The worked example above does both passes on ten values and ends at 2.5.

Q: How do I find the median absolute deviation of a dataset?

Paste the values into Raw data mode, or enter each distinct value with its frequency. By hand, sort the data to find M, then sort the absolute deviations as well, because the second median needs its own ordered list.

Q: What is absolute deviation?

The distance from one value to a center, with direction ignored. Here the center is the median, so each value's absolute deviation is |xi − M|, and the calculator lists one for every observation.

Q: What is the difference between absolute deviation and median absolute deviation?

Absolute deviation is a per-value distance, so a data set of n values has n of them. The median absolute deviation is one number for the whole data set: the median of those n distances.

Q: Can median absolute deviation be zero?

Yes, when more than half of the values equal the median. For 4, 4, 4, 4, 9 the median is 4, the deviations are 0, 0, 0, 0 and 5, and the MAD is 0. It can never be negative.

Q: What is scaled median absolute deviation?

The MAD multiplied by 1.4826, meant to be read on the same scale as a standard deviation when the data are roughly normal. The calculator shows it beside the raw MAD.

Q: Why is MAD multiplied by 1.4826?

For normal data, MAD is about 0.6745 times the standard deviation, and 1 / 0.6745 is about 1.4826. The constant changes the scale only. It does not change which values lie far from the median.

Q: How is median absolute deviation used to detect outliers?

Each value gets a robust Z-score, and values whose absolute score exceeds a threshold are flagged. The calculator starts at 3.5, a commonly used default, and its slider runs from 1 to 10. It also reports how many values are flagged and what percent of the data they make up.

Q: What is a robust Z-score?

A Z-score built from the median and MAD instead of the mean and standard deviation: (xi − M) / (1.4826 × MAD), which is approximately 0.6745 × (xi − M) / MAD. Its sign shows whether the value is above or below the median, and its size shows how many scaled MADs away it lies.

Q: Is median absolute deviation better than standard deviation?

Neither is better in every case. MAD resists outliers: the demo data have a sample standard deviation of 30.1 but a scaled MAD of 3.7, because the single value 100 dominates the standard deviation. Standard deviation uses every value's magnitude and feeds most standard tests, and scaled MAD matches it only for roughly normal data.

Q: What is the difference between mean and median absolute deviation?

The mean version suits a plain average distance from the mean in reasonably symmetric data. The median version suits data with outliers or skew, because neither its center nor its spread is dragged by extreme values. Check which one a source means when it writes MAD.

Q: Can median absolute deviation be calculated with repeated values?

Yes. Repeats count as separate observations. In Values & frequencies mode each frequency must be a whole number, and the calculator expands each value that many times, so the result matches the full list. Many repeats at the median can push the MAD to 0.

Loaded shared calculation