Absolute Difference Calculator

Find the non-negative distance between two numbers. This tool calculates the absolute value of the difference between your inputs.

Formula: |x - y| (Where | | denotes absolute value)
If x = 10 and y = 3: |10 - 3| = 7 If x = -5 and y = 5: |-5 - 5| = |-10| = 10 If x = 2.5 and y = 7.8: |2.5 - 7.8| = |-5.3| = 5.3

What is absolute difference?

Absolute difference is the magnitude of the difference between two real numbers. It represents the distance between two values on a number line, which is always non-negative.

How do I calculate absolute difference?

To calculate the absolute difference between two numbers x and y, you subtract one from the other (x - y) and then take the absolute value of the result, written as |x - y|.

Why is absolute difference always positive?

Because it represents distance. In mathematics, distance between two points cannot be negative, regardless of which point you start from.

Is |x - y| the same as |y - x|?

Yes, the order of the numbers does not matter in absolute difference. |10 - 3| is 7, and |3 - 10| is |-7|, which is also 7.