Algebra Equation Solver

Solve linear equations and systems of two equations step by step, with a substitution check, plus quick decimal roots for quadratics.

How we test our calculators
Solution —
Steps —
Check —
Discriminant (quadratic only) —

What is an algebra equation solver?

An algebra equation solver finds the value of the unknown that makes an equation true. This one solves linear equations in one variable and systems of two linear equations step by step, and has a quick mode for quadratics. Choose the Equation type:

  • Linear: ax + b = c (the default). The solver isolates x by subtracting b and dividing by a, and shows each step it needs. If a is 0, it tells you whether the equation is true for every x or has no solution.
  • System of two equations: ax + by = c, dx + ey = f. The solver uses Cramer's rule to find the pair (x, y) that satisfies both equations. When the two lines are parallel it reports no solution, and when they are the same line it reports infinitely many solutions.
  • Quadratic: ax² + bx + c = 0. The solver gives the roots as decimals, including complex roots, and the discriminant. For exact radical answers, the vertex and the factored form, use the dedicated quadratic equation calculator.

Every answer comes with Steps and, for linear equations and systems, a Check that substitutes the solution back into the original equations. These skills are in the Common Core standards: solving linear equations in one variable and recognizing equations with one, infinitely many or no solutions (8.EE.C.7), solving pairs of linear equations (8.EE.C.8), and, in high school, solving systems of linear equations exactly (A-REI.C.6).

Formula

Linear: ax + b = c

Subtract b from both sides, then divide both sides by a:

ax = c − b, so x = (c − b) ÷ a, as long as a ≠ 0.

If a = 0 there is no x term left and the equation reads b = c. When b equals c, the statement is always true and every x is a solution; otherwise it is never true and there is no solution.

System: ax + by = c and dx + ey = f

Cramer's rule writes the solution with determinants:

  • det = ae − bd
  • x = (ce − bf) ÷ det
  • y = (af − cd) ÷ det

The numerators are the determinant with the x column, then the y column, replaced by the constants c and f. Each equation is a straight line, and the solution is the point where the lines cross.

The rule needs det ≠ 0. When det = 0, the two lines have the same slope, so there is no single crossing point: either they are parallel (no solution) or they are the same line (infinitely many solutions). Cramer's rule alone cannot tell these apart, so the solver also checks whether the other two determinants are 0. If they are, the equations describe the same line.

Quadratic: ax² + bx + c = 0

The quadratic formula, x = (−b ± √D) ÷ (2a) with discriminant D = b² − 4ac, gives two real roots when D > 0, one repeated root when D = 0, and two complex roots when D < 0. In this mode a must not be 0.

Worked example

Example 1: a linear equation

Solve 5x − 4 = 21: a = 5, b = −4 and c = 21.

The Steps read 5x − 4 = 21 → add 4 on both sides: 5x = 25 → divide both sides by 5: x = 25 ÷ 5 = 5, so the solution is x = 5, and the Check reads 5 × 5 − 4 = 21 ✓.

Example 2: x on both sides

Solve 2x + 3 = 5x − 7. First collect the x terms on one side: subtracting 5x from both sides gives −3x + 3 = −7, so a = −3, b = 3 and c = −7.

  1. Subtract 3 on both sides: −3x = −10.
  2. Divide both sides by −3: x = −10 ÷ (−3) = 10/3 ≈ 3.333333.

Check in the original: 2 × 10/3 + 3 = 29/3 and 5 × 10/3 − 7 = 29/3.

Example 3: a system with one solution

Solve 2x + 3y = 13 and 4x − y = 5: a = 2, b = 3, c = 13, d = 4, e = −1 and f = 5.

  1. det = ae − bd = 2 × (−1) − 3 × 4 = −2 − 12 = −14.
  2. x = (ce − bf) ÷ det = (13 × (−1) − 3 × 5) ÷ (−14) = −28 ÷ (−14) = 2.
  3. y = (af − cd) ÷ det = (2 × 5 − 13 × 4) ÷ (−14) = −42 ÷ (−14) = 3.

The solution is x = 2, y = 3, and the Check reads Equation 1: 13 = 13; Equation 2: 5 = 5.

Example 4: no solution and infinitely many

  • x + 2y = 4 and 2x + 4y = 8: det = 1 × 4 − 2 × 2 = 0. The second equation is the first multiplied by 2, so both describe the same line: Infinitely many solutions (the same line).
  • x + 2y = 4 and 2x + 4y = 10: det is again 0, but doubling the first equation gives 2x + 4y = 8, which cannot also equal 10. The lines are parallel: No solution (parallel lines).

Example 5: a quadratic

For x² − 3x + 2 = 0, the solver gives D = (−3)² − 4 × 1 × 2 = 1 and the roots x₁ = 2, x₂ = 1. For x² − 4x + 1 = 0 it gives x₁ = 3.732051, x₂ = 0.267949; the quadratic equation calculator shows the same roots exactly, as 2 ± √3.

How to use this calculator

  1. Pick the Equation type: linear, system of two equations, or quadratic.
  2. Rewrite your equation in the form shown in the menu, with like terms collected.
  3. Enter the coefficients with their signs. A missing term has coefficient 0, and a lone x has coefficient 1.
  4. For a system, also enter d, e and f for the second equation. Until you do, it reads 0 = 0, and the solver reports "Infinitely many solutions (only one real equation)".
  5. Read the Solution, follow the Steps, and use the Check to confirm the answer satisfies the original equations.

Getting an equation into the right form

  • Parentheses: 3(x − 2) = 9 becomes 3x − 6 = 9, so a = 3, b = −6, c = 9 and x = 5.
  • Fractions: x/4 − 2 = 1.5 has a = 0.25, b = −2, c = 1.5, giving x = 14.
  • Solved for y: y = 2x − 1 becomes −2x + y = −1 for the system mode (a = −2, b = 1, c = −1).

Common mistakes

  • Entering b with the wrong sign: in 5x − 4 = 21, b is −4.
  • Leaving terms on both sides. The linear mode expects x only on the left.
  • Mixing the order of x and y between the two equations of a system.
  • Reading det = 0 as "x = 0". It means there is no single solution.

Limits

  • Answers are rounded to six decimal places, so 10/3 appears as 3.333333. The Check uses the unrounded value.
  • In system mode, an equation with both coefficients 0 is not a line. If it reads 0 = 0, it adds nothing, and the solver reports "Infinitely many solutions (only one real equation)"; if it reads 0 = 5, it is never true, and the solver reports "No solution".
  • Inequalities, systems of three or more equations and equations of degree three or higher are not supported.

To graph either line of a system, find its slope and intercept with the slope calculator, and see slope-intercept, point-slope and standard form for converting between forms. For fraction arithmetic, use the fraction calculator.

Sources

Frequently asked questions

What do "No solution" and "Every x is a solution" mean?

They appear in linear mode when a = 0, so the x terms have cancelled. For 2x + 4 = 2x + 9, subtracting 2x from both sides leaves 4 = 9, which is never true: enter a = 0, b = 4, c = 9 and the solver shows No solution, with the steps "With a = 0 there is no x term: 4 = 9 is never true". If the result were a true statement such as 4 = 4, every x would work. The Grade 8 standard 8.EE.C.7a describes exactly these outcomes: an equation simplifies to x = a number, to a true statement like a = a, or to a false one like a = b.

Why does the check show a ✓ when the rounded numbers do not quite add up?

The Check substitutes the exact computed value, then displays numbers rounded to six decimal places. For 3x + 1 = 2, the solution is 1/3, shown as 0.333333, and the check reads 3 × 0.333333 + 1 = 2 ✓. Multiplying the rounded 0.333333 by 3 by hand gives 0.999999, but the unrounded value gives exactly 1.

What is Cramer's rule, and when does it fail?

Cramer's rule solves a system of linear equations with determinants: for two equations, x = (ce − bf) ÷ (ae − bd) and y = (af − cd) ÷ (ae − bd). It works whenever the determinant ae − bd is not 0. When it is 0, the system has either no solution or infinitely many, and another check is needed to tell which; this solver does that check for you. For two equations, elimination and substitution give the same answer, as you can confirm with the Check.

How do I enter a system where one equation is solved for y?

Move every variable term to the left. For y = 2x − 1 and x + y = 5, rewrite the first as −2x + y = −1, then enter a = −2, b = 1, c = −1, d = 1, e = 1, f = 5. The solver gives x = 2, y = 3, and the check shows Equation 1: -1 = -1 and Equation 2: 5 = 5.

How do I set up a word problem as a system?

Give each unknown a letter and write one equation for each fact. Suppose a farm has 20 animals, all chickens and rabbits, with 56 legs in total. With x chickens and y rabbits, x + y = 20 and 2x + 4y = 56. The solver gives x = 12, y = 8: 12 chickens and 8 rabbits, which is 20 animals and 24 + 32 = 56 legs.

Why does quadratic mode point to another calculator?

This mode is a quick check. It gives the roots as decimals, the discriminant and the formula steps, and when a = 0 it shows no result, because the equation is then linear. The quadratic equation calculator also gives exact roots such as 2 ± √3, the vertex and axis of symmetry, and the vertex and factored forms, and it solves the a = 0 case.