Linear Equation Solver — Solve for x Step by Step (Free)

AlgebraFreeNo sign-up

To solve 2(x + 3) − x/2 = x + 9, distribute to get 2x + 6 − x/2 = x + 9, multiply every term by 2 to clear the fraction (4x + 12 − x = 2x + 18), collect terms to get x = 6, then check: both sides equal 15. The linear equation solver below shows these steps for any linear equation, exactly.

Linear equation solver with steps
Fractions (x/3, 2/5), decimals (0.4x), parentheses and the variable on both sides are fine. Any single letter can be the variable.
Try:
Solution
x =6
Exact6
Decimal6
Check15 = 15 ✓
2468105101520(6, 15)
y = (3/2)x + 6 (left side)y = x + 9 (right side)

The solution is the x-coordinate where the two sides are equal: the lines cross there.

Show steps (6)
  1. Start2(x + 3) − x/2 = x + 9
  2. Distribute and combine like termsMultiply out the parentheses, then add the x terms and the number terms on each side: 32x + 6 = x + 9
  3. Clear the fractionsMultiply every term on both sides by 2, the least common denominator: 3x + 12 = 2x + 18
  4. Subtract 2x from both sidesMove every x term to the left side: x + 12 = 18
  5. Subtract 12 from both sidesMove the numbers to the right side: x = 6
  6. Check by substitutionPut x = 6 into the original equation: 2(6 + 3) − 6/2 = 15 and 6 + 9 = 15. Both sides match ✓

Next: system of equations calculator · nonlinear equations · equation of a line

Linear Equation Solver — Solve for x Step by Step (Free)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the linear equation solver

  1. Pick a tab. Equation takes a typed equation such as 3(x − 2) + x/4 = 5 − x. ax + b = cx + d takes four numbers. 2 equations and 3 equations solve systems in x, y and z.
  2. Type fractions as x/3 or 2/5, decimals as 0.4x, and use parentheses freely. The variable can be on both sides, and any single letter works.
  3. Read the answer as an exact fraction, a decimal and a mixed number when that helps. The Check box substitutes the answer back into your original equation.
  4. Open Show steps to see each move: distribute, clear fractions or decimals, move the variable terms, move the numbers, divide.
  5. The graph draws the left side and the right side as two lines. The solution is where they cross.

How to solve a linear equation

A linear equation in one variable can always be rewritten as ax + b = cx + d, where the variable appears only to the first power and never in a denominator. The goal is to get x alone using inverse operations, doing the same thing to both sides each time:

  1. Simplify each side. Distribute any parentheses and combine like terms.
  2. Clear fractions or decimals. Multiply every term on both sides by the least common denominator (or by 10, 100 for decimals). This step is optional but removes most arithmetic errors.
  3. Collect the x terms on one side by adding or subtracting.
  4. Collect the numbers on the other side.
  5. Divide by the coefficient of x.
  6. Check by substituting the answer into the original equation.

In symbols, ax + b = cx + d gives (a − c)x = d − b, so x = (d − b)/(a − c) whenever a ≠ c.

Worked examples

Fractions: x/3 + 1/4 = x/2 − 1

The denominators are 3, 4 and 2, so the least common denominator is 12. Multiply every term by 12: 4x + 3 = 6x − 12. Subtract 6x: −2x + 3 = −12. Subtract 3: −2x = −15. Divide by −2: x = 15/2 = 7.5. Check: 7.5/3 + 0.25 = 2.75 and 7.5/2 − 1 = 2.75.

Decimals: 0.4x + 2.6 = 1.1x − 0.9

Multiply by 10 to work with whole numbers: 4x + 26 = 11x − 9. Subtract 11x: −7x + 26 = −9. Subtract 26: −7x = −35, so x = 5. Check: 0.4(5) + 2.6 = 4.6 and 1.1(5) − 0.9 = 4.6.

Parentheses on both sides: 5(2 − y) = 3(y + 4) − 2y

Distribute: 10 − 5y = 3y + 12 − 2y, which simplifies to 10 − 5y = y + 12. Subtract y: 10 − 6y = 12. Subtract 10: −6y = 2, so y = −1/3. A negative fraction is a perfectly good answer; the check gives 35/3 on both sides.

No solution and infinitely many solutions

Sometimes the variable terms cancel. What is left decides the answer:

Equation After simplifying Result
2(x + 1) = 2x + 5 2 = 5 (false) No solution (parallel lines)
3(x − 2) = 3x − 6 −6 = −6 (true) All real numbers, an identity (same line)
4x − 7 = x + 2 3x = 9 Exactly one solution, x = 3

A quick test before solving: if both sides have the same coefficient of x after simplifying, the equation has either no solution or infinitely many.

Systems of two or three linear equations

With two unknowns you need two equations. The solver uses elimination: multiply the equations so one variable has opposite coefficients, add or subtract to remove it, solve for the other variable, then substitute back. For x + y = 10 and x − y = 4, adding gives 2x = 14, so x = 7 and y = 3.

For three equations in x, y and z, the solver eliminates x from equations (2) and (3), then y from equation (3), and finishes with back substitution, using whole-number row operations so you can follow every line. It also recognizes systems with no solution (a false statement like 0 = 1 appears) and with infinitely many solutions (0 = 0 appears), and writes the second case with a parameter t. For more methods on systems (substitution, graphing, matrices), see the system of equations calculator.

Common mistakes

Mistake Fix
Distributing to the first term only: 3(x − 2) = 3x − 2 Multiply every term inside: 3x − 6
Dropping a minus sign: −(x − 5) = −x − 5 A minus in front flips every sign inside: −x + 5
Multiplying only some terms by the common denominator Multiply every term on both sides, including whole numbers
Dividing by the wrong sign: −2x = −15 gives x = −7.5 Divide by −2: x = 7.5
Calling 0 = 0 “x = 0” 0 = 0 means every number is a solution
Rounding 7/3 to 2.33 too early Keep the fraction until the end, then round once

Where linear equations show up

Linear equations model any situation with a fixed amount plus a constant rate. A phone plan costs $20 a month plus $0.10 per text: when is the bill $35? Solve 20 + 0.10t = 35 to get t = 150 texts. Two gyms charge $30 + $10 per month and $50 + $6 per month: when do they cost the same? Solve 30 + 10m = 50 + 6m to get m = 5 months. Temperature conversion, break-even points and distance at a constant speed work the same way.

Solving by hand vs using the solver

Solve by hand first, then compare your lines with the steps here. If your answer differs, look for the first step where the equations stop matching: it is usually a sign or a term you forgot to multiply. Use the ax + b = cx + d tab when your textbook already gives the equation in that form, and the graph to see why a no-solution equation has parallel lines.

Linear Equations practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. Solve 4x − 7 = 2x + 9.

Found a mistake? Let us know!

2. Solve 3(x − 4) = 15.

Found a mistake? Let us know!

3. Solve x/4 + 2 = x/3.

Found a mistake? Let us know!

4. Solve 0.3x + 1.2 = 0.5x − 0.4.

Found a mistake? Let us know!

5. How many solutions does 2(x + 3) = 2x + 6 have?

Found a mistake? Let us know!

6. How many solutions does 5x − 1 = 5x + 4 have?

Found a mistake? Let us know!

7. Solve −2x + 5 = 11.

Found a mistake? Let us know!

8. Solve 5 − (x − 3) = 2x.

Found a mistake? Let us know!

9. Solve the system x + y = 9 and x − y = 3.

Found a mistake? Let us know!

10. Which equation is linear?

Found a mistake? Let us know!

Frequently asked questions

How do you solve a linear equation with a calculator?

Enter the equation exactly as written, or enter the coefficients of ax + b = cx + d. For 3x + 5 = x + 11 (a = 3, b = 5, c = 1, d = 11), the solver subtracts x and 5 from both sides to get 2x = 6, so x = 3. The check gives 14 = 14.

Is there a linear equation calculator with steps?

Yes, this one shows every step for free. For 5x − 4 = 2x + 8 it shows 3x − 4 = 8, then 3x = 12, then x = 4. When the answer is not a whole number, you get the fraction and the decimal, for example 3x − 2 = 5 gives x = 7/3 ≈ 2.333.

How do you find a linear equation from two points?

Find the slope, then the intercept. For (1, 3) and (3, 7), the slope is (7 − 3)/(3 − 1) = 2. Substitute (1, 3) into y = 2x + b to get b = 1, so the line is y = 2x + 1. The equation of a line calculator does this for any two points.

How do you solve a linear equation on a scientific calculator?

Key sequences differ by model, so check the manual for an equation or SOLVE mode. You can also do the algebra and use the calculator only for arithmetic: 0.4x + 2.6 = 1.1x − 0.9 becomes −0.7x = −3.5, and −3.5 ÷ −0.7 = 5.

How do you solve a system of linear equations?

Use elimination or substitution. For x + y = 10 and x − y = 4, adding the equations removes y: 2x = 14, so x = 7, and then y = 10 − 7 = 3. The 2 equations tab shows these steps and draws both lines.

What makes an equation linear?

Each variable appears only to the first power, is not multiplied by another variable and is not inside a denominator, root or function. 3x + 2 = 7 is linear; x² = 4, 1/x = 2 and xy = 6 are not. For those, use the equation solver.

Related calculators

More algebra calculators

Browse all 206 calculators

Related to This Article

What people say about "Linear Equation Solver: Solve Step by Step (Calculator)"?

No one replied yet.

Leave a Reply