About the Absolute Value Calculator
Absolute value is usually taught as "remove the minus sign", which is true and unhelpful. It explains what to do and not what it means, and the moment a question gets harder than |−5| the description runs out.
The better definition is distance from zero. Both 5 and −5 sit five units from zero on the number line, in opposite directions, so both have an absolute value of 5. Direction is discarded; only the gap remains.
That single reframing makes everything else follow. An absolute value can never be negative, because distance cannot be. An absolute value equation usually has two solutions, because two points sit the same distance from zero. The distance between two numbers is an absolute value, which is why it does not matter which one you name first.
This calculator does all three: the absolute value of a number, the distance between two numbers, and the solutions of an equation of the form |ax + b| = c.
How to Use the Absolute Value Calculator
Absolute value of a number takes one number and returns its distance from zero, noting which side of zero it started on.
Distance between two numbers takes two values and returns the gap. Order does not matter, and the working demonstrates that by showing the reverse subtraction.
Solve |ax + b| = c takes the three coefficients of an absolute value equation and returns both solutions. It handles the two special cases correctly: when c is zero there is only one solution, and when c is negative there are none at all.
How Absolute Value Is Calculated
The definition is a two-case rule:
|x| = x when x >= 0
|x| = -x when x < 0
The second line is the one that confuses people, because -x looks negative. It is not. If x is −5, then −x is −(−5), which is 5. The negation is what makes the result positive.
Distance between two numbers is the absolute value of their difference. Subtraction carries a direction — 3 − 8 is −5, while 8 − 3 is 5 — but the gap between them is 5 either way. Taking the absolute value discards the direction and leaves the distance.
Equations work by splitting into cases. If |something| = 7, then that something is either 7 or −7, because both are seven units from zero. Solve each case separately and you get two answers.
Two special cases fall straight out of the definition. If the right-hand side is zero, the two cases collapse into one, because zero has no second side. If the right-hand side is negative, there is no solution at all — no point sits a negative distance from anywhere.
Absolute Value Formula
Absolute value:
|x| = x if x >= 0
= -x if x < 0
Equivalently:
|x| = sqrt( x^2 )
Distance between two numbers:
d = |a - b| = |b - a|
Solving |ax + b| = c:
c < 0 -> no solution
c = 0 -> x = -b / a
c > 0 -> x = (c - b) / a or x = (-c - b) / a
The square-root form is worth noticing. Squaring makes any number positive and the principal square root returns the positive value, so the round trip strips the sign. It is how absolute value is often defined formally, and it is why |x|² and x² are the same thing.
Step-by-Step Example
Solve |2x − 3| = 7.
Step 1 — split into two cases. Whatever is inside the bars sits 7 units from zero, so it is either 7 or −7:
2x - 3 = 7 or 2x - 3 = -7
Step 2 — solve the positive case.
2x - 3 = 7
2x = 10
x = 5
Step 3 — solve the negative case.
2x - 3 = -7
2x = -4
x = -2
Step 4 — check both. With x = 5: |2(5) − 3| = |7| = 7. ✓ With x = −2: |2(−2) − 3| = |−7| = 7. ✓
Both work, and they are genuinely different answers. Solving only the first case — which is the most common error here — finds 5 and misses −2 entirely.
Now the distance mode, using a case where signs make it easy to slip. How far apart are −3 and 8?
Step 1: -3 - 8 = -11
Step 2: |-11| = 11
Eleven units. Subtracting a positive from a negative gave a result larger in magnitude than either number, which is correct — the two values sit on opposite sides of zero, so the gap spans both distances.
Understanding Your Result
In value mode the result is the distance from zero, and the detail line says which side the original number was on — information the absolute value itself discards.
In distance mode the result is the gap. It is never negative, and it is identical whichever order you entered the numbers.
In equation mode you normally get two solutions, shown in ascending order, with the gap between them noted. That gap is always 2c / |a|, because the two solutions sit symmetrically around the point where the inside expression is zero.
Three outcomes are possible and all are correct:
- Two solutions — the usual case, when c is positive.
- One solution — when c is zero, because the two cases coincide.
- No solution — when c is negative. This is a real answer, not an error. An
absolute value cannot be negative, so nothing satisfies the equation.
When Should You Use This Calculator?
Algebra homework. Absolute value equations are a standard topic, and forgetting the second case is the standard mistake.
Measuring error or deviation. How far a reading sits from a target, regardless of direction. This is the same absolute error that appears in percent error.
Tolerance checks. "Within 0.5 of the specification" is |measured − target| ≤ 0.5, and the distance mode answers it directly.
Comparing positions. Distance on a number line, on a timeline, or between coordinates on one axis.
Temperature and elevation differences, where values run either side of zero and the difference is what matters, not the direction.
Programming. Checking what a language's abs does with edge cases, or reasoning about a comparison that should ignore sign.
Common Mistakes
Solving only one case. |2x − 3| = 7 has two answers. Finding 5 and stopping misses −2. Always split the equation before solving.
Thinking −x is negative. In the definition |x| = -x when x < 0, the minus sign negates an already-negative number, producing a positive one. It is not a sign error.
Expecting a solution when c is negative. |x + 1| = −4 has no solution. This is the correct answer, and writing "no solution" is the complete response.
Distributing across the bars. |a + b| is not |a| + |b|. Try a = 3 and b = −5: the left side is 2, the right side is 8. The bars are not brackets.
Cancelling the bars before isolating them. Get the absolute value alone on one side first. In 3|x − 1| = 12, divide by 3 to reach |x − 1| = 4 before splitting.
Forgetting absolute value when measuring a gap. Reporting a distance of −5 is a sign that the subtraction was done and the absolute value was not.
Confusing it with rounding or truncation. Absolute value changes the sign and nothing else. |−2.7| is 2.7, not 2 or 3.