System of Equations Calculator

Solve 2x2, 3x3, and 4x4 linear systems by elimination, with every row operation shown, exact fractions, a substitution check, and a graph of the lines.

Input method

Two unknowns need two equations, three unknowns need three. Fractions such as 1/2 and brackets both work.

Try one of these

Your solution will appear here

Enter your equations on the left, or tap an example to see the full working.

Two unknowns, three, or four — with the working shown

Most solvers hand back a pair of numbers and leave you guessing how they got there. This one prints the augmented matrix after every row operation, so you can hold it next to your own paper and find the exact line where the arithmetic went sideways. It also says plainly when a system has no solution or infinitely many, instead of returning an error.

Elimination · Determinant · Graph

What this solver gives you

Every row operation, in order

Swap, divide, subtract — each step appears with the matrix as it stood at that moment. This is the part a graphing calculator hides.

Exact fractions, never rounded

Coefficients are stored as rationals, so an answer of 5/7 stays 5/7. A rounded decimal sits underneath when you need one for a report.

The awkward cases named properly

Parallel lines, repeated equations, more equations than unknowns. Each gets a plain explanation rather than a blank result.

A check you can trust

The solution is substituted back into your original equations and both sides are printed, so the answer is verified rather than asserted.

Which method fits which system

Coursework usually names three ways to solve a linear system. They all reach the same answer; the difference is how much work each one takes.

  • SubstitutionFastest when one equation already has an unknown on its own, such as y = 2x + 1.
  • EliminationBest once you reach three or four unknowns. This is what the calculator runs.
  • Cramer's ruleHandy for a square system when you only need one unknown and the determinant is not zero.
  • GraphingUseful for two unknowns to see the answer, but hard to read off exactly.

How this System of Equations Calculator works

Paste your equations and the calculator reads each line the way you wrote it: left side, equals sign, right side. It expands any brackets, clears fractions, and moves every unknown to the left so each line lands in the standard form ax + by = c. Those coefficients are kept as exact fractions, which is why a third stays 1/3 instead of drifting into 0.3333.

The rows then go into an augmented matrix and the solver runs Gauss-Jordan elimination. It picks a pivot in the first column, favouring one worth 1 or −1 so the printed arithmetic stays readable, divides that row down to a single unknown, and subtracts multiples of it from every other row. It repeats this column by column until each unknown sits alone in its own row.

What comes out tells you which of three things happened. If every unknown gets its own pivot, there is exactly one answer, and the calculator substitutes it back into your original equations to prove it. If a row collapses to 0 = 5, the equations contradict each other and nothing can satisfy them. If a row collapses to 0 = 0, one equation repeated another, so the calculator names the free unknowns and writes the rest in terms of them.

Square systems also get their determinant and the Cramer's rule numerators. Systems with two unknowns get a graph of both lines. All of it runs in your browser.

How to use this System of Equations Calculator

1

Enter your equations

Put one equation on each line, such as 2x + 3y = 12. Or switch to the grid and type the coefficients into boxes.

2

Press Solve

The calculator lines the equations up, eliminates one unknown at a time, and reports whether you get one answer, none, or a whole family.

3

Check the working

Compare each row against your own paper, read the substitution check, and open the graph when the system has two unknowns.

Example Usage

Solving three equations with three unknowns:

Input
x + y + z = 6 2x - y + z = 3 x + 2y - z = 2
Output
x = 1, y = 2, z = 3 Step 1 Line all three equations up in standard form Step 2 Use row 1 to clear x from rows 2 and 3 Step 3 Use the new row 2 to clear y, then read z Check 1 + 2 + 3 = 6 and 2 - 2 + 3 = 3

Frequently Asked Questions

How many equations do I need to solve for three unknowns?
Three, and they have to carry different information. Three equations where the third is just the first two added together will not pin the answer down, because that third line tells you nothing new. When that happens the calculator reports infinitely many solutions instead of a single point.
Does this calculator use substitution or elimination?
It uses elimination, in the organised form called Gauss-Jordan. Substitution is quicker on a small 2 x 2 system you can do in your head, but elimination scales to 3 x 3 and 4 x 4 without turning into a mess of nested brackets, and it makes the printed steps easier to follow.
Can it handle 3 x 3 and 4 x 4 systems?
Yes, and up to eight equations with eight unknowns. The equation box accepts any of those sizes. The coefficient grid covers 2 x 2, 3 x 3, and 4 x 4, which is what most coursework asks for.
Why does it say there is no solution?
Because two of your equations contradict each other. Take x + y = 4 and 2x + 2y = 9. Doubling the first gives 2x + 2y = 8, so the second is asking the same sum to equal 9 at the same time. On a graph those are parallel lines, and parallel lines never cross.
What does "infinitely many solutions" actually mean?
It means one equation repeated another. With x + y = 4 and 2x + 2y = 8, both draw the same line, so every point on it works. The calculator names the free unknown and writes the others in terms of it, so you can read off an answer by picking any value you like for the free one.
How do I type fractions, decimals, and brackets?
Write a fraction with a slash, so x/2 + y/3 = 4 works as typed. Decimals such as 0.5x are fine too. Brackets are expanded for you, so 3(x - 1) + 2y = 11 needs no rearranging first. Multiplication signs are optional: 2x and 2*x mean the same thing.
Can I use letters other than x, y, and z?
Yes. Any single letter works, and subscripts such as x1, x_1, and x_2 work as well. The calculator picks up whichever names you use and keeps x, y, z in the usual order when they appear.
Will it solve a nonlinear system such as x² + y² = 25?
No. This solver is built for linear systems, where every unknown appears on its own and never multiplied by another unknown. Terms like x², xy, and square roots are rejected with a message rather than solved approximately.
Why is the answer shown as a fraction instead of a decimal?
Because the fraction is the exact value. When the answer is 5/7, writing 0.714286 loses information and can throw off the next step of a longer problem. The rounded decimal appears underneath whenever the fraction does not terminate.
What is the determinant used for here?
For a square system, the determinant is a single number that tells you whether one clean answer exists. A determinant that is not zero means exactly one solution. A determinant of zero means the equations either contradict each other or repeat each other. When it is not zero, the calculator also shows the Cramer’s rule numerators.
Can I use this to check my homework?
That is why every step is printed. Work the problem yourself first, then compare row by row. The line where your working and the calculator’s working stop matching is almost always where the arithmetic slipped. The substitution check at the bottom confirms the final numbers satisfy your original equations.
Is anything I type uploaded?
No. The parser and the solver are JavaScript running on your own device. Nothing is sent to a server, nothing is stored, and there is no sign-up or limit on how many systems you solve.

Related Tools

The System of Equations Calculator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

Comments

Questions, corrections, and useful tips are welcome. Comments are reviewed before publication.

Loading comments...

Comments are stored and moderated using Cusdis Cloud. Email is optional. Privacy Policy

As featured on

CodeItBro - Free dev tools + practical guides to help you ship faster | Product HuntCodeItBro - Free Online Developer Tools badgeCodeItBro badge