Absolute Value Calculator

Find the absolute value of a number (its distance from 0), or the distance between two numbers, with every step shown.

Absolute value |x|7.25

Any number. It can be negative or a decimal.

Absolute value |x|

7.25

  • Distance from 07.25
  • Opposite −x7.25
  • Sign of xnegative

Absolute value is the distance from zero on the number line, so it is never negative. Inputs are handled as exact decimals.

How this was calculated

  1. First, look at the sign. Is the number below zero (negative) or not?x is negativePut in your numbers: x = −7.25Answer: negative
  2. A negative number is that many steps to the left of 0. Drop the minus sign to get its distance from 0.|x| = −xPut in your numbers: |−7.25| = −(−7.25)Answer: 7.25

Absolute value in simple words

The absolute value of a number is how far it is from 0 on the number line. Distance is never negative, so the absolute value is never negative either. We write it with two straight bars: |x|.

For a positive number, nothing changes: |5| = 5. For a negative number, just drop the minus sign: |−5| = 5. Both 5 and −5 are 5 steps away from 0.

The distance between two numbers works the same way. Take one from the other, then drop any minus sign. For example, the distance between 3 and −2 is |3 − (−2)| = |5| = 5 steps.

What absolute value means

The absolute value of a number is its distance from zero on the number line, so it is never negative. Written |x|, it equals x when x is zero or positive and −x when x is negative: |8| = 8 and |−8| = 8.

The absolute difference |a − b| is the distance between a and b. Because distance has no direction, |a − b| = |b − a|.

Worked examples

|−7.25|: the number is negative, so |−7.25| = −(−7.25) = 7.25.

|3.5 − (−12)|: first a − b = 3.5 + 12 = 15.5, then |15.5| = 15.5. Swapping the order gives −12 − 3.5 = −15.5, whose absolute value is also 15.5.

Exact decimals

The calculator subtracts as exact decimals rather than binary floating point, so |0.3 − 0.1| comes out as exactly 0.2 instead of 0.19999999999999998.

How to use the Absolute Value Calculator

Choose a mode and enter your numbers.

  1. Choose the mode

    Pick absolute value |x| or absolute difference |a − b|.

  2. Enter the numbers

    Type any positive or negative number, including decimals.

  3. Read the result

    See the result with the signed difference and each step.

Frequently asked questions

Can an absolute value be negative?

No. It measures distance from zero, so the smallest possible value is 0, which is the absolute value of 0 itself.

What is the difference between absolute difference and percent error?

Absolute difference is the raw gap |a − b| in the original units. Percent error divides that gap by a reference value and expresses it as a percentage.

Is |a − b| the same as |a| − |b|?

Not in general. For a = 3 and b = −5, |a − b| = 8 but |a| − |b| = −2. The triangle inequality says |a| − |b| ≤ |a − b|.

References

Last updated . Results are estimates for informational purposes only.