Report

Help us improve this tool

Median Absolute Deviation Calculator

Calculate the Median Absolute Deviation (MAD) of any dataset with step-by-step formulas, scale factor options, outlier detection, and comparison to standard deviation.

O M T

The Median Absolute Deviation Calculator is a robust statistical tool that measures the variability or dispersion of a dataset using the median rather than the mean. Unlike standard deviation, which is highly sensitive to outliers, MAD provides a resilient measure of spread that remains accurate even when your data contains extreme values. Simply enter your numbers separated by commas, spaces, or new lines, choose a scale factor, and the calculator instantly computes the MAD along with comprehensive statistics. For related tools, try our Standard Deviation Calculator and Mean Median Mode Range Calculator.

What is Median Absolute Deviation (MAD)?

Median Absolute Deviation (MAD) is a robust measure of statistical dispersion that describes how spread out values in a dataset are. It is calculated as the median of the absolute deviations from the dataset's median:

MAD = median(|xi - median(X)|)

Unlike standard deviation, which squares deviations and uses the mean, MAD uses the median and absolute values. This makes it highly resistant to outliers -- a single extreme value barely affects MAD while it can dramatically inflate standard deviation. MAD has a breakdown point of 50%, meaning up to half of the data can be contaminated before MAD becomes unreliable. In contrast, the mean and standard deviation have a breakdown point of 0%.

How to Use This Calculator

  1. Enter your data in the input field. Numbers can be separated by commas, spaces, or new lines. For example: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  2. Select a scale factor. Choose "No scaling" for raw MAD, k = 1.4826 to estimate the population standard deviation for normally distributed data, or enter a custom scale factor.
  3. View results instantly. The calculator automatically computes MAD, scaled MAD, median, mean, standard deviation, IQR, and quartiles as you type or adjust settings.
  4. Review the step-by-step breakdown to understand exactly how each measure is calculated.

Understanding the Scale Factor

When comparing MAD to standard deviation for normally distributed data, a scale factor is applied to make MAD a consistent estimator of the population standard deviation. The most common scale factor is $k = 1.4826$, derived from:

$$k = \frac{1}{\Phi^{-1}(3/4)} \approx 1.4826$$

Where $\Phi^{-1}$ is the inverse cumulative distribution function (quantile function) of the standard normal distribution. For normally distributed data, scaled MAD ($1.4826 \times \text{MAD}$) approximately equals the standard deviation. Another common scaling factor, $k = 1.2533$, makes MAD approximately equal to the standard deviation in terms of the expected absolute deviation for a normal distribution.

When to Use Each Scale Factor

  • No scaling (raw MAD): Use when you want the raw MAD value for direct interpretation or when comparing datasets measured at the same scale.
  • k = 1.4826: Use when you want a robust estimate of the population standard deviation for normally distributed data. This is the most common choice in outlier detection.
  • k = 1.2533: Use to make MAD roughly equivalent to the expected absolute deviation from the median for a normal distribution.
  • Custom: Use when you have a specific scaling factor for your application or non-normal distribution.

MAD vs Standard Deviation

Property MAD Standard Deviation
Central Tendency Used Median Mean
Deviation Type Absolute values Squared values
Outlier Sensitivity Very low (robust) High (sensitive)
Breakdown Point 50% 0%
Best For Skewed data, outliers Normal distributions

MAD for Outlier Detection

MAD excels at detecting outliers because the detection threshold itself is not influenced by outliers. The modified Z-score method uses MAD as follows:

$$M_i = \frac{0.6745 \times (x_i - \text{median})}{\text{MAD}}$$

A data point is typically flagged as a potential outlier when $|M_i| > 3.5$. This method is more reliable than the traditional Z-score approach (which uses mean and standard deviation) because:

  • The median and MAD used to calculate the threshold are themselves robust to outliers
  • It avoids the masking effect where multiple outliers inflate the standard deviation, hiding other outliers
  • It works effectively for non-normal distributions

Real-World Applications

  • Finance: Assess risk and volatility in asset returns robustly, especially when market data contains extreme events or tail risks.
  • Quality Control: Monitor manufacturing process variability without being misled by occasional measurement errors or equipment malfunctions.
  • Anomaly Detection: Identify unusual patterns in sensor data, network traffic, or system metrics where normal operations may occasionally produce extreme values.
  • Medical Research: Analyze patient outcomes and treatment effects in datasets that may contain unusual responses or recording errors.
  • Environmental Science: Evaluate pollution measurements and climate data where natural events can produce extreme readings.

Frequently Asked Questions

What exactly is Median Absolute Deviation?

Median Absolute Deviation (MAD) is a robust measure of statistical dispersion. It is calculated by first finding the median of the dataset, then computing the absolute difference between each value and the median, and finally taking the median of those absolute differences. The formula is: MAD = median(|xi - median(X)|). Unlike standard deviation, MAD is not affected by outliers.

How is MAD different from standard deviation?

MAD uses the median and absolute values, while standard deviation uses the mean and squared differences. This fundamental difference makes MAD much more robust: a single extreme outlier can dramatically inflate standard deviation but barely moves MAD. For normally distributed data, multiplying MAD by 1.4826 gives a consistent estimate of the standard deviation.

Why is the scale factor 1.4826 used with MAD?

The constant 1.4826 is 1/Φ-1(3/4), where Φ-1 is the inverse cumulative distribution function of the standard normal distribution. For normally distributed data, multiplying MAD by 1.4826 yields a consistent estimator of the population standard deviation. This makes scaled MAD directly comparable to standard deviation.

When should I use MAD instead of standard deviation?

Use MAD when your data may contain outliers, is not normally distributed, or when you need a reliable measure of spread that won't be distorted by extreme observations. MAD is particularly valuable in exploratory data analysis, finance, quality control, and any domain where data contamination is possible. If your data is confirmed to be clean and normally distributed, standard deviation is more efficient.

How is MAD used for outlier detection?

MAD is the foundation of the modified Z-score method for outlier detection: Mi = 0.6745 × (xi - median) / MAD. Values with |Mi| > 3.5 are typically flagged as outliers. This approach is more reliable than using standard deviation because the detection threshold itself -- based on the median and MAD -- is not influenced by outliers.

What does a large MAD value indicate?

A large MAD value indicates high dispersion or variability in the dataset -- the data points are spread widely around the median. A small MAD suggests the data points cluster closely around the central value. The robustness assessment in the calculator compares the scaled MAD to the standard deviation to help you interpret whether outliers are affecting your dispersion estimate.