Linear Equation Solver
Solve a linear equation of the form ax + b = c for x. Returns the decimal solution, the exact reduced fraction, and a step-by-step derivation — including the no-solution and infinite-solutions edge cases.
Input
Coefficient of x.
Constant added to ax.
Value the equation equals.
Output
one_solution, no_solution, or infinite_solutions.
Reduced fraction form — only shown when a, b, and c are all whole numbers.
Guides
The Linear Equation Solver finds x in any equation of the form ax + b = c. Enter the three coefficients and it returns the decimal solution, the exact reduced fraction (when a, b, and c are whole numbers), and a step-by-step derivation showing how the answer was reached.
It's built for algebra students checking homework, teachers preparing worked examples, and anyone who needs a quick, exact answer without doing the algebra by hand.
How to use it
- Enter a — the coefficient of x.
- Enter b — the constant added to ax.
- Enter c — the value the equation equals.
- Read the Solution, the Exact Fraction, or Step-by-Step Derivation for the full working.
Results update automatically as you type. For example, entering a = 2, b = 3, c = 11 returns x = 4 — solved from 2x + 3 = 11 → 2x = 8 → x = 4.
How is a linear equation solved?
A linear equation in one variable always reduces to the same two steps: subtract b from both sides to isolate the ax term, then divide by a to isolate x. That gives the general solution x = (c − b) / a, which is exact whenever a, b, and c are whole numbers — this calculator shows that exact fraction alongside the rounded decimal.
What if a is 0?
When a = 0, there's no x term left to solve for, so the equation collapses to a plain statement about b and c:
- If b = c, the statement is true no matter what x is — every real number is a solution, so the equation has infinitely many solutions.
- If b ≠ c, the statement is false — there's no solution that satisfies the equation.
Why does the calculator show a fraction as well as a decimal?
Dividing (c − b) by a doesn't always land on a clean decimal — a case like 3x + 1 = 4 solves to a whole number, but 3x + 1 = 5 solves to x = 4/3, which only terminates as a repeating decimal. Showing the exact reduced fraction alongside the rounded decimal avoids that precision loss, which matters when the answer feeds into a further calculation.
For quadratic (curved) equations instead of straight lines, see the Quadratic Formula Solver. To build a line's equation from a point and a slope rather than solving one, see the Point-Slope Form Calculator.
Privacy
This calculator runs entirely in your browser. Your coefficients are never uploaded, logged, or stored — the computation happens locally on your device.
Use it from code
From 3 credits per callREST API
curl -X POST https://api.iotools.cloud/v1/tool/linear-equation-solver \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"a": "2",
"b": "3",
"c": "11"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `linear-equation-solver` tool (Linear Equation Solver) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.