Median Absolute Deviation Calculator

JJ Ben-Joseph headshot JJ Ben-Joseph

What Is Median Absolute Deviation (MAD)?

The median absolute deviation (MAD) is a robust measure of how spread out your data are around the median. Unlike the standard deviation and variance, which are based on the mean and square each deviation, MAD is built from medians and absolute differences. This makes it much less sensitive to extreme values or outliers and often more trustworthy when your dataset may contain errors, heavy tails, or rare exceptional cases.

Suppose you have a dataset of numerical observations, such as reaction times, temperatures, or financial returns. If one or two values are very large or very small compared with the rest, the mean and standard deviation can be pulled strongly in their direction. In contrast, the median and MAD largely ignore those extremes, giving you a better sense of what is typical for the bulk of your data.

This calculator processes your numbers directly in your browser. It computes the median, the absolute deviations from that median, the median of those deviations (the MAD), and, for approximately normal data, an estimated standard deviation derived from the MAD. You can use it to quickly assess variability in a way that is resistant to outliers.

Formula for Median Absolute Deviation

Given a dataset of n values:

x1,x2,,xn

the median absolute deviation is defined in two main steps:

  1. Find the sample median, denoted by x~.
  2. Compute the absolute deviations from the median, then take the median of those deviations.

Symbolically, the MAD is

MAD = median|xix~| for i=1,,n.

The same idea can be expressed in MathML as:

MAD = median ( | x i - x ~ | ) for i = 1 , , n

Because this formula uses medians and absolute values instead of squared deviations from the mean, it reacts gently to a small number of extreme values. The units of MAD are the same as the original data (for example, seconds, degrees, or dollars), which makes it straightforward to interpret.

Relationship to Standard Deviation for Normal Data

For a perfectly normal (Gaussian) distribution, there is a simple approximate link between MAD and the standard deviation σ. In many statistical texts, the following rule of thumb is used:

σ1.4826×MAD.

The constant 1.4826 comes from the properties of the normal distribution and makes the scaled MAD roughly comparable to the usual standard deviation when the data are truly normal. When your data are strongly non-normal, this conversion is less exact, but the unscaled MAD is still a meaningful robust spread measure.

How This Median Absolute Deviation Calculator Works

When you enter numbers and run the calculator, it performs the following steps on your dataset:

  1. Parse and clean the input. The tool reads your numbers, ignoring empty entries and trimming spaces. Non-numeric values are skipped or flagged, depending on implementation.
  2. Sort the data. Your values are ordered from smallest to largest to make it easy to compute medians.
  3. Compute the median. If there are n values:
    • If n is odd, the median is the middle value.
    • If n is even, the median is typically taken as the average of the two central values.
  4. Compute absolute deviations. For each data point xi, the calculator finds the distance from the median: |xix~|.
  5. Compute the MAD. The median of the list of absolute deviations is taken. This value is reported as the median absolute deviation.
  6. Estimate standard deviation (optional). Assuming the data are roughly normal, the calculator may also multiply the MAD by 1.4826 to provide an approximate standard deviation.

The results panel typically shows:

How to Use the Median Absolute Deviation Calculator

  1. Enter your data values in the input box, separated by commas, spaces, or line breaks (for example: 2, 4, 4, 4, 5, 5, 7, 50).
  2. Click the button to calculate the statistics.
  3. Review the median, the list of absolute deviations, the MAD, and any approximate standard deviation shown.
  4. Interpret the MAD in the context of your units: small values indicate that most observations cluster closely around the median; large values indicate greater spread.

Worked Example of MAD Calculation

Consider the dataset:

[2, 4, 4, 4, 5, 5, 7, 50]

  1. Sort the data. In this case the numbers are already sorted: 2, 4, 4, 4, 5, 5, 7, 50.
  2. Find the median. There are 8 values (an even number). The two middle values are the 4th and 5th elements: 4 and 5. The median is their average:

    x̃=4+52=4.5.

  3. Compute absolute deviations from the median. For each value, subtract 4.5 and take the absolute value:
    • |2 − 4.5| = 2.5
    • |4 − 4.5| = 0.5
    • |4 − 4.5| = 0.5
    • |4 − 4.5| = 0.5
    • |5 − 4.5| = 0.5
    • |5 − 4.5| = 0.5
    • |7 − 4.5| = 2.5
    • |50 − 4.5| = 45.5

    The list of absolute deviations is therefore:

    [2.5, 0.5, 0.5, 0.5, 0.5, 0.5, 2.5, 45.5]

  4. Find the median of the absolute deviations. Sort the deviations:

0.5, 0.5, 0.5, 0.5, 0.5, 2.5, 2.5, 45.5

Again we have 8 numbers, so the median is the average of the 4th and 5th values. Both are 0.5, so:

MAD=0.5+0.5/2=0.5.

To compare this with a standard deviation under a normal assumption, scale the MAD:

σ^1.4826×0.5=0.7413.

If you computed the classical sample standard deviation for the original data, you would obtain a value around 15.56, heavily inflated by the outlier 50. The MAD-based estimate, 0.7413, better reflects the spread of the main cluster of values around the median of 4.5.

Comparing MAD With Standard Deviation

The table below summarizes how MAD and standard deviation behave for the example and in general.

Statistic Value in Example Key Property
Median (x~) 4.5 Center of the data, not pulled by outliers.
Median Absolute Deviation (MAD) 0.5 Robust spread around the median; ignores the exact size of a single extreme outlier.
Approx. Std. Dev. from MAD 0.7413 Scaled MAD (1.4826 × MAD) for roughly normal data.
Classical Standard Deviation ≈ 15.56 Highly sensitive to extreme values; can exaggerate variability when outliers are present.

In practice, you might use both measures together. Standard deviation is natural when your data are believed to be normally distributed and you are comfortable treating all points, including extremes, as genuine observations. MAD is preferable when you suspect measurement errors, heavy tails, or a few exceptional points that you do not want to dominate your description of variability.

Interpreting Your MAD Result

Once you use the calculator and obtain a MAD value, you can interpret it in the context of your problem:

Assumptions and Limitations

While MAD is a powerful and robust measure of spread, it is important to be aware of the underlying assumptions and practical limitations when using this calculator.

Keeping these points in mind will help you use MAD effectively and interpret the calculator’s output confidently in your own applications.

Results will appear here.

Embed this calculator

Copy and paste the HTML below to add the Median Absolute Deviation (MAD) Calculator – Robust Measure of Spread to your website.