Calculate the absolute value |x| of any number or expression instantly.
Absolute value of a number is its distance from zero on the number line, always expressed as a non-negative number. The absolute value of both +7 and -7 is 7, because both are 7 units from zero. Written as |x|, absolute value appears throughout mathematics, physics, computer science, and everyday calculations involving distances and magnitudes.
|x| = x when x ≥ 0. |x| = -x when x < 0 (negating a negative gives positive). |x| ≥ 0 always — absolute value is never negative. |x × y| = |x| × |y|. |x + y| ≤ |x| + |y| (triangle inequality — fundamental in geometry and analysis). |-x| = |x|.
|x| = 5 means x = 5 or x = -5 (two solutions). |x - 3| = 7 means x - 3 = 7 (x = 10) or x - 3 = -7 (x = -4). |2x + 1| = 9 means 2x + 1 = 9 (x = 4) or 2x + 1 = -9 (x = -5). Always check both solutions by substituting back into the original equation.
Absolute value represents magnitude without direction. Temperature differences: Whether it is 5°C above or below normal, the deviation is |5| = 5 degrees. Financial gains/losses: A stock moving ±10% changes by |10%| = 10% in magnitude. GPS distance: Distance is always positive regardless of direction. Error measurement: |Actual - Estimated| gives the magnitude of error.
The abs() function is one of the most commonly used mathematical functions in programming. In Python: abs(-15) returns 15. In JavaScript: Math.abs(-15) returns 15. Used for: finding the difference between two values regardless of order, checking if values are within a tolerance range, normalizing data, and distance calculations in algorithms and game development.
Absolute value is the distance of a number from zero on the number line, always expressed as a non-negative number. |−5| = 5 and |5| = 5.
Absolute value is represented by two vertical bars around the number, like |x|. For example, |−8| = 8.
No. Absolute value is always zero or positive. It represents distance, which can never be negative.
Absolute value is used in mathematics, physics (distance, speed), programming (error checking), and statistics (mean absolute deviation).