Statistics
How To Calculate The Mean Absolute Deviation
The mean absolute deviation measures the typical distance of observations from their mean, in the same units as the data. This page shows the four-step calculation using five fixed values, explains why absolute values are essential, and compares the result with the better-known standard deviation.
Last updated
Quick Answer
MAD = Sum|xi - mean| / n
- xi
- Each individual observation in the data set
- mean
- The arithmetic average of all observations
- n
- The number of observations
- MAD
- The mean absolute deviation, in the units of the data
Find the mean, subtract it from every value, take the absolute value of each difference, add those differences, then divide by the number of values. For 2, 4, 4, 4 and 5 the mean is 3.8, the absolute deviations are 1.8, 0.2, 0.2, 0.2 and 1.2, their sum is 3.6, and the mean absolute deviation is 0.72. If every distance doubled, the result would be 1.44.
What Is The Mean Absolute Deviation?
The mean absolute deviation, often shortened to MAD, is the average distance between the values in a data set and their mean. It answers a question that the mean alone cannot: how spread out are the observations around that centre? Take the five values 2, 4, 4, 4 and 5. Their mean is 3.8, and the mean absolute deviation is 0.72, meaning a typical observation sits a little under three quarters of a unit from the average. Because it is measured in the same units as the data, the number is easy to explain to a non-specialist audience. A report can say that a typical value is 0.72 units from the average without any talk of squares or roots, which is a genuine practical advantage.
The calculation has four moves. First add the values and divide by the count to find the mean. Second subtract that mean from every value, giving signed distances. Third replace each signed distance with its absolute value, so nothing cancels. Fourth average those absolute distances by dividing by the count. For our five values the signed distances are -1.8, 0.2, 0.2, 0.2 and 1.2; their absolute versions sum to 3.6, and dividing by five gives 0.72.
The absolute value is not decorative; it is the whole point. Signed deviations from the mean always sum to zero, because the mean is defined as the balance point of the data. Averaging them directly would therefore report zero spread for every data set imaginable. Taking absolute values keeps the size of each departure while discarding its direction, so a value two units below the mean contributes exactly the same as one two units above it. That is precisely what a measure of typical distance should do.
Squaring is the alternative most statistics texts prefer, because squares are smooth and lead to the variance and standard deviation. Those quantities underpin almost all inferential statistics. The trade-off is that squaring magnifies extreme observations: a distance of ten counts for a hundred, while a distance of one counts for one. The mean absolute deviation uses each distance at face value, so a single outlier pulls it up less dramatically than it pulls up the standard deviation. This is why analysts describe MAD as more robust to outliers. The difference becomes pronounced with long-tailed data, where one extreme reading can dominate a standard deviation while leaving the mean absolute deviation comparatively steady.
There is also a divisor choice to keep straight. This page divides by n, treating the five values as the entire set of interest, which is the natural convention for a descriptive summary. Some textbooks use the median in place of the mean, a quantity called the median absolute deviation, and that variant is even more resistant to extreme values. The two are distinct measures and should never be mixed in the same report. Always state which centre and which divisor you used.
Units are another reason the measure is popular in applied work. If the observations are measured in minutes, the mean absolute deviation is in minutes; if they are kilograms, it is in kilograms. Contrast that with variance, which is expressed in squared minutes or squared kilograms and cannot be compared directly with the mean. Because the result shares the scale of the original data, a MAD of 0.72 can be read against a mean of 3.8 and judged large or small in context. No back-transformation is needed.
The measure also behaves predictably under rescaling. If every distance from the mean doubled, the mean absolute deviation would double as well, rising here from 0.72 to 1.44. If a constant were added to every value, the mean would shift by the same amount and every distance would be unchanged, so MAD would stay at 0.72. At the opposite extreme, if all five values were identical, every distance would be zero and MAD would be exactly 0. These properties make it easy to sanity-check a result.
In practice the mean absolute deviation turns up wherever a plain-language measure of error is wanted. Forecasting teams report the mean absolute error, which is the same idea applied to predicted versus actual values, because it is measured in the units of the forecast. Quality control uses it to describe typical variation around a target. It also appears in education and psychology when a researcher wants a spread figure that a non-technical audience can interpret without a square root. In each setting the attraction is the same: the answer keeps the familiar units of the measurement and can be compared directly with the average itself.
The calculator on this page deliberately uses five fixed values so that every step can be inspected. With 2, 4, 4, 4 and 5 the mean is 3.8, the absolute deviations are 1.8, 0.2, 0.2, 0.2 and 1.2, their total is 3.6, and the final MAD is 0.72. Real data sets can be far larger, but nothing about the method changes: find the centre, take absolute distances, and average them. Knowing the mechanics also helps you spot nonsense outputs, such as a MAD of zero from a visibly scattered set.
Formula
MAD = Sum|xi - mean| / n
Formula page →The average of the absolute distances from the arithmetic mean. Each difference is made positive before it is added, so positive and negative deviations cannot cancel.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| xi | An individual observation | same as data | Subtract the common mean from each of the n observations before taking its absolute value. |
| mean | Arithmetic mean of the observations | same as data | The sum of all values divided by n. Here it equals 3.8. |
| n | Number of observations | count | The divisor used to turn the total absolute deviation into an average. Here n is five. |
mean = Sum(xi) / n
Formula page →The centre about which distances are measured. It must be found before any deviation can be computed.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| Sum(xi) | Total of all observations | same as data | For the five fixed values this total is 19. |
| n | Number of observations | count | Five in the worked example, giving 19 divided by 5, or 3.8. |
MAD(c x xi) = c x MAD(xi), for c >= 0
Formula page →Multiplying every distance from the mean by a positive factor multiplies the mean absolute deviation by the same factor.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| c | Positive scaling factor | factor | With c equal to two, the worked MAD of 0.72 becomes 1.44. |
| MAD(xi) | Mean absolute deviation of the original data | same as data | The baseline spread before scaling, equal to 0.72 for the fixed set. |
How To Calculate The Mean Absolute Deviation
- 1
Find the mean of the values
Add all observations and divide by how many there are. For 2, 4, 4, 4 and 5 the total is 19, and 19 divided by 5 gives a mean of 3.8. This number is the centre from which every distance will be measured, so an error here propagates into every later step.
- 2
Subtract the mean from each value
Work through the observations one at a time and record xi - mean. The five fixed values give -1.8, 0.2, 0.2, 0.2 and 1.2. At this stage the signed results still sum to zero, which is expected and is the reason the next step cannot be skipped.
- 3
Take the absolute value of each deviation
Discard the sign of every difference and keep only its magnitude. The signed list -1.8, 0.2, 0.2, 0.2 and 1.2 becomes 1.8, 0.2, 0.2, 0.2 and 1.2. Negative deviations must not be left negative, or the positive and negative contributions will cancel and destroy the measurement.
- 4
Add the absolute deviations
Sum the five positive distances. Here 1.8 + 0.2 + 0.2 + 0.2 + 1.2 equals 3.6, a quantity sometimes called the total absolute deviation. This total is not yet the answer; it still needs to be shared across the number of observations.
- 5
Divide by the number of values
Divide the total by n to obtain the average distance. With a total of 3.6 and five observations, 3.6 divided by 5 gives 0.72. This final figure is the mean absolute deviation, expressed in the original units. Sanity-check it against the mean of 3.8 before reporting it.
Examples
Example 1: The five fixed values 2, 4, 4, 4 and 5
- x1
- 2
- x2
- 4
- x3
- 4
- x4
- 4
- x5
- 5
| Step | Calculation | Result |
|---|---|---|
| Mean | (2 + 4 + 4 + 4 + 5) / 5 | 3.8 |
| Absolute deviations | abs(2 - 3.8), abs(4 - 3.8) x 3, abs(5 - 3.8) | 1.8, 0.2, 0.2, 0.2, 1.2 |
| Total absolute deviation | 1.8 + 0.2 + 0.2 + 0.2 + 1.2 | 3.6 |
| Mean absolute deviation | 3.6 / 5 | 0.72 |
Result: The mean absolute deviation is 0.72, the average of the five absolute distances.
Example 2: Five identical values 4, 4, 4, 4 and 4
- x1
- 4
- x2
- 4
- x3
- 4
- x4
- 4
- x5
- 4
| Step | Calculation | Result |
|---|---|---|
| Mean | (4 + 4 + 4 + 4 + 4) / 5 | 4 |
| Absolute deviations | Every difference from the mean | 0, 0, 0, 0, 0 |
| Total absolute deviation | 0 + 0 + 0 + 0 + 0 | 0 |
| Mean absolute deviation | 0 / 5 | 0 |
Result: Every value equals the mean, so the mean absolute deviation is 0 and there is no spread at all.
Example 3: The consecutive values 1, 2, 3, 4 and 5
- x1
- 1
- x2
- 2
- x3
- 3
- x4
- 4
- x5
- 5
| Step | Calculation | Result |
|---|---|---|
| Mean | (1 + 2 + 3 + 4 + 5) / 5 | 3 |
| Absolute deviations | abs(1 - 3), abs(2 - 3), abs(3 - 3), abs(4 - 3), abs(5 - 3) | 2, 1, 0, 1, 2 |
| Total absolute deviation | 2 + 1 + 0 + 1 + 2 | 6 |
| Mean absolute deviation | 6 / 5 | 1.2 |
Result: For the consecutive values the mean absolute deviation is 1.2, the mean of 2, 1, 0, 1 and 2.
Calculator
Mean absolute deviation
0.72
- Mean value
- 3.8
- Total absolute deviation
- 3.6
- MAD at doubled spread
- 1.44
Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.
Prefer a full-width tool? Open the The Mean Absolute Deviation calculator page.
Common Mistakes
Averaging the signed deviations without absolute values
Because the mean is the balance point of the data, signed deviations always add to zero. If you skip the absolute value step you will report zero spread for every data set, including obviously scattered ones. Always make each difference positive before summing.
Dividing by the wrong count
The divisor must be the number of observations actually used, which is five on this page. Dividing by four instead, a habit carried over from the sample standard deviation, would turn 3.6 into 0.9 rather than 0.72. The mean absolute deviation described here is a descriptive average and uses n.
Confusing it with the median absolute deviation
The median absolute deviation measures distances from the median, not the mean, and is a different and more robust statistic. Substituting one for the other changes both the centre and the answer. State clearly which version you are using whenever you report the number.
Forgetting the units of the result
The mean absolute deviation is in the same units as the original observations, so a set measured in seconds produces a result in seconds. Writing squared units belongs to variance, not to MAD. Keeping track of units is also the quickest way to notice a formula that has been entered incorrectly.
Assuming outliers affect it exactly as they affect standard deviation
Squaring in the standard deviation gives extreme observations disproportionate weight, while MAD counts each distance only once. A single large value therefore inflates the standard deviation more than it inflates MAD. Quoting the two as if they were interchangeable can badly mislead a reader about tail risk.
FAQ
What does the mean absolute deviation actually tell me?
It gives the average distance of the observations from their mean, in the original units of measurement. A value of 0.72 against a mean of 3.8 says that a typical observation is a little under three quarters of a unit away from the centre. Larger values indicate a more scattered data set, while zero means every observation is identical.
Why not just average the differences from the mean?
Signed differences from the mean always sum to zero, because the mean is defined as the point that balances the positive and negative deviations. Averaging them would report zero spread for every set of numbers. Taking absolute values removes the signs so that each departure contributes its full size.
How is it different from the standard deviation?
Standard deviation squares the deviations, averages them and then takes a square root, which gives extreme values more influence and makes the algebra useful for inference. Mean absolute deviation simply averages the absolute distances. It is easier to interpret and less sensitive to outliers, but it does not support most of the theoretical machinery of statistics.
What happens to the mean absolute deviation if all the values are the same?
It becomes exactly zero. With five identical values of 4, for example, the mean is 4, every difference is zero, the total absolute deviation is zero, and dividing by five still gives zero. A zero result is therefore a clean signal that the data set has no spread at all.
Does it matter that the calculator only uses five values?
No, the method is identical for any sample size: find the mean, take absolute distances, add them and divide by the count. Five fixed values are used so that every intermediate number can be inspected and verified by hand. With more observations you simply have more terms to add before dividing by n.
References
- [1]Wikipedia, Mean absolute deviation — https://en.wikipedia.org/wiki/Mean_absolute_deviation
- [2]Wikipedia, Standard deviation — https://en.wikipedia.org/wiki/Standard_deviation
- [3]Wikipedia, Central tendency — https://en.wikipedia.org/wiki/Central_tendency
