Absolute Difference Calculator

Enter two numbers, quickly compute the absolute value of their difference.

Absolute Difference Calculate: |X - Y| = ?

Result

What Is Absolute Difference?

The absolute difference is the distance between two numbers on a number line, ignoring the sign. It is the absolute value of the difference between the two numbers, ensuring the result is always non-negative. For two numbers \( a \) and \( b \), the absolute difference is expressed as: \( |a - b| \)

How to Calculate Absolute Difference

If two numbers \( a \) and \( b \) are given, the formula to calculate their absolute difference is: \( |a - b| = \text{absolute}(a - b) \) Here, \(\text{absolute}()\) represents the absolute value function. Whether \( a \) is greater than, less than, or equal to \( b \), the result is always non-negative.

Examples

Example 1: Calculate the absolute difference between 15 and 7

Solution:

\( |15 - 7| = |8| = 8 \)

Result: The absolute difference between 15 and 7 is 8.

Example 2: Calculate the absolute difference between 5 and 12

Solution:

\( |5 - 12| = |-7| = 7 \)

Result: The absolute difference between 5 and 12 is 7.

Example 3: Calculate the absolute difference between -4 and 10

Solution:

\( |-4 - 10| = |-14| = 14 \)

Result: The absolute difference between -4 and 10 is 14.

Example 4: Calculate the absolute difference between -6 and -3

Solution:

\( |-6 - (-3)| = |-6 + 3| = |-3| = 3 \)

Result: The absolute difference between -6 and -3 is 3.