Skip to content
MasterMath

Absolute Value Calculator

The absolute value of a number, which is its distance from zero — and the distance to any other reference point you choose.

Absolute value

—

Absolute value—
Distance to the reference—
Sign of the number—
Its opposite—

How this was worked out

    The rule

    |x| = x if x ≥ 0, −x if x < 0

    Why it works

    Absolute value strips the sign and leaves the magnitude. Geometrically it is the distance from zero on the number line, and that reading is the one that generalises: |a − b| is the distance between a and b.

    How to do it by hand

    1. If the number is positive or zero, leave it alone
    2. If it is negative, change the sign
    3. For the distance between two numbers, subtract and take the absolute value
    4. The result is never negative

    What is worth knowing

    Reading it as distance is what makes absolute value useful rather than fussy. |x − 3| < 2 says 'x is within 2 of 3', which is an interval, and that is exactly how limits and error bounds are written throughout analysis. The same idea extends: the modulus of a complex number is its distance from the origin, and the magnitude of a vector is the same notion in more dimensions. The one thing to watch is that |a + b| is not |a| + |b| — it can only be less or equal, which is the triangle inequality.

    Frequently asked questions

    What does absolute value mean?

    The distance from zero, ignoring the sign. |−7| and |7| are both 7.

    Can an absolute value be negative?

    No, never. It is a distance, and distances are not negative.

    How do I find the distance between two numbers?

    Subtract them and take the absolute value: |a − b|. The order does not matter.

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

    Not generally. It is less than or equal, which is the triangle inequality. They are equal only when a and b share a sign.