Absolute Value Equation Calculator
Solve |ax + b| = c using the two-case method. Shows both cases, the no-solution check, and a verified step-by-step answer.
Enter the coefficients a, b, and c for the equation |ax + b| = c. The calculator splits it into the two standard cases, solves each one, checks both solutions against the original equation, and shows the full step-by-step working — including the "No Solution" case when c is negative.
What is absolute value?
Absolute value measures distance from zero on the number line, regardless of direction. The absolute value of 5 is 5, and the absolute value of −5 is also 5, because both numbers sit exactly 5 units from zero.
Absolute value is written with vertical bars: |x|. Formally, it’s defined piecewise:
Either branch of the definition produces a non-negative result — distance can’t be negative, no matter which direction you travel to get there. |7| = 7 because 7 is already non-negative. |−7| = 7 as well, because the “flip the sign” branch of the definition applies, and −(−7) = 7.
This distance interpretation is the key to solving absolute value equations. |x| = 5 isn’t really asking “what number equals 5 after some operation” — it’s asking “which numbers sit exactly 5 units from zero?” There are exactly two: 5 and −5. That same question, generalized to an expression instead of a bare variable, is what an absolute value equation asks.
An absolute value equation is any equation where the variable appears inside those bars. The standard form covered by this calculator is:
Here a, b, and c are constants, and x is the variable being solved for. The expression ax + b is just a linear function of x — a line, if you graphed it — and the absolute value bars fold any negative output of that line back up to positive. Because the expression inside the bars could have been either positive or negative before the bars were applied, solving the equation means considering both possibilities at once, which leads directly to the two-case method below.
It’s worth noting that a, b, and c don’t have to be whole numbers or even simple fractions — the same two-case method works identically whether the coefficients are integers, decimals, or fractions. The calculator above accepts any real number for each of the three inputs.
Solving with the two-case method
The core idea: if |something| = c and c is positive, then “something” is either c or −c. Both are exactly c units from zero, so both satisfy the equation.
Applied to |ax + b| = c, this splits into two linear equations:
Solving each one independently for x gives:
Both values are valid solutions to the original equation — an absolute value equation with a positive right-hand side almost always has exactly two solutions, not one. Skipping the second case is the single most common mistake made when solving these by hand (more on that below).
It helps to think about why this works rather than just memorizing the pattern. The expression inside the bars, ax + b, is some specific number once x is chosen — call it k. The equation is really asking: for what values of x does k end up equal to c after the absolute value is applied? Since |k| = c means either k = c or k = −k = c (i.e., k = −c), both possibilities have to be checked. There’s no way to know in advance which sign the expression “really” had before the bars were applied, so both branches of the piecewise definition have to be explored.
This is fundamentally different from solving a normal linear equation like ax + b = c, which has exactly one solution (assuming a ≠ 0). The absolute value bars are what introduce the second solution — removing them without accounting for both signs is the algebraic equivalent of losing information partway through the problem.
Step-by-step solving process
- Isolate the absolute value. Make sure the expression |ax + b| is alone on one side of the equation before doing anything else. If there’s a coefficient or a constant outside the bars, undo it first (for example, 2|x + 1| = 10 becomes |x + 1| = 5 by dividing both sides by 2).
- Check the sign of c. If c is negative, stop — there’s no solution, since an absolute value can never equal a negative number. If c is zero, there’s exactly one case, not two (see the zero case below).
- Write both cases. Set the inside expression equal to c, and separately equal to −c.
- Solve each linear equation for x using ordinary algebra.
- Check both solutions by substituting back into the original equation.
When there's no solution
Absolute value can never be negative, so if the right-hand side of the equation is negative, no value of x can make the equation true — no matter what a and b are.
For example, |3x − 7| = −4 has no solution, because the left side is always ≥ 0 and can never equal a negative number. This calculator checks for this case automatically and reports “No Solution” rather than trying to force an answer.
The special case when c = 0
When c = 0, the equation becomes |ax + b| = 0. An absolute value is zero only when the expression inside it is exactly zero, so there’s just one case to solve, not two:
Both the “positive” and “negative” cases collapse into the same equation here, which is why there’s only one solution instead of two. A common error is to still write two cases and expect two different answers — they’ll always turn out to be the same value when c = 0.
Graphical interpretation
Everything above can also be understood visually, which is often the fastest way to build real intuition for why there are usually two solutions.
The graph of y = |ax + b| always looks like the letter V (or, if a is negative, a V that’s been reflected — but it’s still V-shaped, just mirrored). The linear expression ax + b would normally graph as a straight line, but the absolute value bars take any part of that line that dips below the x-axis and fold it back up above it, creating the sharp corner at the bottom of the V. That corner — called the vertex of the graph — sits exactly where ax + b = 0, which is x = −b/a.
Solving |ax + b| = c is then the same as asking: where does the horizontal line y = c intersect the V-shaped graph of y = |ax + b|?
| Value of c | Line y = c relative to the V's vertex | Number of intersections |
|---|---|---|
| c > 0 | Above the vertex | 2 (the two solutions from the case method) |
| c = 0 | Exactly at the vertex | 1 (the single solution when c = 0) |
| c < 0 | Below the vertex | 0 (no solution — the V never dips that low) |
This table lines up exactly with the three cases covered earlier in this article: a positive c slices through both arms of the V, giving two crossing points; c = 0 just touches the bottom corner; and a negative c passes entirely below the V, missing it altogether since the graph never goes below y = 0.
Checking your solutions
Because the two-case method involves an algebraic step (removing the absolute value bars), it’s good practice to verify each answer by plugging it back into the original equation — not the case equation you solved it from.
Example check: for |2x + 3| = 7 with solution x = 2:
And for the second solution, x = −5:
Both check out, confirming the two solutions found by the case method. This calculator performs this check automatically and displays it alongside the step-by-step work.
Worked examples
Example 1: |x − 4| = 9
Here a = 1, b = −4, c = 9. Since c > 0, there are two cases:
- Case 1: x − 4 = 9 → x = 13
- Case 2: x − 4 = −9 → x = −5
Example 2: |5x + 10| = 0
Here a = 5, b = 10, c = 0. Since c = 0, there’s only one case:
- 5x + 10 = 0 → x = −2
Example 3: |4x − 1| = −6
Here c = −6, which is negative. No solution exists — the equation is asking for an absolute value to equal a negative number, which is impossible.
| Equation | a | b | c | Result |
|---|---|---|---|---|
| |2x + 3| = 7 | 2 | 3 | 7 | x = 2 or x = −5 |
| |x − 4| = 9 | 1 | −4 | 9 | x = 13 or x = −5 |
| |5x + 10| = 0 | 5 | 10 | 0 | x = −2 (one solution) |
| |4x − 1| = −6 | 4 | −1 | −6 | No solution |
| |−3x + 6| = 12 | −3 | 6 | 12 | x = −2 or x = 6 |
Common mistakes to avoid
Forgetting the second case. By far the most common error — students solve ax + b = c, get one answer, and stop. Unless c is exactly 0 or negative, there’s always a second case to check.
Not checking for a negative right-hand side first. Jumping straight into the two-case method with a negative c wastes time solving equations that don’t correspond to any real solution. Always check the sign of c before doing anything else.
Distributing incorrectly when isolating the absolute value. If the equation is something like 3|2x − 1| + 4 = 19, subtract 4 first (giving 3|2x − 1| = 15), then divide by 3 (giving |2x − 1| = 5) — only then apply the two-case method. Trying to split the absolute value before fully isolating it produces wrong equations.
Assuming a negative coefficient inside the bars changes the case-splitting logic. It doesn’t. |−2x + 5| = 9 splits into −2x + 5 = 9 and −2x + 5 = −9 exactly the same way as if the coefficient were positive — solve each normally, being careful with sign changes along the way.
Reporting a solution without checking it against the original equation. This matters more for more advanced absolute value problems (particularly ones where the variable also appears outside the bars, which fall outside the scope of this calculator), where the two-case method can occasionally introduce an “extraneous” solution — one that solves a case equation but doesn’t actually satisfy the original absolute value equation. For equations in the simple |ax + b| = c form covered here, extraneous solutions can’t occur as long as c ≥ 0, but the checking habit is worth building anyway since it transfers directly to those harder problem types.
Absolute value equations vs. inequalities
Absolute value equations like |ax + b| = c ask “for which x is the expression’s distance from zero exactly c?” — typically producing a small, finite set of solutions (usually two, sometimes one, sometimes none).
Absolute value inequalities like |ax + b| < c or |ax + b| > c ask “for which x is the distance less than (or greater than) c?” — and because distance can range continuously, the answer is typically an interval or union of intervals rather than a handful of discrete points. A “less than” inequality produces a bounded interval between two numbers; a “greater than” inequality produces two unbounded rays extending outward. Solving inequalities still relies on the same two-case splitting idea used for equations, just with inequality symbols carried through instead of equals signs. For that side of the topic, use the companion Absolute Value Inequalities Calculator.
Real-world applications
Manufacturing tolerances. A part specified as 50 mm long with a tolerance of ±0.5 mm means the acceptable length L satisfies |L − 50| = 0.5 at the boundary of the tolerance band. Solving this the same way as any equation in this article: L − 50 = 0.5 gives the upper boundary (L = 50.5 mm), and L − 50 = −0.5 gives the lower boundary (L = 49.5 mm). Anything between those two solutions passes inspection; anything outside them doesn’t. Quality-control engineers write tolerances this way specifically because the two-case structure maps directly onto the two physical limits — too long and too short.
Temperature thresholds. A thermostat set to maintain 68°F within 2 degrees triggers at the boundary values where |T − 68| = 2, i.e., at exactly 66°F and 70°F. The heating system in this scenario doesn’t run continuously; it switches on when the temperature crosses one boundary and off when it crosses the other, and both boundaries come directly from solving the same two-case equation covered throughout this guide.
Error and deviation analysis. In statistics and quality control, a measured value’s deviation from a target is often expressed as an absolute value, since it’s the size of the error that matters, not whether the measurement ran high or low. Solving |measured − target| = allowed error identifies the exact boundary values that separate “within spec” from “out of spec,” which is often the very first calculation done when setting up a new quality-control process.
Navigation and distance problems. If a point on a number line — or, by extension, along a road or a section of coastline measured from a fixed marker — is exactly d units from a reference point p, the equation |x − p| = d captures both possible locations, one on each side of p. This mirrors exactly how the two-case method finds two symmetric solutions around x = −b/a: one solution above that point, one below it, both the same distance away.
Finance: break-even and threshold pricing. Some pricing models set a target margin and ask how far the sale price can drift from a benchmark before triggering a review. If a policy requires flagging any transaction where the price P differs from the benchmark B by exactly a fixed amount, the boundary condition |P − B| = threshold is solved with precisely the two-case method used throughout this guide, again producing the upper and lower flagged prices as the two solutions.