Absolute Value Calculator

Calculate the absolute value of a number or mathematical expression

Examples:

  • |-5| = 5
  • |3.14| = 3.14
  • |5 - 12| = 7
  • |2 * 3 - 10| = 4
  • |(8 + 2) / 5| = 2

What it computes

Absolute value strips the sign from a number: |x| equals x when x is zero or positive, and equals -x (its positive mirror) when x is negative. The result is never negative. This tool goes one step further than a plain |x| lookup — it first evaluates a full arithmetic expression (addition, subtraction, multiplication, division, parentheses), then takes the absolute value of that result, so you can feed it a formula instead of a pre-computed number.

Worked example

A machined part is specified at 20 mm wide. A caliper reads 18.3 mm. Typing 18.3 - 20 into the field makes the calculator evaluate the expression to -1.7 first, then report the result as |18.3 - 20| = 1.7. The part is 1.7 mm off spec — the sign (under or over) is discarded because for a tolerance check only the size of the deviation matters.

Input rules

Only digits, a decimal point, the operators + - * /, parentheses, and spaces pass validation — the tool checks the input against that character set before evaluating it, so letters, variables, or functions like sqrt() are rejected outright rather than silently ignored. An unbalanced expression, such as a missing closing parenthesis, returns "Invalid expression" instead of a number.

Where absolute value matters

Direction is irrelevant but magnitude isn't in several everyday calculations: manufacturing tolerances (how far a part deviates from spec in either direction), temperature or elevation swings, GPS or measurement error, and algebra problems built around inequalities like |x - a| ≤ b. In each case, a -3 and a +3 deviation are treated as equally significant.