Gaussian Elimination Calculator

Gaussian elimination is the standard, reliable method for solving systems of linear equations, the technique that sits at the heart of linear algebra and turns a tangle of simultaneous equations into a clean, step-by-step solution, and this calculator carries it out for systems of two or three unknowns. Choose the size, enter the coefficients and the right-hand-side values for each equation, and it returns the values of the unknowns, or tells you clearly when the system has no unique solution, updating as you type. The method works by treating the equations as an augmented matrix and using row operations, swapping rows and adding multiples of one row to another, to introduce zeros below the diagonal, gradually reshaping the system into an upper triangular form. Once it is triangular, the bottom equation involves only the last unknown, so it can be read off directly, and then each value is substituted back up into the equations above, a process called back-substitution, until every unknown is found. The calculator also handles the awkward cases honestly: if the equations are contradictory there is no solution, and if one is just a combination of the others there are infinitely many, and it flags these rather than returning a misleading answer. This is the same procedure done by hand in classrooms and, in a more refined form, inside the software that solves enormous systems in engineering, economics and science. That makes the tool genuinely useful for students learning to solve simultaneous equations, row reduction and back-substitution and checking homework, and for anyone who needs a quick, dependable solution to a small linear system. The method and a worked example are explained clearly below.

Advertisement
x = 2, y = 3, z = -1
solution

How it works

The equations form an augmented matrix. The calculator uses partial pivoting (choosing the largest pivot) and row operations to make the system upper triangular, then back-substitutes from the last equation upward. If a pivot is effectively zero, the system has no unique solution.

Worked example

For 2x + y - z = 8, minus 3x minus y plus 2z = minus 11, and minus 2x plus y plus 2z = minus 3: elimination and back-substitution give x = 2, y = 3 and z = minus 1. Substituting back into each equation confirms the solution.

Related calculators

Frequently asked questions

What is Gaussian elimination?

Gaussian elimination is a systematic method for solving a system of linear equations. It uses row operations to turn the equations into a triangular form, then solves for the unknowns one at a time by back-substitution from the bottom up.

How does Gaussian elimination work?

You write the equations as an augmented matrix, then add multiples of one row to another to create zeros below the diagonal, producing an upper triangular system. The last equation gives one unknown directly, and you substitute back up to find the rest.

When does a system have no unique solution?

If elimination produces a row of zeros equal to a non-zero number, there is no solution. If it produces a row of all zeros, there are infinitely many solutions. A unique solution exists only when the coefficient matrix has full rank.

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland by SiteHost New Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-08-15 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.