Browse All Calculators

Linear Equations Calculator

Free linear equations calculator to solve a system of 2 or 3 equations. Get exact fractions, a graph, a check of your answer and step-by-step working.

100% Free
No Sign-up
Instant Results
Works on Mobile

Linear Equations Calculator

Number of equations
Equation 1
x coefficient
y coefficient
Constant
Equation 2
x coefficient
y coefficient
Constant
Equation 1Equation 2
Showing x and y from −10 to 10
Unique solution
x = 3, y = −1
NoneOneInfinite
x
3
y
−1
Lines
One point
Determinant (D)
−3
Exact answer
x = 3, y = −1
Check your answer
  • Equation 1: 2 × 3 + 1 × (−1) = 5. Matches 5.
  • Equation 2: 1 × 3 + (−1) × (−1) = 4. Matches 4.
Step-by-step working
  1. Write the system. Equation 1: 2x + y = 5. Equation 2: x − y = 4.
  2. Find the determinant: D = a₁b₂ − a₂b₁ = 2 × (−1) − 1 × 1 = −3.
  3. Find Dx = c₁b₂ − c₂b₁ = 5 × (−1) − 4 × 1 = −9, so x = Dx ÷ D = (−9) ÷ (−3) = 3.
  4. Find Dy = a₁c₂ − a₂c₁ = 2 × 4 − 1 × 5 = 3, so y = Dy ÷ D = 3 ÷ (−3) = −1.
Quick note
The two lines cross at one point, (3, −1). Put those values into either equation to confirm it holds.
Linear Equations Calculator - solve systems of linear equations online on HighCalc

Linear Equations Calculator: Solve Systems of Equations Online

This free linear equations calculator solves a system of two or three equations and shows you exactly how the answer comes about. Type in the coefficients of x, y (and z) and the constant on the right of each equation, and the page returns the solution, the determinant, a check of every equation and the full working. With two equations it also draws both lines, so you can see where they meet.

Quick answer: to solve 2x + y = 5 and x − y = 4, add the two equations to remove y. That gives 3x = 9, so x = 3, and putting this back into the second equation gives y = −1. The calculator reaches the same result and also reports that the determinant is −3, which tells you the answer is unique.

What Is a System of Linear Equations?

A linear equation is an equation where each unknown appears only to the first power, such as 2x + y = 5. On a graph it is a straight line. A system of linear equations is a set of two or more of these equations that must all be true at the same moment. Solving the system means finding the values of the unknowns that make every equation correct. Two lines can cross at one point, run side by side without ever meeting, or lie on top of each other, and these three cases are exactly the three kinds of answer you can get: one solution, no solution, or infinitely many.

How the Calculator Finds the Answer

Two methods work together behind the screen. For the main result the calculator uses Gaussian elimination, which adds multiples of one equation to another until each unknown stands alone. For the working shown on the page it uses Cramer's rule, which writes every unknown as a ratio of two determinants. All of the arithmetic is done with exact fractions, so a result such as 17/11 is never turned into a rounded decimal halfway through.

Two equations: a₁x + b₁y = c₁ and a₂x + b₂y = c₂D = a₁b₂ − a₂b₁, x = (c₁b₂ − c₂b₁) ÷ D, y = (a₁c₂ − a₂c₁) ÷ D

When D is not zero there is exactly one solution. When D is zero the two lines have the same slope, so they are either parallel (no solution) or the same line (infinitely many). The table below shows one example of each case.

SystemDeterminant DResult
2x + y = 5
x − y = 4
−3One solution: x = 3, y = −1
3x − 2y = 7
5x + 4y = 3
22One solution: x = 17/11, y = −13/11
x + 2y = 4
2x + 4y = 8
0Infinitely many solutions (same line)
x + y = 2
x + y = 5
0No solution (parallel lines)
2x + y − z = 8
−3x − y + 2z = −11
−2x + y + 2z = −3
−1One solution: x = 2, y = 3, z = −1

Solving Three Equations with Three Unknowns

Many problems in algebra, physics and economics have three unknowns rather than two. Choose the 3 equations mode and enter the coefficients of x, y and z for each row. The calculator finds the determinant of the 3 by 3 coefficient matrix, then replaces each column with the constants to get Dx, Dy and Dz. For the default example the determinant is −1 and the solution is x = 2, y = 3 and z = −1. If the planes do not meet at a single point, you are told whether there is no common point or a whole line or plane of solutions.

Exact Fractions, Decimals and the Graph

Textbook answers are usually fractions, so the calculator shows them that way first and adds a decimal rounded to four places. For 3x − 2y = 7 and 5x + 4y = 3 the exact answer is x = 17/11 and y = −13/11. The graph for two equations adjusts itself to fit the intersection point, and the range slider lets you zoom in or out. If you only need to simplify or compare fractions, the fraction calculator is quicker, and for expressions that go beyond straight lines you can use the math solver.

Limits and Good Practice

This tool handles systems with as many equations as unknowns, up to three. Enter plain numbers, including decimals and negatives, and write each equation in the form ax + by = c first, moving any terms across the equals sign if needed. A coefficient of zero is fine, and it simply means that unknown does not appear in that equation. Always read the check section: it substitutes the solution back into each equation so you can confirm the result yourself.

Who Uses a Linear Equations Calculator?

Students use it to check homework and to see the working behind an answer. Teachers use it to prepare examples quickly. Engineers and scientists use systems of equations for circuits, forces and mixtures, and business owners use them for pricing and break-even problems, such as finding the quantity where cost equals revenue. For general arithmetic alongside your algebra, the scientific calculator and the percentage calculator are handy companions.

How to Use This Linear Equations Calculator

1

Choose 2 or 3 equations

Pick the number of unknowns. Two equations use x and y, three use x, y and z.

2

Enter the coefficients

Fill in the number in front of each unknown. Use 0 when an unknown is missing, and a minus sign for negatives.

3

Add the constants

Type the value on the right side of each equation. The equation is shown above the boxes as you type.

4

Read the solution

The answer, determinant, graph, check and step-by-step working update as soon as you change a number.

Features

Instant Results
The answer updates the moment you change a value
Exact Fractions
Answers are shown as fractions and as decimals
2 or 3 Unknowns
Solve systems in x and y, or in x, y and z
Live Graph
See both lines and the point where they cross
Step-by-Step Working
Follow the determinant method line by line
Mobile Friendly
Works smoothly on phones, tablets and desktops
Frequently Asked Questions
Common questions about the Linear Equations Calculator.
How do I solve a system of linear equations?
Enter the coefficients and the constant for each equation, then press Calculate. The calculator uses row reduction and Cramer's rule to find the values that satisfy every equation at the same time. For example, 2x + y = 5 and x − y = 4 give x = 3 and y = −1, and the page shows the working and a check of both equations.
What does it mean when there is no solution?
It means the equations contradict each other. With two variables the lines have the same slope but different positions, so they are parallel and never cross. For instance, x + y = 2 and x + y = 5 cannot both be true. The calculator reports this as no solution and shows the determinant as 0.
What if the calculator says infinitely many solutions?
The equations describe the same line (or plane), so every point on it works. In that case the answer is written with a parameter, such as x = 2 − t and y = t. Replace t with any number to get one valid pair. For example, x + 2y = 4 and 2x + 4y = 8 are the same line written twice.
Can I solve three equations with three unknowns?
Yes. Switch the mode at the top of the calculator to 3 equations, enter the coefficients of x, y and z and the constants, and the calculator finds x, y and z. The default example, 2x + y − z = 8, −3x − y + 2z = −11 and −2x + y + 2z = −3, gives x = 2, y = 3 and z = −1.
Does the calculator give fractions or decimals?
Both. All the working is done with exact fractions, so there are no rounding errors along the way, and each answer is shown as a fraction and as a decimal rounded to four places. For example, 3x − 2y = 7 and 5x + 4y = 3 give x = 17/11 and y = −13/11, which is about 1.5455 and −1.1818.
What is the determinant and why does it matter?
The determinant D combines the coefficients of the unknowns into one number. If D is not zero, the system has exactly one solution. If D is zero, the equations are either parallel (no solution) or identical (infinitely many solutions). The calculator shows D so you can see straight away which case you are in.