Skip to main content
Mathovia

Math / Algebra

Substitution Method Calculator

Enter two linear equations and the calculator solves them by substitution, the way you'd write it out by hand. It picks the easiest variable to isolate, shows the substitution in brackets, and finishes with a check in both equations.

Use x and y. Fractions, decimals and brackets are fine: 1/2x, 0.5y, 2(x + y) = 14, y = 3x − 4.

One solution

x = 2,y = 3

(2, 3)

  1. Start with the systemy = 2x − 13x + 2y = 12
  2. Solve equation 1 for yy = 2x − 1
  3. Substitute into equation 23x + 2(2x − 1) = 12
  4. Expand and collect like terms7x − 2 = 127x = 14
  5. Divide both sides by 7x = 2
  6. Back-substitute x = 2 into y = 2x − 1y = 3
  7. Check in every original equationy = 2x − 1: as −2x + y = −1, left side = −1 ✓3x + 2y = 12: left side = 12 ✓
xygrid step 1
━ equation 1 ╍ equation 2
Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

The substitution method is usually the first way students learn to solve a system of equations, and it’s the one most worth getting fluent in. It works on every linear system, and it’s the only one of the standard methods that still works when one equation is a curve. The idea is simple: if one equation tells you exactly what equals, you can swap that expression in wherever appears in the other equation. This substitution method calculator does exactly that, with every line of working shown, so you can follow it or check your own.

Substitution method: isolate x = (c1 − b1 y) / a1 and substitute it into a2 x + b2 y = c2
Isolate one variable, then substitute it into the other equation

How to use the substitution method calculator

  1. Type both equations. Any linear form works: y = 2x − 1, 3x + 2y = 12, x/2 + y = 4.
  2. Read the answer at the top: the values of and , or “no solution” or “infinitely many solutions”.
  3. Follow the steps. Each one names the move: which equation was solved for which variable, what was substituted where, and the back-substitution.
  4. Look at the graph to see both lines and the point where they cross.

The example buttons cover the cases you’re likely to meet in homework: a variable already alone, one you have to isolate, and the two special cases.

How to solve a system by substitution

The calculator opens on this system:

Step 1 — isolate a variable. The first equation already gives , so there’s nothing to do.

Step 2 — substitute for in the second equation, keeping the brackets:

Step 3 — expand and solve the one-variable equation:

Step 4 — back-substitute into the isolated expression:

Step 5 — check both equations: ✓ and ✓.

The solution is . Notice the brackets in step 2. Writing instead of loses a and gives the wrong answer, and it’s the single most common substitution mistake.

Choosing which variable to isolate

When no variable is already alone, the choice in step 1 decides how messy the rest of the problem gets. Take and . There are four possible starting moves, and only one of them avoids fractions:

Four ways to start solving 2x + 3y = 13 and 4x − y = 5 by substitution: isolating x or y from the first equation, or x from the second, all give fractions; isolating y from the second equation gives y = 4x − 5 with no fractions
Look for a coefficient of 1 or −1 before you isolate anything

The calculator makes the same choice: it isolates , substitutes into the first equation to get , so , and . You’d get the same answer starting from any of the other three, but with a lot more fraction arithmetic along the way.

The equation looks likeIsolateWhy
nothing, it’s done is already alone
coefficient
coefficient
avoid if possibleevery choice gives fractions

Substitution with no solution or infinitely many

Sometimes the variable disappears completely after the substitution. What’s left tells you the answer:

What’s leftMeaningExample to try
a value, like one solutiony = 2x − 1, 3x + 2y = 12
a false statement, like no solution (parallel lines)y = 2x + 3, 4x − 2y = 5
a true statement, like infinitely many solutions (same line)y = −2x + 4, 6x + 3y = 12

In the second example, substituting gives , which simplifies to . No value of can fix that, because the lines and have the same slope and never meet. Finding “no solution” isn’t a mistake. It’s the correct answer.

Substitution method word problem

A concert sold tickets and took in . Adult tickets cost and child tickets . Let be adult tickets and child tickets, so and . To check this one in the calculator, use for adults and for children: x + y = 200 and 14x + 9y = 2600. The calculator isolates from the first equation, substitutes to get , and finds and : 160 adult and 40 child tickets.

Common substitution mistakes

  • Leaving out the brackets when you substitute an expression with more than one term.
  • Substituting back into the same equation you isolated from. That only ever gives a true statement like .
  • Sign errors when isolating. From , , not .
  • Stopping at one variable. The answer is a pair. Back-substitute for the second value.

For the full explanation with more worked examples, see the substitution method lesson, then try the substitution method practice problems. If your system has both equations in standard form, the system of equations calculator can also solve it by elimination, Cramer’s rule or matrices.

Frequently Asked Questions

How does the substitution method calculator choose which variable to isolate?+

It looks for a variable with a coefficient of 1 or −1, because isolating it needs no fractions. If a variable is already alone, like y = 2x − 1, it uses that equation as it is. Only when every coefficient is larger does it accept a fraction.

What are the steps of the substitution method?+

Isolate one variable in one equation, substitute that expression into the other equation, solve the resulting one-variable equation, back-substitute to find the second variable, and check the pair in both original equations.

What happens when there is no solution?+

The variable cancels after the substitution and leaves a false statement, such as −6 = 5. That means the two lines are parallel, and the calculator reports no solution.

What does it mean if the substitution gives something like 12 = 12?+

The variable cancelled and left a true statement, so the two equations describe the same line. Every point on that line is a solution, and the calculator gives the general solution.

Can I use fractions and decimals?+

Yes. Type 1/2x, 0.5x or x/2, and brackets such as 2(x + 1). The calculator keeps every value exact, so an answer like 4/3 stays a fraction instead of becoming 1.3333.

When should I use substitution instead of elimination?+

Substitution is quickest when one equation already has a variable on its own or a variable with coefficient 1. If both equations are in standard form with larger coefficients, such as 3x + 4y = 10 and 5x − 6y = 4, elimination is usually less work.

Learn and practice this topic

Related calculators