Absolute Value Calculator

Absolute Value Calculator

The absolute value of a number is its distance from zero, so it is never negative: |-7.5| and |7.5| are both 7.5. This calculator does two jobs. Type an integer, a decimal or a fraction such as -3/4 to get |x|, or enter a, b and c to solve the equation |ax + b| = c. For the equation it tells you whether there are two solutions, one or none, and writes out the working, including a check of each answer.

How to use the absolute value calculator

  1. 1

    Pick what to calculate

    Choose the absolute value of a single number, or the equation |ax + b| = c.

  2. 2

    Enter your numbers

    For |x| type one number. For the equation type a, b and c. Decimals take a dot or a comma, fractions are written p/q, and a cannot be 0.

  3. 3

    Read the answer and the working

    The result page shows |x|, or the solutions of the equation, followed by the steps and a check that each solution works.

How absolute value works

The absolute value of x, written |x|, equals x when x is zero or positive, and equals -x when x is negative. In other words it removes the sign and keeps the size. On a number line it is the distance between x and 0.

Examples

Number Absolute value Why
12 12 Already positive
-7.5 7.5 Drop the minus sign
-3/4 3/4 (0.75) Fractions work the same way
0 0 Zero has no sign

Solving |ax + b| = c

Because |u| = c only makes sense when c is not negative, the number of solutions depends on c:

Value of c Solutions What to do
c < 0 None An absolute value cannot be negative
c = 0 One Solve ax + b = 0, so x = -b / a
c > 0 Two Solve ax + b = c and ax + b = -c

Worked example: solve |2x + 1| = 5. Split into 2x + 1 = 5, which gives x = 2, and 2x + 1 = -5, which gives x = -3. Check: |2(2) + 1| = 5 and |2(-3) + 1| = |-5| = 5.

Common mistakes

  • Treating |a + b| as |a| + |b|. The two are equal only when a and b have the same sign.
  • Forgetting the second case. When c is positive there are always two answers.
  • Dropping a negative coefficient. In |-2x + 3| = 7 the number a is -2, not 2.
  • Expecting a solution when the right side is negative. |x| = -4 has none.

Frequently Asked Questions

It is the same number without the minus sign. The absolute value of -9 is 9, and the absolute value of -2/5 is 2/5, or 0.4 as a decimal. The absolute value of zero is zero.

Two when c is positive, one when c is zero and none when c is negative. This calculator tells you which case applies and, for two solutions, lists both in ascending order.

Yes. Write a fraction as p/q, for example -3/4, and a decimal with a dot or a comma, for example -2.5 or -2,5. A fraction result is reduced to lowest terms, and decimal results are shown to at most six decimal places.

If a is 0 the equation |ax + b| = c no longer contains x, so there is nothing to solve for: |b| = c is either always true or never true. The calculator asks for a non-zero a.

No. The numbers you type are sent to our server to work out the result, and they are added to the page link as you move between steps so a calculation can be bookmarked or shared. They are not saved to any account or profile.

Related Tools

Tool available in other languages