How this calculation works
Opposite numbers have the same absolute value. The distance from x to another point c is |x−c|.
|x| = distance from 0A worked example
−7 is seven units from zero, so |−7| = 7.
Good to know
Use a real number. The result is always nonnegative.
Reference: OpenStax Prealgebra (opens in a new tab) ↗
Measure distance from zero
Locate −7 on a number line and count the seven unit intervals back to zero. Distance has no direction, so the result is 7. A point at +7 is equally far from zero. The notation |x| expresses this distance and gives the piecewise rule |x| = x for x ≥ 0 and |x| = −x for x < 0.
The second branch explains why entering a negative value gives a positive result. Substituting −7 gives −(−7) = 7. At zero both descriptions agree, giving |0| = 0. The diagram uses equal spacing for each unit so that the two distances can be compared directly.
Use absolute differences for distances
To measure the gap between two readings, subtract them before applying absolute value. Readings of −7 and 3 are |3 − (−7)| = 10 units apart. Taking the absolute values separately and subtracting would produce |3| − |−7| = −4, which answers a different expression.
In the Absolute change in units calculator, a change from 125 to 112 is −13 and its magnitude is 13. Keep the signed change when the direction matters, such as an account balance increasing or decreasing. Use the magnitude when you only need the size of the movement.
A few questions, answered
Can an absolute value be negative?
For a real input the result is always zero or positive. A minus sign outside the bars can make an expression negative, as in −|7| = −7.
Does absolute value round the input?
It changes the sign of a negative input and preserves its magnitude. For example, |−2.75| = 2.75.