The absolute value of a number is its distance from zero on the number line — always zero or positive. Written |x|, it simply drops the sign: |−7| = 7. The same idea gives the distance between two numbers as |a − b|, which is the same whichever way round you subtract.
Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: the absolute-value definition, recomputed in code.
The definition
If the number is zero or positive, the absolute value is the number itself. If it's negative, you negate it — and negating a negative makes it positive. Geometrically, |x| is how far x sits from zero. The distance between two points on the line is the absolute value of their difference, which is why it doesn't matter which you subtract from which.
Worked examples
A negative number:
A positive decimal and zero:
Distance between −3 and 5:
So |−7| is 7, |8.2| stays 8.2, and −3 and 5 are 8 apart. The absolute value never comes out negative.
Frequently Asked Questions
Its distance from zero, always ≥ 0. |x| = x if x ≥ 0, else −x. |−7| = 7, |8.2| = 8.2.
Drop the minus: |−7| = 7, |−3.5| = 3.5. Same distance from zero as the positive.
|a − b|. Between −3 and 5 → |−8| = 8. Symmetric: |a − b| = |b − a|.
For real numbers, yes. Don't confuse with modulo (remainder) or complex modulus √(re²+im²).
Never. Zero only when the input is zero, positive otherwise. −|x| negates after, separately.