Mathwords logoMathwords

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 aa and bb is defined as ab|a - b|, which equals ba|b - a| and is always greater than or equal to zero.

Key Formula

Absolute Difference=ab\text{Absolute Difference} = |a - b|
Where:
  • aa = The first number
  • bb = 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.
85=13-8 - 5 = -13
Take absolute value: Apply absolute value to remove the negative sign.
13=13|-13| = 13
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.