Skip to content
Statculator
Descriptive Statistics

Median Absolute Deviation Calculator

Free median absolute deviation calculator: find MAD = median(|x − median|), the scaled MAD (×1.4826), robust z-scores and outliers, with every step shown.

Free, no sign-up Runs in your browserBy Hira Noor, BS MathematicsUpdated

Try
10 values

Separate values with commas, spaces or new lines, or paste a column from Excel or Google Sheets.

Values whose robust z-score is further than this from 0 are flagged as likely outliers.

Results

Median absolute deviation, MAD
1.5
median(|x − median|)
Scaled MAD (robust estimate of σ)
2.2239
1.4826 × MAD
Count, n
10
Median
15
Mean
17.5
Sample standard deviation, s
8.4492
Ratio s / scaled MAD
3.7993
Mean absolute deviation around the median
3.9
MAD fences, median ± 3.5 × scaled MAD
7.2163 to 22.7837
Values with |robust z| > 3.5
41
Largest |robust z|
11.6912
Mean after removing the flagged value
14.8889
Sample SD after removing the flagged value
1.9003
Cleaned data (flagged values removed)
12, 15, 14, 18, 13, 16, 15, 17, 14

Interpretation: Half of the values lie within 1.5 of the median (15). If the bulk of the data is roughly normal, the scaled MAD of 2.2239 estimates the standard deviation; the ordinary SD of 8.4492 is 3.8 times larger, a sign that a few extreme values are inflating it.

  • One value lies more than 3.5 robust standard deviations from the median: 41. It is likely an outlier worth checking.

Deviations from the median

#xx − median|x − median|Robust z
112-33-1.349
215000
314-11-0.4497
418331.349
513-22-0.8993
616110.4497
715000
841262611.6912
917220.8993
1014-11-0.4497

Robust z = (x − median) / (1.4826 × MAD), the same as Iglewicz and Hoaglin’s modified z-score 0.6745 (x − median) / MAD. Highlighted rows exceed ±3.5.

Step-by-step solution

  1. 1

    Sort the data and find the median

    Sorted: 12, 13, 14, 14, 15, 15, 16, 17, 18, 41
    Median = (15 + 15) / 2 = 15 (average of positions 5 and 6)
  2. 2

    Find each absolute deviation from the median

    |12 − 15| = 3
    |15 − 15| = 0
    |14 − 15| = 1
    |18 − 15| = 3
    |13 − 15| = 2
    …
  3. 3

    Sort the absolute deviations and take their median

    Sorted |x − median|: 0, 0, 1, 1, 1, 2, 2, 3, 3, 26
    MAD = (1 + 2) / 2 = 1.5 (average of positions 5 and 6)
  4. 4

    Scale the MAD to estimate the standard deviation

    For normal data, MAD ≈ 0.6745σ, so multiplying by 1 / 0.6745 ≈ 1.4826 puts it on the same scale as σ.

    Scaled MAD = 1.4826 × 1.5 = 2.2239
  5. 5

    Use robust z-scores to flag outliers

    Robust z = (x − 15) / 2.2239
    Fences: 15 ± 3.5 × 2.2239 = 7.2163 to 22.7837
    Largest |z| = 11.6912 > 3.5 → outlier

What is a Median Absolute Deviation Calculator?

A median absolute deviation calculator finds MAD = median(|x − median|): the typical distance of values from the median, using medians at both steps so outliers barely affect it. Multiplying by 1.4826 gives the scaled MAD, a robust estimate of the standard deviation, and dividing each value’s distance from the median by the scaled MAD gives a robust z-score for spotting outliers.

What the Median Absolute Deviation Calculator does

Enter a dataset and the calculator returns the raw MAD, the scaled MAD (×1.4826) and a robust z-score for every value, highlighting any beyond the cut-off you choose (±3.5 by default). It also shows the ordinary standard deviation, so you can see how much a few extreme values are inflating it, and the MAD fences, median ± cut-off × scaled MAD.

The median absolute deviation (sometimes called the median average deviation or absolute median deviation) is one of the most outlier-resistant measures of spread: up to half of the data can be wildly wrong before it breaks down. That makes it the standard choice for cleaning data, screening sensor readings and building robust z-scores when you cannot trust the mean and SD. If you want the average distance from the mean instead, use the mean absolute deviation calculator.

How to use the Median Absolute Deviation Calculator

  1. Type or paste your numbers into Data values, or pick one of the example data sets.
  2. Choose an outlier cut-off. Keep 3.5 for the classic modified z-score rule, or pick 2.5 or 3 for stricter screening.
  3. Read the MAD and the scaled MAD at the top of the results.
  4. Check the deviation table: highlighted rows have a robust z-score beyond the cut-off and are likely outliers. When values are flagged, the results also list the cleaned data with its mean and SD, ready to copy.
  5. Follow the step-by-step solution to see the median, the sorted absolute deviations, the scaling and the fences.

How to calculate the median absolute deviation by hand

Calculating the median absolute deviation takes four steps. Each one uses only sorting and medians, so you can do it with pencil and paper for small data sets:

  1. Find the median M of the data: sort the values and take the middle one (or the average of the two middle values when n is even).
  2. Subtract the median from every value and drop the sign, giving the absolute deviations |xᵢ − M|.
  3. Sort the absolute deviations and take their median. That number is the MAD.
  4. Optionally multiply by 1.4826 to get the scaled MAD, which estimates the standard deviation when the core of the data is normal.

Median absolute deviation formula

Median absolute deviation
MAD = median( |xᵢ − M| ), where M = median(x)
Scaled MAD (robust σ estimate)
σ̂ = 1.4826 × MAD
Robust (modified) z-score
zᵢ = (xᵢ − M) / (1.4826 × MAD) = 0.6745 (xᵢ − M) / MAD
MAD outlier fences
M ± k × 1.4826 × MAD, with k = 3.5, 3 or 2.5
Formula symbols
SymbolMeaning
xᵢeach data value
Mmedian of the data
1.48261 / Φ⁻¹(0.75), the scale factor for normal data
koutlier cut-off for |zᵢ|, 3.5 by default

Where does 1.4826 come from? For a normal distribution, half of the values lie within 0.6745σ of the median, so the population MAD equals 0.6745σ. Dividing by 0.6745 (multiplying by 1.4826) turns the MAD into an estimate of σ.

Do not confuse this with the mean absolute deviation from the median, Σ|xᵢ − M| / n. That formula averages the distances instead of taking their median, so a single extreme value still pulls it up. The calculator reports it too, as “Mean absolute deviation around the median”.

Worked example

Worked example: a sensor with one bad reading

Problem. A temperature sensor logs 12, 15, 14, 18, 13, 16, 15, 41, 17, 14 °C. The 41 looks suspicious. Find the MAD, the scaled MAD, and check the 41 with a robust z-score.

  1. 01Sorted: 12, 13, 14, 14, 15, 15, 16, 17, 18, 41, so the median is (15 + 15) / 2 = 15.
  2. 02Absolute deviations: 3, 0, 1, 3, 2, 1, 0, 26, 2, 1.
  3. 03Sorted: 0, 0, 1, 1, 1, 2, 2, 3, 3, 26. The median is (1 + 2) / 2, so MAD = 1.5.
  4. 04Scaled MAD = 1.4826 × 1.5 = 2.2239 °C.
  5. 05Robust z for 41: (41 − 15) / 2.2239 = 11.69, far beyond 3.5. The fences are 15 ± 3.5 × 2.2239 = 7.22 to 22.78 °C.

Answer. The MAD is 1.5 °C and the robust SD estimate is 2.2239 °C. The reading of 41 °C is a clear outlier. By contrast, the ordinary sample SD is 8.4492 °C, almost four times larger, because that single value dominates it.

Why the MAD resists outliers

A statistic’s breakdown point is the share of the data that can be replaced by arbitrary values before the statistic becomes meaningless. The standard deviation has a breakdown point of 0%: one huge value can make it as large as you like. The IQR tolerates 25% bad data. The MAD tolerates 50%, the highest possible.

The price is efficiency: when the data really are normal with no outliers, the scaled MAD varies more from sample to sample than the SD (it is about 37% as efficient). Many analysts therefore use the MAD to detect outliers and then report the usual SD of the cleaned data. When you compare several groups, reporting their medians and median absolute deviations side by side gives a summary that one stray value cannot distort.

Measure of spreadBreakdown pointScale factor to estimate σ (normal data)
Standard deviation0%1
Mean absolute deviation0%× 1.2533
Interquartile range25%÷ 1.349
Median absolute deviation50%× 1.4826

Which outlier cut-off should you use?

There is no single correct threshold for the robust z-score. The choice trades missed outliers against false alarms, so pick it before you look at the data and report it alongside your results.

Cut-off |z|Source or labelShare of normal data flagged
3.5Iglewicz and Hoaglin (1993), modified z-scoreabout 0.05%
3Leys et al. (2013): very conservativeabout 0.27%
2.5Leys et al. (2013): moderately conservative, their recommended defaultabout 1.2%
2Leys et al. (2013): poorly conservativeabout 4.6%

Median absolute deviation in Excel, R and Python

Software packages disagree on whether “MAD” means the raw or the scaled value, so check before comparing results with this calculator:

  • Excel and Google Sheets: =MEDIAN(ABS(A1:A10-MEDIAN(A1:A10))) returns the raw MAD. Google Sheets needs it wrapped in ARRAYFORMULA.
  • R: mad(x) returns the scaled MAD (constant = 1.4826); mad(x, constant = 1) returns the raw MAD.
  • Python (SciPy): scipy.stats.median_abs_deviation(x) returns the raw MAD; add scale="normal" for the scaled one.
  • Python (statsmodels): statsmodels.robust.mad(x) returns the scaled MAD by default.
  • pandas: the old Series.mad() computed the mean absolute deviation, not the median one, and was removed in pandas 2.0.

References

The scale factor, cut-offs and breakdown figures on this page come from these sources:

  • Iglewicz, B. and Hoaglin, D. C. (1993). How to Detect and Handle Outliers. ASQC Quality Press. Source of the modified z-score and the 3.5 cut-off.
  • Leys, C., Ley, C., Klein, O., Bernard, P. and Licata, L. (2013). Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median. Journal of Experimental Social Psychology, 49(4), 764–766. Source of the 3, 2.5 and 2 cut-offs.
  • Rousseeuw, P. J. and Croux, C. (1993). Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424), 1273–1283. Source of the 50% breakdown point and 37% efficiency.
  • NIST/SEMATECH e-Handbook of Statistical Methods, section 1.3.5.17, Detection of Outliers.

Common use cases

  • Outlier screening: flag values whose robust z-score exceeds about 3.5 before running an analysis.
  • Sensor and log data: estimate typical noise levels when occasional glitches produce extreme readings.
  • Robust standardization: replace (x − mean) / SD with (x − median) / scaled MAD so that a few extreme values do not distort everyone else’s scores.
  • Skewed or heavy-tailed data: describe spread for incomes, response times or prices alongside the median.
  • Reaction-time and survey data: psychology researchers often drop responses beyond median ± 2.5 × scaled MAD, as recommended by Leys et al. (2013).

Assumptions and limitations

  • If more than half of the values are identical, the MAD is 0 and robust z-scores are undefined. This happens with heavily rounded or discrete data.
  • The 1.4826 factor assumes the core of the data is normal. For skewed data the scaled MAD is still a useful spread measure, but it is not an estimate of a normal σ.
  • The MAD treats deviations above and below the median symmetrically, so for strongly skewed data it can misstate spread on one side. Tukey fences based on Q1 and Q3 handle asymmetry better.
  • With very small samples (fewer than about 10 values), the MAD jumps around a lot from sample to sample; treat outlier flags as prompts to check the data, not as proof.
  • Not to be confused with the mean absolute deviation, Σ|x − x̄| / n, which shares the abbreviation MAD.

Frequently asked questions

How do you calculate the median absolute deviation?

Find the median of the data, subtract it from every value and take absolute values, then find the median of those absolute deviations. For 2, 4, 6, 8, 100 the median is 6, the absolute deviations are 4, 2, 0, 2, 94, and their median, the MAD, is 2.

What is the formula for median deviation?

The median absolute deviation is MAD = median(|xᵢ − M|), where M is the median of the data. Its scaled version, 1.4826 × MAD, estimates the standard deviation for normally distributed data.

What is the difference between the MAD and the scaled MAD?

The MAD is the median of the absolute deviations from the median. The scaled MAD multiplies it by 1.4826 so that, for normally distributed data, it estimates the standard deviation. Use the raw MAD to describe spread and the scaled MAD when you need a robust substitute for σ.

Why multiply the MAD by 1.4826?

For a normal distribution, the median absolute deviation equals 0.6745 times the standard deviation, because 50% of a normal population lies within 0.6745σ of the center. Dividing by 0.6745, which is the same as multiplying by 1.4826, rescales the MAD to estimate σ.

How do I use the MAD to detect outliers?

Compute a robust z-score for each value, (x − median) / (1.4826 × MAD), and flag values with an absolute score above about 3.5. This is the modified z-score rule proposed by Iglewicz and Hoaglin. Leys et al. (2013) suggest a stricter 2.5 for many research settings.

Is the median absolute deviation the same as the mean absolute deviation?

No. The mean absolute deviation averages the distances from the mean, so outliers still affect it. The median absolute deviation takes the median of the distances from the median, so up to half the data can be extreme without changing it much.

How do I calculate the MAD in Excel?

Excel has no MAD function. With the data in A1:A10, enter =MEDIAN(ABS(A1:A10-MEDIAN(A1:A10))). In Excel 365 it works as a normal formula; in older versions confirm it with Ctrl+Shift+Enter. Multiply the result by 1.4826 for the scaled version.

Cite this page

Statculator. (2026, November 14). Median Absolute Deviation Calculator. Retrieved November 14, 2026, from https://statculator.com/descriptive-statistics/median-absolute-deviation-calculator/