What this calculator does
A linear equation is any equation where the unknown appears only to the first power, with no squares, roots or products of two unknowns. Written in the standard form ax + b = c, this linear equation calculator isolates x for you: subtract b from both sides, then divide by a, and whatever is left is the answer.
The one case people trip over is when a is zero. With no x term left, the equation collapses to a plain statement like 5 = 5 (always true, so every value of x works) or 5 = 20 (never true, so there is no value of x that works). This calculator checks for that case explicitly rather than dividing by zero and returning an error.
The formula
Start from ax + b = c. Subtracting b from both sides gives ax = c − b. Dividing both sides by a isolates x, giving x = (c − b) ÷ a. That division is only valid when a is not zero, which is why a zero coefficient is handled as its own case rather than run through the same formula.
| Term | Meaning |
|---|---|
| a | The coefficient of x, the number multiplying the unknown. |
| b | The constant added to the x term on the left-hand side. |
| c | The value on the right-hand side of the equation. |
| x | The unknown value being solved for. |
The inputs explained
| Field | What to enter |
|---|---|
| Coefficient a (multiplies x) | The number multiplying x. Enter 0 to see the no-solution or infinite-solutions cases. |
| Constant b (added on the x side) | The constant added on the same side as the x term. Use a negative number for subtraction. |
| Value c (right-hand side) | The value the left-hand side is set equal to. |
When to use it
Checking homework or textbook working
Enter the three coefficients from any equation of the form ax + b = c and confirm the answer matches, or spot an arithmetic slip in your own working.
Rearranging a formula with one unknown
Plenty of everyday formulas reduce to a linear equation once the known values are substituted in, such as solving for a missing time, rate or quantity in a straight-line relationship.
Understanding the no-solution and infinite-solution edge cases
Setting a to zero and experimenting with b and c is a quick way to see why those two special cases arise, rather than just being told the rule.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How the solution changes as the coefficient a varies
The same equation with b and c fixed, varying only the coefficient of x.
How the solution changes as the right-hand side c varies
The same equation with a and b fixed, varying only the right-hand side.
Questions
What makes an equation linear?
The unknown appears only to the first power, with no x², no square root of x, and no term multiplying two unknowns together. Plotted on a graph, a linear equation in two variables traces a straight line, which is where the name comes from.
What happens when a is zero and b does not equal c?
The x term disappears entirely, leaving a false statement such as 5 = 20. Since no value of x can make a false statement true, the equation has no solution.
What happens when a is zero and b equals c?
The equation collapses to a true statement such as 5 = 5, which holds regardless of what x is. Every real number is then a solution, so the equation has infinitely many solutions rather than one.
How is this different from solving a system of two equations?
This calculator solves one equation in one unknown. If you have two equations and two unknowns, such as a1x + b1y = c1 and a2x + b2y = c2, use a dedicated two-equation solver instead, since a single-variable approach cannot handle the second unknown.
For two equations solved together for x and y, see the system of two linear equations calculator. For estimating a value between two known points on a line, see the linear interpolation calculator.