Home/Calculators/Math/Absolute Value Calculator

Absolute Value Calculator

Find the absolute value of any number — instant and free.

absolute-value-calculator
Result
—
In summary: The absolute value of a number x, written |x|, is its distance from zero, always zero or positive. For x = −7, |−7| = 7. Positive numbers and zero keep their value.

What is absolute value

The absolute value of a number x, written |x|, is its distance from zero on the number line — always zero or positive. For example, |−7| = 7 and |7| = 7, because both are 7 units from zero.

Distance has no direction, so 7 and −7 sit the same number of steps from the origin and share one absolute value. Absolute value is also what makes distance work on a number line — the one-dimensional version of the distance formula.

How absolute value is defined

Formally, |x| = x when x is zero or positive, and |x| = −x when x is negative. Taking the negative of a negative number makes it positive, which is why |−7| = 7. It strips the sign while keeping the magnitude.

One common mistake is treating the bars as ordinary brackets: |−3 + 1| is |−2| = 2, not 3 + 1. Always finish the arithmetic inside the bars first, and remember the output is never below zero. Because |x| equals the positive square root of x squared, you can get the same answer by squaring the input and using the square root calculator.

  • |x| = x for x greater than or equal to zero
  • |x| = −x for x less than zero
  • |x| = 0 only when x = 0

Where absolute value is used

Absolute value measures size regardless of direction — useful for distances, errors and deviations. It appears in the percent difference calculator, which uses |a − b| to compare two values.

In measurement work you often care only about how far off a reading is, not whether it was high or low, so error terms are wrapped in bars before being averaged. In geometry, the distance between two points on a line is |a − b|. A larger absolute value means a bigger gap; a value near zero means the two quantities are nearly identical.

Frequently asked questions

What is the absolute value of −7?
The absolute value of −7 is 7, since it is 7 units away from zero.
Can absolute value be negative?
No. Absolute value is always zero or positive because it represents a distance.
What is the absolute value of zero?
The absolute value of zero is zero.
How is |x| written in math?
Absolute value is written with vertical bars around the number, like |x| or |−7|.
Does |a − b| give the same answer as |b − a|?
Yes, both give the same result. The bars remove the sign, so the order of subtraction does not matter and |3 − 10| = |10 − 3| = 7. That is why absolute value is used for distances and gaps between two values.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: July 27, 2026 · Calculations run in your browser. Estimates for information only.