Absolute Difference — Definition, Formula & Examples
Absolute difference is the positive distance between two numbers, found by subtracting one from the other and taking the absolute value. It tells you how far apart two numbers are, regardless of which is larger.
The absolute difference of two real numbers and is defined as , which equals and is always greater than or equal to zero.
Key Formula
Where:
- = The first number
- = The second number
- = Absolute value, which makes the result non-negative
How It Works
To find the absolute difference, subtract one number from the other, then take the absolute value of the result. The order of subtraction does not matter because the absolute value removes any negative sign. For example, the absolute difference between 3 and 10 is the same as the absolute difference between 10 and 3 — both give 7.
Worked Example
Problem: Find the absolute difference between −8 and 5.
Subtract: Subtract the second number from the first.
Take absolute value: Apply absolute value to remove the negative sign.
Answer: The absolute difference between −8 and 5 is 13.
Why It Matters
Absolute difference shows up whenever you need to measure how far apart two values are. In statistics, mean absolute deviation uses it to measure data spread. In programming and science, error calculations rely on absolute difference to compare measured values to expected ones.
Common Mistakes
Mistake: Getting a negative answer because you subtracted the larger number from the smaller and forgot the absolute value.
Correction: Always apply absolute value after subtracting. Alternatively, subtract the smaller number from the larger — either way, the result should be non-negative.
