This calculator solves a system of 2 or 3 simultaneous linear equations using Gaussian elimination, the standard method taught in algebra and used across engineering, science and economics whenever several unknowns must satisfy multiple conditions at once. Choose a 2x2 system (two equations, two unknowns: x and y) or a 3x3 system (three equations, three unknowns: x, y and z), then enter the coefficient of each variable in every equation and the constant on the right-hand side of the equals sign; enter 0 if a variable does not appear in an equation. The tool works through Gaussian elimination with partial pivoting, reducing your equations to upper triangular form and applying back substitution, then returns the value of x, y and, for a 3x3 system, z in the results panel. A step-by-step working section below shows every row swap, elimination step and substitution in order, plus a verification line checking your answer against the original equations, so you can follow or mark the method. If your equations describe parallel or identical lines, the solver reports no solution or infinitely many solutions rather than forcing a false answer. Use the "Reset to example" button to reload the default worked example at any time. This tool covers linear equations only; quadratic, exponential and other non-linear systems need different methods, and very large or small coefficients can introduce floating-point rounding.
Write each equation in standard form: all variable terms on the left, the constant on the right. For example, the equation 3x - 2y = 7 has coefficients 3 (for x) and -2 (for y), and a right-hand side of 7. Enter those three numbers into the corresponding row. If a variable does not appear in an equation, enter 0 for its coefficient.
The default 2x2 system is:
| Equation | Written out |
|---|---|
| Equation 1 | 2x + 1y = 5 |
| Equation 2 | 1x + 3y = 10 |
Setting up the augmented matrix and eliminating x from equation 2: multiply equation 1 by 1/2 and subtract from equation 2. This gives the system in upper triangular form. Back substitution then yields y = 3 and x = 1. Substituting back: 2(1) + 3 = 5 and 1 + 3(3) = 10. Both equations check out.
Gaussian elimination converts the augmented coefficient matrix [A|b] into row echelon form using three elementary row operations: swapping two rows, multiplying a row by a non-zero scalar, and adding a multiple of one row to another. These operations do not change the solution set. Once upper triangular form is reached, back substitution solves for each variable from the bottom equation upward.
This solver applies partial pivoting at each elimination step: it searches the current column for the largest absolute value and swaps that row to the pivot position before eliminating. Partial pivoting reduces rounding errors and handles near-zero pivots gracefully.
If a pivot is exactly zero after all swaps (a zero column), the system is either inconsistent (no solution) or dependent (infinitely many solutions). The solver detects this and reports accordingly.
| Outcome | What it means | Geometric interpretation (2 equations) |
|---|---|---|
| Unique solution | One set of values satisfies all equations | Two lines intersect at exactly one point |
| No solution (inconsistent) | The equations contradict each other | Two parallel lines that never meet |
| Infinitely many solutions (dependent) | One equation is a multiple of another | Two equations describe the same line |
Sources and method: Gaussian elimination with partial pivoting as described in Golub and Van Loan, Matrix Computations (4th ed., Johns Hopkins University Press, 2013). Back substitution for upper triangular systems as per standard linear algebra curriculum.
This solver handles systems of linear equations only (all variables appear to the first power). Non-linear equations (quadratics, exponentials, trigonometric) require different methods. Results are computed using floating-point arithmetic; very large or very small coefficients may introduce rounding errors.
A system of linear equations is a collection of two or more equations that share the same set of unknowns (variables). The goal is to find the values of those variables that satisfy all equations simultaneously. For example, the system 2x + y = 5 and x + 3y = 10 has the unique solution x = 1, y = 3, because substituting these values makes both equations true at the same time.
Gaussian elimination transforms the system of equations into an upper triangular form using row operations: swapping rows, multiplying a row by a non-zero constant, and adding a multiple of one row to another. Once in upper triangular form, back substitution is used to solve for each variable in turn, starting from the last equation and working upward. This solver applies Gaussian elimination with partial pivoting to improve numerical stability.
A system has no solution (it is inconsistent) when the equations contradict each other, for example 2x + y = 5 and 2x + y = 8. The lines (or planes) are parallel and never intersect. A system has infinitely many solutions (it is dependent) when the equations are multiples of each other, meaning they describe the same line or plane. In both cases Gaussian elimination reveals a zero row in the coefficient matrix, and this solver will report the situation rather than showing a spurious answer.
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.