331+ free tools. No sign-up. No hidden fees. Explore the toolkit

Linear Equation Calculator & System Solver

A linear equation is an equation where the unknown appears only to the first power — no x², no square roots, just x multiplied by a number plus or minus another number. Solving it means finding the value of x that makes both sides equal, and every linear equation has exactly one of three answers: one solution, no solution, or infinitely many solutions.

Enter the coefficients of ax + b = cx + d, or switch to system mode for two equations in x and y. This calculator shows the answer with the full step-by-step working, and explains clearly when there is no solution or infinitely many.

Solve one linear equation, or two equations in x and y.

The number in front of x on the left.

The plain number on the left.

The number in front of x on the right.

The plain number on the right.

Solution

Save to Pinterest
Note: Results are rounded to 4 decimal places. A 'no solution' or 'infinitely many solutions' result is a real answer, not an error — it tells you the two sides can never be equal, or are always equal. Values must be within 1,000,000,000,000.

How It Works

A linear equation in one unknown has the form ax + b = cx + d, where a, b, c and d are numbers you know and x is the number you want. The word "linear" means x appears only to the first power — no x², no square roots, no x in a denominator. Solving it means finding the value of x that makes the two sides equal, and the whole method rests on one idea: whatever you do to one side of an equation, you must do to the other, so the two sides stay balanced. When the equation comes from measured data rather than algebra, linear regression finds the line of best fit.

The working has three steps. First, collect the x terms on one side and the plain numbers on the other: subtract cx from both sides and b from both sides, giving (a − c)x = d − b. Then divide both sides by (a − c): x = (d − b) ÷ (a − c). That is the whole method — every linear equation in one unknown is solved by this rearrangement.

There are two special cases, and they matter. If a = c, the x terms cancel entirely. When b and d are also equal, the equation is true for every value of x — infinitely many solutions. When b and d differ, the equation reduces to a false statement such as 3 = 7, and there is no solution. Graphically, the two sides are straight lines: one solution means the lines cross once, no solution means they are parallel, and infinitely many means they are the same line. A system of several linear equations at once is usually solved with matrices.

A system of two equations — a₁x + b₁y = c₁ and a₂x + b₂y = c₂ — asks for the pair (x, y) that satisfies both at once. This calculator uses Cramer's rule: with the determinant D = a₁b₂ − a₂b₁, the solution is x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. If D = 0 the lines are parallel or identical, so the system has no solution or infinitely many, and the calculator tells you which.

Worked Example

Take 2x + 3 = 7. Subtract 3 from both sides: 2x = 4. Divide by 2: x = 2. Check by substitution: 2 × 2 + 3 = 7, which matches the right side.

With x on both sides, take 3x − 5 = x + 9. Collect the x terms: 3x − x = 9 + 5, so 2x = 14, and x = 7. Check: 3 × 7 − 5 = 16 and 7 + 9 = 16.

For a system, take x + y = 5 and x − y = 1. The determinant is D = (1 × −1) − (1 × 1) = −2. Then x = ((5 × −1) − (1 × 1)) ÷ −2 = −6 ÷ −2 = 3, and y = ((1 × 1) − (1 × 5)) ÷ −2 = −4 ÷ −2 = 2. Check: 3 + 2 = 5 and 3 − 2 = 1.

And the special cases: 2x + 3 = 2x + 7 has no solution, because the x terms cancel and 3 ≠ 7. 2x + 3 = 2x + 3 has infinitely many solutions, because both sides are the same expression.

Assumptions

Sources: No external data is used on this page — every figure is calculated from the coefficients you enter, using the standard rearrangement for ax + b = cx + d and Cramer's rule for systems. Last reviewed: 15 November 2026.

Built and tested by SumKitTool — see how we check our numbers.

How to Use This Calculator

For one equation, enter the four coefficients a, b, c and d. If your equation has no x on the right — for example 2x + 3 = 7 — leave c as 0. The headline result is the value of x, and the table shows the equation as typed, each step of the working, and a check by substitution so you can verify the answer yourself.

For a system, switch the mode to "System of two equations" and enter the six coefficients. The headline result is the (x, y) pair, and the table shows the determinant, the Cramer's rule working for x and y, and a check of both equations. Results update as you type, and the Reset button restores the worked examples.

Tips and Practical Advice

Always check your answer by putting it back into the original equation — if the two sides come out equal, the answer is right. A sign error is the most common mistake: when you move a term across the equals sign, its sign flips, so 3x − 5 = x + 9 becomes 3x − x = 9 + 5, not 9 − 5.

If your equation has fractions, multiply everything through by the denominator first to clear them: x/2 + 1 = 5 becomes x + 2 = 10, which is easier to solve by hand — or just enter the fractions as decimals here (0.5x + 1 = 5).

A "no solution" or "infinitely many solutions" result is not a mistake. It is the correct answer for that equation, and it usually means the two sides of the equation describe parallel lines or the same line. In a word problem, it usually means the problem's conditions contradict each other, or that one condition is a repeat of another.

Frequently Asked Questions

How do you solve a linear equation step by step?

Move all the x terms to one side and all the numbers to the other side, then divide by the coefficient of x. For 2x + 3 = 7, subtract 3 from both sides to get 2x = 4, then divide by 2 to get x = 2. Whatever you do to one side, do to the other — that keeps the equation balanced.

What does it mean if a linear equation has no solution?

It means no value of x can make the equation true. It happens when the x terms cancel but the numbers don't match — for example 2x + 3 = 2x + 7 simplifies to 3 = 7, which is false. The two sides are parallel lines that never meet.

What does it mean if a linear equation has infinitely many solutions?

It means every value of x works, because both sides of the equation are the same thing. For example 2x + 3 = 2x + 3 is true whether x is 0, 5 or −100. The two sides are the same line, so they meet everywhere.

How do you solve a system of two linear equations?

Find the x and y that satisfy both equations at once. This calculator uses Cramer's rule with the determinant D = a₁b₂ − a₂b₁: x = (c₁b₂ − c₂b₁) ÷ D and y = (a₁c₂ − a₂c₁) ÷ D. For x + y = 5 and x − y = 1, D = −2, so x = 3 and y = 2.

Last updated: