Math calculators

Absolute Value Calculator

Updated Sep 7, 2026 By Jehan Wadia
Rate Formulas

Evaluate |expression|

Allowed: numbers, + − × ÷ ^ and parentheses. Example: -2*(4-9)
Result

Your result will appear here.

Visual
Step-by-Step Solution

Introduction

Absolute value means distance from zero. It is never negative. So |5| is 5, and |−5| is also 5. Both numbers sit 5 steps away from zero on a number line.

This absolute value calculator handles five kinds of problems:

  • Evaluate: find the absolute value of any expression, like |3 − 10|.
  • Solve Equation: solve problems like |2x − 3| = 7 and get both answers.
  • Solve Inequality: solve |x − 3| < 5 and see the answer in interval, inequality, and set-builder form.
  • Distance: find how far apart two numbers are, plus the midpoint.
  • Graph It: draw y = a|x − h| + k and find the vertex, axis of symmetry, and intercepts.

Type your numbers and press Calculate. You get the answer, a step-by-step solution, and a picture on a number line or graph. Use the Examples button to load a sample problem and see how it works.

How to use our Absolute Value Calculator

Pick a mode, type your numbers or expression, and the calculator shows the answer with a number line or graph plus step-by-step work.

Mode buttons: Choose Evaluate, Solve Equation, Solve Inequality, Distance, or Graph It at the top. The input boxes change to match your choice.

Expression (Evaluate mode): Type what goes inside the bars, like 3 - 10 or -2*(4-9). You can use +, −, ×, ÷, ^, and parentheses, or tap the symbol keys.

a, the coefficient of x (Equation and Inequality modes): Enter the number multiplied by x inside the bars. For |x − 3|, a is 1.

b, the constant inside the bars: Enter the number added or subtracted next to x. For |2x − 3|, b is −3.

c, the right-hand side: Enter the number on the other side of the equals or inequality sign.

Comparison operator (Inequality mode): Click <, ≤, >, or ≥ to set the sign in your inequality.

Point 1 (a) and Point 2 (b) (Distance mode): Enter the two numbers you want the distance between. Negatives are fine.

Unit label (Distance mode): Optional. Type a unit like meters or °C, and it is added to the distance and midpoint.

a, the stretch and direction (Graph It mode): Enter the number in front of the bars. Positive opens the V up; negative opens it down.

h, the horizontal shift: Enter how far the V moves left or right. This is the x-value of the vertex.

k, the vertical shift: Enter how far the V moves up or down. This is the y-value of the vertex.

Show visual and Show steps: Check these boxes to see the number line or graph and the full solution steps.

Calculate, Reset, and Copy Result: Click Calculate to solve, Reset to go back to the starting values, and Copy Result to save the answer.

What Is Absolute Value?

The absolute value of a number is how far that number sits from zero on a number line. Distance is never negative, so an absolute value is never negative. We write it with two straight bars, like |n|. For example, |7| = 7 and |−7| = 7. Both numbers are 7 steps away from zero, just in opposite directions.

The Rule in Plain Words

  • If the number is positive, it stays the same: |5| = 5
  • If the number is negative, drop the minus sign: |−5| = 5
  • If the number is zero, the answer is zero: |0| = 0

When there is math inside the bars, always solve inside first, then take the absolute value. So |3 − 10| = |−7| = 7.

Distance Between Two Numbers

Absolute value is the easy way to find the gap between two points. The distance from a to b is |a − b|. The order does not matter, because |a − b| = |b − a|. For example, the distance from 5 to −3 is |5 − (−3)| = |8| = 8.

Absolute Value Equations

An equation like |ax + b| = c usually has two answers, because two different numbers can be the same distance from zero. You split it into two cases: ax + b = c and ax + b = −c. Two special cases to watch for:

  • If c is negative, there is no solution. An absolute value can never be negative.
  • If c is zero, there is only one answer, since the inside must equal zero.

Absolute Value Inequalities

Think of these as questions about distance:

  • |u| < c means "closer than c to zero." The answer is one interval between two numbers: −c < u < c.
  • |u| > c means "farther than c from zero." The answer is two separate pieces: u < −c or u > c.

Use ≤ and ≥ when the endpoints count. On a number line, a filled dot means the endpoint is included and a hollow dot means it is not.

Graphing y = a|x − h| + k

The graph of an absolute value function is a V shape. The point of the V is called the vertex, and it sits at (h, k). The vertical line x = h is the axis of symmetry, so both sides of the V mirror each other. If a is positive the V opens up; if a is negative it opens down. A bigger |a| makes the V narrower, and a smaller |a| makes it wider.

Where People Use It

Absolute value shows up any time size matters more than direction. Factories use it to check part sizes against a tolerance, like |length − 10| ≤ 0.5. Engineers use it for voltage limits, weather reports use it for temperature swings, and maps use it for elevation gaps between two places. It also shows how far a measurement is off from a target, which is called error.


Formulas used

Definition of absolute value
|n| = \begin{cases} n & n \ge 0 \\ -n & n < 0 \end{cases}
Solutions of |ax + b| = c (for c \ge 0)
x = \frac{c - b}{a} \quad \text{or} \quad x = \frac{-c - b}{a}
Solution of |ax + b| < c (or \le c)
-c < ax + b < c \;\Rightarrow\; x \in \left[\min\left(\frac{c-b}{a}, \frac{-c-b}{a}\right),\; \max\left(\frac{c-b}{a}, \frac{-c-b}{a}\right)\right]
Solution of |ax + b| > c (or \ge c)
ax + b > c \ \text{or} \ ax + b < -c \;\Rightarrow\; x < \min\left(\frac{c-b}{a}, \frac{-c-b}{a}\right) \ \text{or} \ x > \max\left(\frac{c-b}{a}, \frac{-c-b}{a}\right)
Distance between two points on a number line
d = |a - b|
Midpoint of two points
m = \frac{a + b}{2}
Absolute value function in vertex form
y = a\left|x - h\right| + k, \quad \text{vertex } (h,\, k), \quad \text{axis of symmetry } x = h
Intercepts of y = a|x - h| + k
y_{int} = a\left|0 - h\right| + k, \qquad x = h \pm \left(-\frac{k}{a}\right) \ \text{when} \ -\frac{k}{a} \ge 0

Frequently asked questions

Can an absolute value ever be negative?

No. Absolute value is a distance from zero, and distance is never negative. So |−9| = 9 and |9| = 9. The smallest answer you can ever get is 0.

A minus sign outside the bars is different. −|9| = −9, because you take the absolute value first, then flip the sign.

What is the absolute value of 0?

|0| = 0. Zero sits right on top of zero on the number line, so its distance is zero. It is the only number whose absolute value is 0.

Why does an absolute value equation have two answers?

Because two different numbers can be the same distance from zero. If |x| = 4, then x could be 4 or −4.

So for |ax + b| = c you split into two equations:

  • ax + b = c
  • ax + b = −c

Example: |2x − 3| = 7 gives 2x − 3 = 7 (x = 5) and 2x − 3 = −7 (x = −2).

When does an absolute value equation have no solution?

When the number on the other side is negative. |x + 4| = −3 has no solution, because an absolute value can never equal a negative number.

If the other side is exactly 0, you get one answer instead of two. |x − 6| = 0 means x = 6 only.

Is |a − b| the same as |b − a|?

Yes. Both give the same distance between the two numbers. The subtraction flips the sign, but the bars remove it.

Example: |5 − 8| = |−3| = 3 and |8 − 5| = |3| = 3. Order does not matter.

What is the difference between |x| < 5 and |x| > 5?

Think about distance from zero.

  • |x| < 5 means closer than 5 to zero. The answer is one piece in the middle: −5 < x < 5.
  • |x| > 5 means farther than 5 from zero. The answer is two pieces: x < −5 or x > 5.

A helpful memory trick: less than gives an "and" answer, greater than gives an "or" answer.

Do absolute value bars work like parentheses?

Yes, mostly. You finish all the math inside the bars first, then take the absolute value.

Example: |3 − 10| = |−7| = 7. If you wrongly split it, you would get 3 − 10 = −7 with no bars, which is wrong.

Is |a + b| always equal to |a| + |b|?

No. |a + b| is never bigger than |a| + |b|, but it can be smaller.

Example: |3 + (−5)| = |−2| = 2, while |3| + |−5| = 8. They only match when a and b have the same sign, or one of them is 0.

Where is the vertex of y = a|x − h| + k?

The vertex is at the point (h, k). That is the sharp corner of the V.

The line x = h is the axis of symmetry, so both arms of the V mirror each other. Watch the sign: in y = |x + 2|, h is −2, so the vertex is (−2, 0).

What is the domain and range of y = |x|?

The domain is all real numbers, because you can plug in any x. The range is y ≥ 0, because the output is a distance and never goes below zero.

For y = a|x − h| + k, the range is y ≥ k when a is positive, and y ≤ k when a is negative.

How do you find the x-intercepts of an absolute value function?

Set y = 0 and solve. For y = a|x − h| + k, move k over and divide by a to get |x − h| = −k / a.

  • If that number is positive, there are two x-intercepts: x = h ± that number.
  • If it is 0, there is one, right at the vertex.
  • If it is negative, there are none. The V never touches the x-axis.

Why does the square root of x squared equal |x|?

Squaring kills the minus sign, and a square root sign always gives the non-negative answer. So √((−4)²) = √16 = 4, not −4.

That is exactly what absolute value does, so √(x²) = |x| for every real number.

How do you write an absolute value answer in interval notation?

Use round brackets for endpoints that are left out and square brackets for endpoints that count.

  • |x − 3| < 5 gives −2 < x < 8, written (−2, 8).
  • |x − 3| ≤ 5 gives [−2, 8].
  • |x + 2| > 4 gives (−∞, −6) ∪ (2, ∞). The ∪ means "or".

Infinity always gets a round bracket.

What happens if an absolute value inequality is compared to a negative number?

You can answer it without solving. An absolute value is always 0 or more.

  • |x + 1| < −3 has no solution, since nothing is less than a negative.
  • |x + 1| > −3 is true for every real number.

Where is absolute value used in real life?

Anywhere size matters but direction does not:

  • Manufacturing: a part must fit a tolerance, like |length − 10| ≤ 0.5 cm.
  • Electricity: voltage must stay near a target, like |V − 120| ≤ 5 volts.
  • Weather: how far a temperature is from normal.
  • Maps: the elevation gap between two places.
  • Science: error, or how far a measurement is from the true value.