Linear Equation Solver
Solve equations of the form ax + b = 0
What Is the Linear Equation Solver?
This calculator solves linear equations of the form ax + b = 0, finding the single value of x that satisfies the equation. "Linear" refers to the fact that x only appears raised to the first power — no x², no square roots of x, no x in a denominator — which is exactly what makes the equation graph as a straight line rather than a curve.
Solving equations like this by systematically moving terms from one side to the other (a process often called "transposition") is one of the oldest techniques in algebra — the word "algebra" itself comes from the Arabic al-jabr, used in the title of a 9th-century treatise by the mathematician al-Khwarizmi that formalized methods for solving exactly this kind of equation. Every linear equation, no matter how it's initially written, can be rearranged into the ax + b = 0 form this calculator expects.
When an equation includes an x² term instead, it becomes a quadratic rather than a linear equation, and can have up to two solutions instead of one — see the Quadratic Equation Calculator for that case. If you're working with the graph of a line rather than solving for a root, the Slope Calculator covers the closely related idea of a line's steepness between two points.
Linear Equation Solver Formula
ax + b = 0 → x = −b / a
How Is the Linear Equation Solver Calculated?
Isolating x means moving the constant b to the other side (ax = −b) and then dividing both sides by a — a valid step as long as a is not zero, since division by zero is undefined. Both operations preserve the equation's balance: whatever you do to one side, you must do to the other, which is the core principle behind solving any algebraic equation.
The coefficient a also has a graphical meaning: if you plot y = ax + b as a line, a is the line's slope and b is where it crosses the y-axis (the y-intercept). Solving ax + b = 0 is really asking "where does this line cross the x-axis?" — the x-intercept — which is exactly the single value of x this calculator returns when a unique solution exists.
Linear Equation Solver Example
2x + 6 = 0 (a=2, b=6): x = −6 / 2 = −3.
3x − 9 = 0 (a=3, b=−9): x = −(−9) / 3 = 9 / 3 = 3.
−4x + 20 = 0 (a=−4, b=20): x = −20 / −4 = 5 — notice how the two negative signs cancel to give a positive result.
How to Use the Linear Equation Solver
Step 1
Enter the coefficient a.
Step 2
Enter the constant b.
Step 3
Click Solve Equation to see the value of x.
Step 4
If your equation isn't already in the form ax + b = 0, rearrange it first by moving all terms to one side.
Step 5
Check the "Type" shown in the result to see whether it's a unique, infinite, or no-solution case.
Step 6
Substitute the returned x value back into the original equation as a quick sanity check.
Benefits
- Instantly handles all three cases: unique, infinite, or no solution.
- Shows the step-by-step rearrangement used to isolate x.
- Works for any real-number coefficients, including negatives and decimals.
- Saves you from a sign error when manually transposing terms.
- Gives a result precise to four decimal places for coefficients that don't divide evenly.
- Free, fast, and works entirely in your browser — no login required.
Common Linear Equation Solver Scenarios
Scenario 1
Algebra homework involving single-variable linear equations.
Scenario 2
Quickly checking hand-solved equations for errors.
Scenario 3
Building blocks for solving systems of equations by substitution.
Scenario 4
Finding the x-intercept of a line given in the form y = ax + b.
Scenario 5
Working through basic break-even or unit-conversion problems that reduce to one linear equation.
Scenario 6
Verifying a step in a longer multi-step algebra problem before moving on.
Understanding Your Result
A unique solution means exactly one value of x satisfies the equation. Infinite solutions occur when the equation reduces to 0 = 0 (true for any x). No solution occurs when the equation reduces to a false statement, like 0 = 5.
Graphically, a unique solution corresponds to a line crossing the x-axis at exactly one point, "infinite solutions" corresponds to every point on the x-axis being on the line (which really only happens for the degenerate case a = 0, b = 0), and "no solution" corresponds to a horizontal line that never touches the x-axis at all (a = 0 with b not equal to 0).
Tips
- If a = 0, check whether b is also 0 to distinguish infinite solutions from no solution.
- Always double-check your sign when moving b to the other side of the equation.
- A linear equation graphs as a straight line, unlike a quadratic's curve.
- If your original equation has x terms on both sides, combine them into a single ax term before entering a and b here.
- A fractional or decimal result is completely normal — it doesn't mean you made an error.
Common Mistakes
- Forgetting to flip the sign of b when isolating x.
- Assuming a = 0 always means "no solution" without checking b as well.
- Confusing a linear equation (highest power of x is 1) with a quadratic (highest power is 2).
- Entering an equation that still has x terms on both sides instead of first combining them into one ax term.
- Misreading which number is the coefficient (a, attached to x) and which is the constant (b, standing alone).
Frequently Asked Questions
What if a is 0?
If a = 0 and b = 0, every real number satisfies the equation (infinite solutions). If a = 0 and b isn't 0, no value of x can satisfy it (no solution).
What makes an equation "linear"?
A linear equation has variables raised only to the first power (no x², x³, etc.), which makes its graph a straight line.
How is this different from the Quadratic Equation calculator?
Linear equations have one solution (in the typical case), while quadratic equations (with an x² term) can have up to two solutions.
Can a linear equation have a negative solution?
Yes, if a and b have the same sign, x = −b/a will be negative.
What does "no solution" mean graphically?
It means the equation reduces to a contradiction (like 0 = 5), which has no corresponding point on the number line that satisfies it.
What if both a and b are zero?
If both are zero, the equation becomes 0 = 0, which is true for every value of x — meaning infinitely many solutions rather than a single unique answer.
Can this solve equations with variables on both sides, like 2x + 3 = x + 7?
Rearrange the equation into the form ax + b = 0 first (e.g. 2x + 3 = x + 7 becomes x − 4 = 0), then enter the resulting a and b values.
What does it mean if x comes out as a fraction?
It's a completely valid solution — linear equations often have non-whole-number answers, and the fraction or decimal represents the exact point where the line crosses zero.
How is a linear equation different from a linear function?
A linear equation like ax + b = 0 is solved for a specific value of x, while a linear function like y = ax + b describes a relationship between x and y across a whole line of points.
Can I share my equation solution as an image?
Yes — tap Share and, on supported devices, your solution is shared as a branded image card, not just a text link.
What does the coefficient a represent on a graph?
If you plot y = ax + b, a is the slope of the line — how steeply it rises or falls — while b is the y-intercept, the point where the line crosses the y-axis.
How do I convert an equation like 5x = 20 − 3 into the ax + b = 0 form?
Move every term to one side: 5x = 20 − 3 simplifies to 5x = 17, then to 5x − 17 = 0, giving a = 5 and b = −17.
Is a linear equation the same as a linear function?
Related but different — a linear equation like ax + b = 0 is solved for a single value of x, while a linear function like y = ax + b describes an entire line of (x, y) points.
Can this calculator handle equations with fractions as coefficients, like x/2 + 3 = 0?
Yes — enter the coefficient as a decimal (0.5 for 1/2) rather than as a fraction, since the input fields expect numeric values.
References
Important Information
A unique solution is rounded to 4 decimal places.
Last updated: July 25, 2026