Absolute Difference Calculator
Enter two numbers a and b to get their absolute difference |a−b| — the distance between them — with a step-by-step breakdown.
Symmetric: swapping a and b gives the same answer. The result is always zero or positive.
Boundary box: absolute difference vs percent difference
This tool computes the plain absolute difference |a−b| — the raw gap in the original units, with no division. That is a different metric from percent difference, which divides the gap by the average of the two numbers:
| Absolute difference (this tool) | Percent difference (#318 percent-difference-calculator) | |
|---|---|---|
| Formula | |a − b| | |a − b| / ((a+b)/2) × 100 |
| 10 vs 14 | 4 | 33.33% |
| 80 vs 90 | 10 | 11.76% |
| Use when | the actual size of the gap matters (points, dollars, degrees) | the relative size of the gap matters |
If you need the relative (percentage) version, use our percent difference calculator.
Related: the absolute value calculator computes |x| for a single number (its distance from 0).
Worked examples
Step 1: 10 − 14 = −4 • Step 2: |−4| = 4Absolute difference = 4. (Percent difference would be 33.33%.)
Step 1: −5 − 8 = −13 • Step 2: |−13| = 13Absolute difference = 13.
Step 1: 7.5 − 2.25 = 5.25 • Step 2: |5.25| = 5.25Absolute difference = 5.25.
All examples recomputed against the tool's exact reference oracle.
Where absolute difference is used
Frequently asked questions
What is the absolute difference?
The absolute difference is the distance between two numbers on the number line: how far apart they are, ignoring direction. It is always zero or positive. For 10 and 14, the absolute difference is 4.
What is the absolute difference formula?
The formula is |a - b|: subtract the second number from the first, then take the absolute value. Example: |10 - 14| = |-4| = 4.
What is the absolute difference between 10 and 14?
4. Step 1: subtract, 10 - 14 = -4. Step 2: take the absolute value, |-4| = 4. The order does not matter: |14 - 10| = 4 as well.
How do you find the absolute difference of negative numbers?
Use the same formula |a - b|. For -5 and 8: |-5 - 8| = |-13| = 13. The signs do not change the method; the result is still the distance between the two numbers.
Can the absolute difference be negative?
No. By definition it is zero or positive. If the two numbers are equal, for example 5 and 5, the absolute difference is 0.
What is the difference between absolute difference and percent difference?
Absolute difference is the raw gap in the original units: for 10 and 14 it is 4. Percent difference divides that gap by the average of the two numbers: 4 / 12 = 33.33%. Use absolute difference when the actual size of the gap matters (points, dollars, degrees); use percent difference when the relative size matters. Our percent difference calculator computes the relative version.
What is the difference between absolute difference and absolute value?
Absolute value |x| applies to one number: its distance from zero. Absolute difference |a - b| applies to two numbers: the distance between them.
How do I calculate absolute difference in Excel or Google Sheets?
Use the ABS function: =ABS(A1-B1). If A1 contains 10 and B1 contains 14, the formula returns 4.
Free tool by NRTechStudio