Skip to main content

Median Absolute Deviation Calculator

Calculate the raw and scaled median absolute deviation (MAD) for a list of numbers — a robust, outlier-resistant measure of spread — plus a per-value modified z-score table flagging likely outliers.

Input

Output

Summary
MetricValue
No data yet
Per-Value Deviations & Outliers
Value|Deviation from Median|Modified Z-scoreOutlier?
No data yet
Was this helpful?

Guides

What is median absolute deviation?

Median absolute deviation (MAD) measures how spread out a data set is, the same way standard deviation does — but built entirely from medians instead of means. First find the median of your data, then find the median of every value's absolute distance from that median. Because both steps use the median rather than the mean, a handful of extreme values can't drag MAD around the way they drag standard deviation around — which is exactly why MAD is the standard robust alternative when a data set might contain outliers, or when you're trying to find the outliers in the first place.

How this tool works

Paste your numbers — separated by commas, spaces, newlines, semicolons, or tabs — and it computes:

  • Raw MAD: median(|xᵢ − median(X)|).
  • Scaled MAD: the raw MAD × 1.4826, a consistency constant that makes this value directly comparable to a standard deviation if the data were normally distributed. Use this scaled value when you want a "robust standard deviation" for further calculations (e.g. modified z-scores, see below).
  • Mean absolute deviation: included for reference, and used as a fallback when MAD is 0 (see below).

Outlier detection (modified z-score)

The Per-Value Deviations & Outliers table goes a step further than a raw MAD number: it computes each point's modified z-score, 0.6745 × (x − median) / MAD, and flags anything with |modified z| > 3.5 as a likely outlier — the threshold recommended by Iglewicz & Hoaglin (1993) and the standard cutoff used in robust-statistics practice. This is more reliable than a standard z-score threshold on small or skewed samples, because a regular z-score's own denominator (standard deviation) is exactly what an outlier inflates.

If every value in your data set is identical (or so tightly clustered that MAD comes out to exactly 0), the modified z-score formula divides by zero — this tool falls back to the mean absolute deviation (scaled by 1.253314, the matching consistency constant) so the table still produces a meaningful result instead of NaN.

Common uses

  • Flagging sensor readings, financial transactions, or lab measurements that look like errors or fraud, without a few bad readings distorting the very check meant to catch them
  • Comparing the spread of two data sets that might each contain a few outliers
  • Feeding a robust standard-deviation estimate into a downstream calculation that assumes roughly normal data

For general descriptive statistics — mean, standard deviation, quartiles, skewness — use the Statistics Calculator, which reports the (non-robust) standard deviation and variance this tool intentionally avoids.

Privacy

This tool runs entirely in your browser. Your numbers are never uploaded to a server.

mad calculatormedian absolute deviationrobust statisticsoutlier detectionmodified z-scorespreaddispersiondata analysis

Use it from code

From 3 credits per call

REST API

curl -X POST https://api.iotools.cloud/v1/tool/median-absolute-deviation-calculator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "dataInput": "12, 15, 18, 22, 22, 25, 28, 30, 30, 30, 35, 40, …"
  }'

Swap in your own key from your account. The tool's fields are the body — no wrapper.

Ask an AI agent

Use the IOTools `median-absolute-deviation-calculator` tool (Median Absolute Deviation Calculator) on this input:

YOUR_INPUT_HERE

Paste this at any agent connected to the IOTools MCP server, then add your input.

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.