Mean Absolute Deviation Calculator
The average distance of every value from the mean, with the divisor and the largest deviation printed beside it.
What the mean absolute deviation calculator does
It averages how far each value sits from the column's mean: MAD = (1/n)·Σ|x − x̄|. The divisor is n, not n − 1, because this describes the column rather than estimating a population parameter; the page prints which divisor it used.
The eight values two, four, four, four, five, five, seven, nine have a mean of 5 and absolute distances of 3, 1, 1, 1, 0, 0, 2 and 4. Their sum is 12, so the mean absolute deviation is 12 ÷ 8 = 1.5, and the largest distance is 4, from the value 9 on line 8.
The page also prints the sum of the distances and the line the largest one came from, so the arithmetic can be checked against the column. It reads one value per line, up to 20 000 values, and refuses a token that is not a number by naming its line. An empty column is refused rather than answered with zero.
This is not the median absolute deviation, which is measured from the median and is what the outlier page uses; the mean is the centre here and the page says so.
Figures print to up to four decimal places with trailing zeros trimmed.
How to use it
Paste the column into the text box, one value per line.
Press Run. The result prints the count, the mean, the sum of the distances, the mean absolute deviation and the largest deviation with its line.
Worked example
Input:
2
4
4
4
5
5
7
9
Output:
Mean: 5
Sum of absolute deviations: 12
Mean absolute deviation: 1.5 (Σ|x − x̄| ÷ n)
Largest deviation: 4 (from 9, line 8)
Why it runs in your browser
The sum and the division run in this tab. Your column is never uploaded.
The page averages how far each value sits from the mean of the column. The eight values two, four, four, four, five, five, seven, nine have a mean of 5 and absolute distances of 3, 1, 1, 1, 0, 0, 2 and 4, so the mean absolute deviation is 12 ÷ 8 = 1.5.
The divisor is n, not n − 1. This is a description of the column in front of you, not an estimate of a wider population, and the result says which divisor it applied.
The sum of the distances and the line the largest distance came from are printed too, so every figure can be checked against the data rather than trusted.
Why the divisor is n and not n − 1
A mean absolute deviation describes the spread of the values you pasted. Bessel's correction exists to make a sample variance an unbiased estimate of a population variance, and this page is not estimating one: it is reporting the average distance in this column. That is why the divisor is n.
The sample standard deviation on the descriptive-statistics page divides by n − 1 and says so. The two numbers are different statistics, not two spellings of one, and comparing them without noticing the divisor is the usual error.
Mean absolute deviation is not median absolute deviation
The centre here is the arithmetic mean. The outlier-detection page uses the median absolute deviation as the input to a modified z-score, and the two are different: a single extreme value moves the mean and therefore every distance in this page, while the median barely moves.
Neither is wrong. The mean version follows the ordinary standard deviation, and the median version is robust to outliers. The page states which one it computes so a figure is not carried into the wrong context.
How to use Mean Absolute Deviation Calculator
Paste the column into the text box, one value per line; blank lines are skipped.
Press Run. The result prints the count, the mean, the sum of the absolute distances, the mean absolute deviation and the largest distance with its line number.
What to Expect
Best for
- Describing how tightly a column clusters around its mean
- Checking a spread by hand from a short list of numbers
- Comparing two columns of the same size on the same centre
Not ideal for
- A column with one extreme value, where the median absolute deviation is the robust choice
- Estimating a population parameter, which needs n − 1 and a different claim
- Values with units that differ between the two columns being compared
What this tool keeps
- Every value you pasted, in the order you pasted it
- The line number of the largest distance
What may need cleanup
- Comma-separated input, which has to become one value per line first
- A header row or a note in the column, which is refused as a non-number
Common errors
- Reading the result as a sample estimate rather than a description of the column
- Confusing it with the median absolute deviation on the outlier page
Example use cases
- Summarising a set of repeated measurements
- Teaching the difference between mean and median centring
- Spotting which observation contributes most of the spread
Sample input
The eight values 2, 4, 4, 4, 5, 5, 7 and 9, one per line.
Sample output
A mean of 5, a sum of absolute deviations of 12, a mean absolute deviation of 1.5 and a largest deviation of 4 from the value 9 on line 8.
Who this is for
- Students learning measures of spread
- Anyone checking a column of repeated measurements
Frequently asked questions
Why is the mean absolute deviation of this column 1.5?
The mean is 5, and the eight distances from it are 3, 1, 1, 1, 0, 0, 2 and 4. They sum to 12, and 12 divided by 8 is 1.5. The sum and the count are both printed so the division can be repeated.
Should I divide by n or by n − 1?
By n, for this page, because it describes the column you pasted. The n − 1 divisor belongs to a sample variance estimating a population variance, which is a different claim and is served by the descriptive-statistics page.
How is this different from the outlier page?
The outlier page measures distances from the median (the median absolute deviation) because it is looking for values that do not fit. This page measures from the mean, so a single extreme value moves every distance and the result.
What happens if a line is not a number?
The page refuses the run and names the line and the text it read. Nothing is dropped silently, because a dropped value would change the mean and every distance in the answer.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.