Skip to main content
v2026.11,986 entries · CC-BY 4.0

Mean Absolute Deviation: Formula, Worked Example, and How It Differs from Standard Deviation

Mean absolute deviation (average deviation from the mean) explained with a worked example, plus how it differs from standard deviation and the commonly confused median absolute deviation.

Written and maintained by CASRAI Editorial Board

Published · Last updated

On this page

Mean absolute deviation (MAD) — also called the average deviation from the mean, or average absolute deviation — is a measure of statistical dispersion: how far, on average, the values in a dataset sit from the dataset’s own mean. It is calculated by taking the absolute value of each observation’s deviation from the mean, then averaging those absolute deviations. Unlike variance and standard deviation, which square the deviations before averaging, MAD treats every deviation linearly, which is why it is often described as the most intuitive of the common spread statistics: it answers, in the original units of the data, “how far off from the mean is a typical observation?”

The formula for a sample or population of size n, with mean x̄ (or μ for a population), is:

MAD = (1/n) × Σ |xi − x̄|

How to calculate mean absolute deviation

To calculate mean absolute deviation, find the mean of the data, subtract it from every value, drop the minus signs (take absolute values), add those distances up, and divide by the number of values. The result is the average distance of the data from its mean, in the same units as the data. Short answer for the main query: mean absolute deviation is the average of |x − mean| over all values, and it is zero only when every value is identical. A worked example follows below, and the population variance route squares the deviations instead.

Why the absolute value is necessary

Deviations from the mean, left unsigned, always sum to exactly zero — that is a mathematical property of the mean itself, not a coincidence of any particular dataset. Values above the mean and values below it cancel out perfectly when added together, so a simple average of the raw (signed) deviations is always zero and carries no information about spread. Two ways around this exist: take the absolute value of each deviation before averaging (mean absolute deviation), or square each deviation before averaging (variance, and its square root, standard deviation). Both fixes remove the sign problem; they differ in what happens next, which is the comparison the rest of this guide works through.

Worked example: step-by-step calculation

The following is an illustrative dataset, not real research data, used purely to demonstrate the calculation. Take five hypothetical measurements: 4, 7, 9, 12, 13.

  1. Find the mean. (4 + 7 + 9 + 12 + 13) ÷ 5 = 45 ÷ 5 = 9.
  2. Find each deviation from the mean. 4−9 = −5; 7−9 = −2; 9−9 = 0; 12−9 = 3; 13−9 = 4. (Check: −5 −2 + 0 + 3 + 4 = 0, confirming the signed deviations cancel out, as they always do.)
  3. Take the absolute value of each deviation. 5, 2, 0, 3, 4.
  4. Average the absolute deviations. (5 + 2 + 0 + 3 + 4) ÷ 5 = 14 ÷ 5 = MAD = 2.8.

In plain terms: a typical observation in this illustrative dataset sits 2.8 units away from the mean of 9.

Mean absolute deviation vs. standard deviation

Using the same illustrative dataset, compare MAD against variance and standard deviation. Squaring the same five deviations (−5, −2, 0, 3, 4) gives 25, 4, 0, 9, 16, which sum to 54. Dividing by 5 gives a variance of 10.8, and the square root of that, the standard deviation, is approximately 3.29 — noticeably larger than the MAD of 2.8, because squaring amplifies the influence of the larger deviations (the −5 and the 4) relative to the smaller ones. That is the essential contrast between the two statistics:

  • Standard deviation squares each deviation before averaging, which penalizes large deviations disproportionately — a single far-outlying value can move the standard deviation substantially. In exchange, SD has mathematical properties (it is differentiable, and variance is additive across independent variables) that make it the building block for statistical tests such as the t-test, ANOVA, and regression. This is the main reason SD dominates in practice despite MAD being easier to explain: most of inferential statistics is built on variance, not on mean absolute deviation.
  • Mean absolute deviation treats every deviation linearly, so a single extreme value moves MAD by less than it moves the standard deviation. MAD is also more directly interpretable — it is literally the average distance from the mean, with no squaring-and-unsquaring step to explain — which is part of why it appears in introductory statistics teaching and in some forecasting contexts (see below), even though it is rarely the dispersion statistic reported in a research manuscript’s results section.

For data that follows a normal distribution specifically, the two statistics have a fixed relationship: MAD ≈ 0.7979 × SD (equivalently, SD ≈ 1.2533 × MAD). That ratio only holds under normality — it is one more reason to check the shape of a distribution, for example with a histogram or a formal test of the normality assumption, before assuming one dispersion statistic tells you what the other would have shown.

Mean absolute deviation vs. median absolute deviation — a genuinely different statistic

“Mean absolute deviation” and “median absolute deviation” are frequently confused, and both are commonly abbreviated MAD in different literatures — but they are calculated differently and used for different purposes.

  • Mean absolute deviation (this guide’s main subject) takes deviations from the mean, then averages the absolute values of those deviations with another mean.
  • Median absolute deviation (sometimes written MAD or MedAD to disambiguate) takes deviations from the median, then finds the median of those absolute deviations — a median of absolute deviations, not a mean of them. Because both the center point and the averaging step use the median rather than the mean, median absolute deviation is highly resistant to outliers, and it is the version statisticians reach for when the specific goal is robust outlier detection or a robust spread estimate for skewed or contaminated data.

Median absolute deviation is usually reported after multiplying by a scale factor of approximately 1.4826. That constant makes the scaled median absolute deviation directly comparable to a standard deviation when the underlying data is normally distributed — without it, median absolute deviation systematically understates spread relative to SD, because the median absolute deviation of a standard normal distribution is only about 0.6745, not 1.

A second illustrative dataset shows why the distinction matters in practice. Take five hypothetical measurements with one extreme value: 4, 5, 6, 7, 50.

  • Mean absolute deviation: the mean is 14.4. Deviations from the mean are −10.4, −9.4, −8.4, −7.4, and 35.6; their absolute values average to 14.24. The single value of 50 has pulled both the mean and the MAD sharply upward.
  • Median absolute deviation: the median is 6. Deviations from the median are −2, −1, 0, 1, and 44; their absolute values are 2, 1, 0, 1, 44, and the median of that set of absolute deviations is 1. Scaled by 1.4826, that is approximately 1.48 — a spread estimate barely affected by the outlier, because neither the median center point nor the median-of-absolute-deviations step gives the value of 50 any special weight.

The gap between 14.24 and roughly 1.48, on the same five numbers, is the entire practical case for median absolute deviation: when a dataset may contain outliers or heavy-tailed error, a median-based spread estimate keeps working when a mean-based one (whether that is standard deviation or mean absolute deviation) is dominated by the extreme values.

When each measure of spread is appropriate

  • Roughly symmetric data with no major outliers: standard deviation is the conventional default, chiefly because it feeds directly into confidence intervals, t-tests, ANOVA, and regression.
  • Data you need to explain to a non-technical audience, or an intuitive spread check during exploratory analysis: mean absolute deviation is easier to interpret at face value and is common in introductory statistics teaching for that reason.
  • Skewed distributions, small samples, or data suspected to contain outliers or measurement errors: median absolute deviation (scaled) is the more defensible choice, and is widely used as an outlier-detection rule — flagging any observation whose absolute deviation from the median exceeds a chosen multiple of the scaled median absolute deviation (the multiple is an analyst’s convention, not a fixed law, so state it when you report it), a more robust alternative to a rule based on the mean and standard deviation.
  • Forecast accuracy in time series and demand-planning contexts: mean absolute deviation and the related mean absolute percentage error (MAPE) are standard ways to score how far forecasted values fell from actual outcomes, precisely because the linear (not squared) penalty is easier to communicate to a planning audience than a squared-error metric.

Before choosing among these, it is worth establishing what shape the data actually has and what kind of variable you are summarizing — a quantitative (interval or ratio) variable is required for any of these statistics to be meaningful in the first place, and a quick look at a histogram of the data will usually make an outlier or a skew obvious before you calculate anything.

Related: Geometric Mean — The geometric mean is the correct average for growth rates, ratios, and log-normally distributed data — this guide covers the formula, when it beats the arithmetic mean, the geometric standard deviation, a common back-transformation error, and the related harmonic mean.

Relationship to variance and the coefficient of variation

Mean absolute deviation, variance, and standard deviation are all built from the same raw material — deviations from the mean — and differ only in how those deviations are combined. Variance and standard deviation dominate applied statistics not because they are more “correct” than MAD, but because squared deviations have properties MAD’s absolute values lack: variance is additive across independent variables, it is the quantity that ANOVA literally partitions into between-group and within-group components, and it is differentiable everywhere, which matters for the optimization methods behind regression and maximum-likelihood estimation. MAD, built on a non-differentiable absolute-value function, does not fit into that machinery as cleanly, which is the practical reason it stays a secondary, descriptive statistic rather than the basis for inferential methods.

The coefficient of variation (CV) — standard deviation expressed as a percentage of the mean — solves a different problem than any of the statistics above: comparing relative variability across variables measured in different units or on very different scales, where comparing raw MAD, variance, or SD values directly would not be meaningful.

Mean absolute deviation for grouped (frequency) data

When data arrive as a frequency table, each value (or class midpoint) is weighted by how often it occurs: MAD = (1/N) Σ f|x − x̄|, where f is the frequency, x is the value or class midpoint, N is the total frequency and x̄ is the mean of the grouped data (Vedantu). With class intervals the result is an approximation, because every observation in a class is treated as if it sat at the midpoint. Here is an illustrative frequency table, not real research data:

Value (x) Frequency (f) f × x |x − 3.8| f × |x − 3.8|
2 3 6 1.8 5.4
4 5 20 0.2 1.0
6 2 12 2.2 4.4
Total 10 38 10.8

The mean is 38 ÷ 10 = 3.8, so MAD = 10.8 ÷ 10 = 1.08.

Can mean absolute deviation be zero?

Yes, and only in one case: MAD equals 0 when every value in the dataset is identical, because then every value equals the mean and every absolute deviation is 0. If any two values differ, at least one of them must sit away from the mean, so MAD is greater than 0. Conversely, a dataset with a mean of 5 and a MAD of 0 can only be made of values that are all 5, for example 5, 5, 5, 5. MAD is never negative, and the larger it is, the more spread out the values are. A surprisingly large MAD can also be a prompt to look for extreme values with a method such as the IQR rule for outliers.

Mean absolute deviation in forecasting

In forecasting and inventory planning, “MAD” usually means the mean absolute deviation of forecast errors: the average of |actual − forecast| over the periods being checked. It is read like any other MAD, as the typical size of a miss in the original units. Squared-error alternatives such as root mean square error weight large misses more heavily, so the two can rank forecasting methods differently when a few errors are big.

Calculating MAD in R, Python, and Excel

  • R: mean(abs(x - mean(x))) calculates mean absolute deviation directly. (For the standard deviation alternative, see sd() in R.) For (scaled) median absolute deviation, R’s built-in mad(x) function already applies the standard 1.4826 scale factor by default; pass constant = 1 to get the unscaled version. For by-group calculation and na.rm handling of the standard deviation, see standard deviation in R.
  • Python (NumPy/SciPy/pandas): NumPy has no single built-in mean-absolute-deviation function, but it is a one-line calculation: np.mean(np.abs(x - np.mean(x))). pandas Series objects expose .mad() in older versions (removed in pandas 2.0+, so check your version), or the same NumPy one-liner works on a pandas column. SciPy’s scipy.stats.median_abs_deviation(x, scale='normal') returns the scaled median absolute deviation.
  • Excel: AVEDEV(range) calculates mean absolute deviation directly. Excel has no built-in median-absolute-deviation function; it has to be built manually as MEDIAN(ABS(range - MEDIAN(range))) entered as an array formula, then multiplied by 1.4826 if the scaled version is wanted.

Excel AVEDEV: exact behaviour and a checked example

Microsoft documents AVEDEV as returning “the average of the absolute deviations of data points from their mean”, which is the mean absolute deviation of this guide. The syntax is AVEDEV(number1, [number2], …), with up to 255 arguments. If an array or reference argument contains text, logical values or empty cells, those values are ignored, while cells containing zero are included. The result is unscaled and uses the arithmetic mean as the centre, so it is not the median absolute deviation.

Check with the values 4, 5, 6, 7, 5, 4, 3 in cells A2:A8. The mean is 34 ÷ 7 = 4.857. The absolute deviations are 0.857, 0.143, 1.143, 2.143, 0.143, 0.857 and 1.857, which sum to 7.143; dividing by 7 gives 1.0204, the value AVEDEV(A2:A8) returns (Microsoft’s documentation shows 1.020408 for this example). Because blank cells are ignored rather than counted as zero, a column with gaps is averaged over the non-empty numeric cells only; a zero typed into a gap changes the result.

Which MAD does my software mean?

The abbreviation MAD is shared by two statistics, and tools differ on three points. The data table below the body compares Excel, R, SciPy, pandas and NIST Dataplot on exactly these. Before reporting a number, check:

  1. The centre. Mean (AVEDEV, the NIST average absolute deviation) or median (R mad, SciPy median_abs_deviation, the NIST median absolute deviation).
  2. The averaging step. A mean of the absolute deviations (mean absolute deviation) or a median of them (median absolute deviation).
  3. The scaling constant. R’s mad() multiplies by 1.4826 by default (constant = 1.4826, described in the R documentation as approximately 1/qnorm(3/4)). SciPy’s function defaults to scale = 1.0 (no scaling) and divides by about 0.67449 only when scale=‘normal’ is requested. The same data therefore gives different numbers in R and SciPy under default settings, by that factor.

R: mad() details

The signature is mad(x, center = median(x), constant = 1.4826, na.rm = FALSE, low = FALSE, high = FALSE) and it computes constant × the median of abs(x − center). If x contains NA the result is NA unless na.rm = TRUE. With a single non-missing value the result is 0. For an even number of values, the low and high arguments select the lo-median or hi-median instead of the average of the two middle values.

SciPy: a warning about center

scipy.stats.median_abs_deviation(x, axis=0, center=None, scale=1.0, nan_policy=‘propagate’, *, keepdims=False) uses the median as its centre by default. The center argument changes only the centre: passing center=np.mean yields the median of the absolute deviations around the mean, which is neither the mean absolute deviation nor the standard median absolute deviation. For the mean absolute deviation use np.mean(np.abs(x – np.mean(x))). The nan_policy argument accepts ‘propagate’ (default), ‘omit’ or ‘raise’.

pandas: why .mad is missing

The pandas 2.0.0 release notes list “Removed the deprecated method mad from pandas classes”. Code calling Series.mad() or DataFrame.mad() on pandas 2.0 or later raises an error; use the NumPy expression above, applied to the column’s values.

Naming in NIST references

NIST’s e-Handbook of Statistical Methods defines the median absolute deviation as the median of |Yi − median| and the average absolute deviation as the sum of |Yi − mean| divided by N. It notes that the average absolute deviation is less affected by extreme observations than the variance and standard deviation, and that for long-tailed data the median absolute deviation or the interquartile range gives a more stable measure of spread than the standard deviation. In its normal-sample example the unscaled median absolute deviation is 0.681 against a standard deviation of 0.997.

NIST Dataplot keeps the two statistics as separate commands: AVERAGE ABSOLUTE DEVIATION (mean centre) and AVERAGE ABSOLUTE DEVIATION FROM THE MEDIAN. Dataplot documents that, before its 2014/07 version, the AVERAGE ABSOLUTE DEVIATION command used the median as the centre; this was corrected to the mean. Output from older Dataplot runs labelled as an average absolute deviation therefore needs checking before it is compared with a mean-based value.

Outlier resistance: an example from the SciPy documentation

The SciPy documentation for median_abs_deviation illustrates robustness with a normal sample of 100 values. Before contamination the standard deviation is 0.997 and the median absolute deviation is 0.828. After the first value is replaced by 345.6, the standard deviation rises to 34.42 while the median absolute deviation moves only to 0.832. Mean absolute deviation sits between the two: it is a mean of absolute values, so one extreme point still enters it in proportion to its distance, as the 4, 5, 6, 7, 50 example above showed (14.24 against a scaled median absolute deviation near 1.48).

Common mistakes

  • Reporting R’s default mad() output as if it were the mean absolute deviation; it is the median-based, 1.4826-scaled statistic.
  • Using center=np.mean in SciPy and calling the result mean absolute deviation.
  • Treating blank cells as zeros before AVEDEV, or leaving text in a column and assuming it was counted.
  • Calling .mad() in a pandas 2.x environment.
  • Comparing a mean absolute deviation with a standard deviation as if they were on the same footing; for normal data the ratio is about 0.7979, and elsewhere it is not fixed.

Frequently asked questions

Is mean absolute deviation the same as standard deviation?

No. Both measure spread around the mean, but standard deviation squares each deviation before averaging (then takes a square root to return to the original units), while mean absolute deviation takes the absolute value of each deviation and averages directly. Standard deviation is more sensitive to outliers and is the statistic used throughout inferential statistics; mean absolute deviation is more intuitive to interpret but is not the basis for common statistical tests.

Is mean absolute deviation the same as median absolute deviation?

No, and this is the most common confusion around the term. Mean absolute deviation takes deviations from the mean and averages their absolute values with a mean. Median absolute deviation takes deviations from the median and summarizes those absolute values with a median, not a mean. Median absolute deviation is far more resistant to outliers and is the version typically used for robust outlier detection.

What does a small MAD value mean?

A small mean absolute deviation relative to the scale of the data means observations tend to sit close to the mean — the data is tightly clustered. A large MAD relative to the mean means observations are widely spread. There is no single universal threshold for “small” or “large”; it depends entirely on the units and context of what is being measured.

Why isn’t mean absolute deviation used more often in research reporting?

Largely because standard deviation and variance connect directly to the rest of inferential statistics — confidence intervals, t-tests, ANOVA, and regression are all built on variance — while mean absolute deviation, based on the non-differentiable absolute-value function, does not extend into that framework in the same way. Standard deviation remains the conventional default for reporting spread alongside a mean in most research manuscripts.

When should I use MAD/MAPE instead of a squared-error metric?

In forecasting and demand-planning contexts, mean absolute deviation and mean absolute percentage error are often preferred over mean squared error specifically because the linear penalty is easier to explain to a non-statistical audience and is less dominated by a single large forecast miss — useful when the goal is a practical accuracy readout rather than an input to further statistical modeling.

Can mean absolute deviation be negative?

No. It is an average of absolute values, so it is zero or positive; it is zero only when all values are identical.

Which Excel function gives mean absolute deviation?

AVEDEV, which returns the average of the absolute deviations of data points from their mean and accepts up to 255 arguments. Text, logical values and empty cells inside ranges are ignored.

Why is pandas .mad missing?

The method was removed in pandas 2.0.0 (the release notes list the deprecated method mad as removed). Use np.mean(np.abs(x – x.mean())) instead.

Does SciPy compute mean absolute deviation?

No. scipy.stats.median_abs_deviation computes the median absolute deviation. Passing center=np.mean changes only the centre, so it still does not give the mean absolute deviation.

Does MAD resist outliers?

The median absolute deviation does; in the SciPy documentation example one extreme value moves the standard deviation from 0.997 to 34.42 but the median absolute deviation only from 0.828 to 0.832. The mean absolute deviation is less affected than the standard deviation, but not resistant.

Also on CASRAI: z-scores — How to calculate a z-score, what standardization does (and doesn’t) do to a distribution, and how to correctly read a standard normal (z) table, including a full table.

Sources

Sources (accessed 17 November 2026):

Data: Mean and median absolute deviation functions: defaults in Excel, R, SciPy, pandas and NIST Dataplot

Compares how documented functions in common statistics tools define centre, averaging step and scaling for absolute-deviation statistics, compiled from the official documentation of each tool read on 2026-11-17.

Period covered: 2026.

Mean and median absolute deviation functions: defaults in Excel, R, SciPy, pandas and NIST Dataplot
Tool and functionStatistic computedCentre usedDefault scale or constantMissing-value handlingMaximum direct arguments (count)
Microsoft Excel AVEDEVMean absolute deviationMean of the dataNone (unscaled)Text, logical values and empty cells in arrays/references are ignored; zeros included255
R stats::madMedian absolute deviationMedian (centre argument, default median(x))1.4826 multiplier (constant)NA in x gives NA unless na.rm = TRUEn/a
SciPy stats.median_abs_deviationMedian absolute deviationMedian (center=None); a different centre can be passedDivides by scale = 1.0; scale='normal' divides by about 0.67449nan_policy: propagate (default), omit or raisen/a
pandas Series.mad / DataFrame.madMean absolute deviationMeann/aRemoved in pandas 2.0.0 (deprecated method mad removed)n/a
NIST Dataplot AVERAGE ABSOLUTE DEVIATIONAverage (mean) absolute deviationMean (corrected from median in the 2014/07 version)Nonen/an/a
NIST Dataplot MEDIAN ABSOLUTE DEVIATIONMedian absolute deviationMediann/an/an/a

Sources

Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · full access

Ask about Mean Absolute Deviation: Formula, Worked Example, and How It Differs from Standard Deviation

Full access: large monthly usage, up to 10 source passages behind each answer, and MCP and API access for Claude Code, Codex and other CLIs. Cancel any time.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →