Absolute Value Calculator
The absolute value calculator gives a number's distance from zero, so the answer is never negative: |−7| = 7. Type a number or a whole expression such as 18.3 − 20 and it returns 1.7.
Sources: Wikipedia, OpenStax Intermediate Algebra 2e Updated
Calculate the absolute value of a number or mathematical expression
Absolute value examples
- |-5| = 5
- |3.14| = 3.14
- |5 - 12| = 7
- |2 * 3 - 10| = 4
- |(8 + 2) / 5| = 2
How the absolute value calculator works
Absolute value drops the sign of a number. |x| equals x when x is zero or positive, and −x when x is negative, so the result is never below zero. On a number line it is the distance from zero, whichever side the number sits on.
The calculator first works out the expression you type, with +, −, *, / and brackets, and then takes the absolute value of the result. That means you can enter 18.3 - 20 instead of working out −1.7 yourself first.
How to find the absolute value of an expression
A machined part should be 20 mm wide, and a caliper reads 18.3 mm. How far off is it?
- Work out the expression inside the bars: 18.3 − 20 = −1.7.
- Drop the minus sign: |−1.7| = 1.7.
- Read the answer as a size: the part is 1.7 mm off the specification.
Whether the part is too narrow or too wide does not matter for a tolerance check, only the size of the gap. The same idea gives the absolute error in the percent error calculator and the gap between two values in the percent difference calculator.
What the absolute value calculator accepts
The input may contain digits, a decimal point, the operators + − * /, brackets and spaces. Anything else, such as letters or sqrt(), is rejected before the expression is worked out.
An expression that does not balance, such as a missing closing bracket, returns "Invalid expression" instead of a number. For roots, use the square root calculator first and paste the result here.
Where absolute value is used
Absolute value appears wherever only the size of a difference matters: manufacturing tolerances, temperature swings, measurement error and the gap between two points. In coordinate geometry the horizontal and vertical gaps in the distance between two points calculator are absolute values before they are squared.
In algebra, an inequality such as |x − 5| ≤ 2 means "x is at most 2 away from 5", so x lies between 3 and 7. OpenStax Intermediate Algebra works through this kind of inequality step by step. More tools for signs, sums and rounding are on the arithmetic calculators page.
Absolute Value Calculator: FAQ
Can an absolute value be negative?
No. Absolute value measures a distance, and a distance is zero or positive. |−4| = 4 and |4| = 4. An equation such as |x| = −3 has no solution.
What is the absolute value of 0?
0. Zero is no distance from itself, and it is the only number whose absolute value is 0.
Is absolute value the same as modulus?
Some textbooks call |x| the modulus of x, especially for complex numbers. The modulus calculator on this site finds something else: the remainder after division, as in 17 mod 5 = 2.
Sources
- Wikipedia: Absolute value — definition of |x| as the distance from zero on the real number line (checked October 16, 2026)
- OpenStax Intermediate Algebra 2e, 2.7 Solve Absolute Value Inequalities — absolute value equations and inequalities such as |x − a| ≤ b (checked October 16, 2026)