Skip to content
Math

Absolute Value Calculator

Find the absolute value of any number, solve absolute value equations and inequalities, or calculate the distance between two points on a number line. Pick a mode, enter your values, and see every step of the work.

Your details

Choose the type of absolute value problem to solve.
Enter any real number, positive or negative.
Absolute value |x|7.5 units from zero
7.5
Original signNegative
Negative counterpart (-|x|)-7.5
Distance |a - b|-
Midpoint (a + b) / 2-
Solution x1-
Solution x2-
Equation result-
Solution set-
Lower bound-
Upper bound-
|x| (positive)7.5
-|x| (negative counterpart)-7.5

|-7.5| = 7.5.

  • The original number was negative; absolute value keeps only the magnitude.
  • Both +7.5 and -7.5 share this same absolute value.
  • Absolute value answers "how far from zero?", not "in which direction?".

Formula

x={xif x0xif x<0,ab=distance between a and b|x| = \begin{cases} x & \text{if } x \ge 0 \\ -x & \text{if } x < 0 \end{cases}, \quad |a-b| = \text{distance between } a \text{ and } b

Worked example

Basic: |(-7.5)| = 7.5 because -7.5 is negative, so we negate it. Distance: |(-3) - 5| = |-8| = 8. Equation: |2x - 3| = 7 splits into 2x - 3 = 7 (x = 5) and 2x - 3 = -7 (x = -2). Inequality: |x - 2| < 5 gives -5 < x - 2 < 5, so -3 < x < 7.

What absolute value means

The absolute value of a number is its distance from zero on the number line, written with vertical bars as |x|. Distance is never negative, so the result is always zero or a positive number regardless of the input sign. For a positive number the absolute value is the number unchanged. For a negative number it is the number with its minus sign removed. Because |x| only measures magnitude, both a number and its opposite, such as 6 and -6, share the same absolute value of 6. The concept generalises naturally: |a - b| gives the distance between any two points a and b on the number line, without caring which is larger.

Solving absolute value equations

An absolute value equation such as |ax + b| = c has two cases unless c is zero. In the first case the expression inside the bars equals c, giving ax + b = c. In the second case it equals -c, giving ax + b = -c. Solve each linear equation separately to get two solutions. If c is negative there are no real solutions, because an absolute value can never be negative. If c is zero both cases collapse to the same equation and there is exactly one solution. Always substitute each answer back into the original equation to verify it.

Solving absolute value inequalities

Absolute value inequalities split based on direction. When you have |ax + b| < c (a "less than" inequality) the solution is a bounded interval: -c < ax + b < c, which you solve as a compound inequality to get a range of x values. When you have |ax + b| > c (a "greater than" inequality) the solution is an unbounded union: ax + b < -c or ax + b > c, which you solve as two separate inequalities. In both cases you divide by a at the end, remembering to flip the inequality sign if a is negative. The calculator shows the critical boundary values and the full solution set.

Where absolute value is used

Absolute value appears wherever size matters but direction does not. In statistics it underlies the mean absolute deviation, a measure of spread that averages how far data points fall from the mean. In physics it converts a signed displacement into a distance, or a velocity into a speed. Engineers use it to express tolerances: |measured - expected| <= tolerance means the reading is acceptable whether it falls above or below the target. The distance formula on the number line, |a - b|, generalises in higher dimensions to the Euclidean distance between two points.

Absolute value quick reference

Problem typeFormNumber of solutionsNotes
Single number|x|One result (>= 0)Always non-negative
Distance|a - b|One result (>= 0)Same as |b - a|
Equation (c > 0)|ax + b| = cTwo solutionsx = (c-b)/a and x = (-c-b)/a
Equation (c = 0)|ax + b| = 0One solutionax + b = 0
Equation (c < 0)|ax + b| = cNo real solutionAbsolute value is never negative
Inequality (less than)|ax + b| < cBounded interval-c < ax + b < c
Inequality (greater than)|ax + b| > cTwo unbounded raysax + b < -c or ax + b > c

Common patterns and how the calculator handles each case.

Frequently asked questions

Can an absolute value ever be negative?

No. Absolute value measures distance from zero, and distance is never negative. The result of |x| is always zero or a positive number, even when the input is negative.

What is the absolute value of zero?

It is zero. Zero is already at the origin of the number line, so its distance from zero is nothing. Zero is the only number whose absolute value equals the number itself.

Why do |5| and |-5| give the same result?

The numbers 5 and -5 lie the same distance from zero in opposite directions. Absolute value ignores direction and keeps only the magnitude, so both return 5.

How many solutions does an absolute value equation have?

When the right-hand side c is positive there are typically two solutions, because the expression inside can equal either c or -c. When c is zero there is exactly one solution. When c is negative there are no real solutions, because an absolute value can never be negative.

What is the difference between a "less than" and "greater than" absolute value inequality?

A "less than" inequality, such as |x| < 5, gives a bounded interval of solutions (here -5 < x < 5) because x must be close to zero. A "greater than" inequality, such as |x| > 5, gives an unbounded union of two rays (here x < -5 or x > 5) because x must be far from zero.

How does the distance mode differ from just subtracting two numbers?

Subtracting gives a signed result: 3 - 8 = -5, meaning 3 is below 8. The distance |3 - 8| = 5 gives the magnitude without the sign, which is the same regardless of which point you subtract from which. The calculator also shows the midpoint between the two values.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…