ForHosting KIT · Math

Absolute value equation solver

For |2x − 3| = 5 the two roots are −1 and 4, found by setting the inside equal to 5 and to −5. Enter the three numbers of your equation to get its ordered solutions. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
A
2
B
-3
C
5
You get
Equation
|2x-3|=5
Solution count
2
Solutions
-1, 4

Absolute value equations of the form modulus of ax plus b equals c appear in every algebra course, entrance exam, and technical curriculum that treats linear expressions under a modulus. Students and tutors need both candidate roots quickly; automation scripts need a deterministic contract that never invents a root when the right-hand side is negative. This absolute value equation solver accepts coefficients a, b, and c, applies the two-case identity that |ax+b|=c means ax+b equals c or ax+b equals negative c, and returns the ordered real solutions with a short formula string you can show next to the answer. When c is zero there is a single root at x equals negative b over a.

What |ax + b| = c means and how both roots appear

The absolute value of a real number is its distance from zero on the number line, so |ax + b| equals c asks for every x such that the linear expression ax plus b sits exactly distance c from zero. That distance interpretation immediately yields the two-case split used in every textbook: either ax plus b equals c, or ax plus b equals negative c.

Solving each linear equation gives x equals (c minus b) divided by a, and x equals (negative c minus b) divided by a, provided a is not zero. When c is exactly zero the two cases collapse into the single equation ax plus b equals zero, so only one root is returned: x equals negative b over a. When c is negative the geometric distance would have to be negative, which is impossible for a modulus, so there is no real solution at all.

Coefficient a must be non-zero: if a were zero the original statement would not be a linear equation in x, only a true or false claim about |b| and c, which is outside the scope of solving for x.

Where solving these equations helps

Classrooms and tutoring platforms use an absolute value equation solver so learners can check both roots for arbitrary a, b, and c without flipping sign errors by hand. Exam-prep generators need a deterministic oracle that marks wrong the case c less than zero instead of silently returning an empty array that a buggy grader might treat as success. Failed validation does not consume balance.

Keep requests small, pin the rounded solutions in tests, and you get reproducible roots for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

Classroom and homework checks

Let students submit a, b, and c for |ax+b|=c and verify both ordered roots (or the single root when c is zero) against textbook methods.

Exam and LMS auto-grading

Mark absolute value equation items with a deterministic oracle that rejects negative c as no solution and never invents extra roots.

Notebooks and tolerance constraints

Solve symmetric linear absolute constraints |ax+b|=c in calibration scripts without importing a full computer-algebra library.

How do I solve |ax + b| = c for x?

Send finite numbers a (non-zero), b, and c (non-negative).

What happens if c is negative?

Absolute value cannot equal a negative number, so the equation has no real solution and is not billed.

Why must a be non-zero?

If a is zero, |ax+b|=c is not an equation in x—only a true or false statement about |b| and c. The solver requires a≠0 so it can return roots for x.

How many solutions does the solver return?

Negative c is rejected as no solution rather than an empty success list.

What are the solutions of |2x − 3| = 5?

There are two. Setting 2x − 3 = 5 gives x equals 4, and setting 2x − 3 = −5 gives x equals −1. Both put the expression exactly 5 units away from zero.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/algebra/absolute-value-equation

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/algebra/absolute-value-equation \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"a":2,"b":-3,"c":5}'
{
  "a": 2,
  "b": -3,
  "c": 5
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "algebra.absolute_value_equation",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

When c is negative there is no real solution and the task fails with invalid_input instead of a hollow empty list.

What |ax + b| = c means and how both roots appear

When c is strictly positive the two cases produce two distinct real roots, which this endpoint returns in ascending order so clients can display them without extra sorting. The capability encodes that impossibility as an invalid_input error rather than a success payload with zero solutions, matching classroom language that says the equation has no solution and matching API clients that treat empty success and hard failure differently for billing and retries.

Input contract, response shape, and error behaviour

Example: a equals two, b equals negative three, c equals five yields the equation |2x-3|=5 and the roots x equals negative one and x equals four, because 2x-3 equals five gives x equals four and 2x-3 equals negative five gives x equals negative one. POST a JSON body with three required finite numbers: a, the non-zero coefficient of x; b, the constant term inside the modulus; and c, the non-negative right-hand side. Each field may arrive as a JSON number or as a numeric string; non-finite values, missing fields, and empty strings fail with invalid_input naming the field. On success the body includes the echoed coefficients a, b, and c; an equation string that rewrites the modulus form for display; solution_count (one or two); solutions as an ascending array of numbers rounded to twelve decimal places for stable goldens across runtimes; and a formula string restating the two-case identity. Pair the response with your own graphing code if you need a sketch of the V-shaped graph y equals |ax+b| against the horizontal line y equals c; this endpoint solves for x only and does not emit plots or step-by-step prose beyond the formula field.

Where an absolute value equation API earns its keep

Engineering and science notebooks often reduce piecewise-linear constraints or tolerance bands to |ax+b|=c when calibrating sensors or validating symmetric error bounds; calling a tiny parse API avoids pulling a full computer-algebra system for a three-coefficient problem.

What does the absolute value equation solver cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →