Skip to content
ihateDesmos

Equation solver with steps

Type an equation in x and get every solution with the working shown. Linear equations are solved by isolating x, quadratics by factoring or the quadratic formula, and higher-degree polynomials by the rational root test. Any other equation, like cos(x) = x, is solved numerically to twelve digits.

Solve
Result
x=1
x=2
x=3
Steps
  1. Rational root test: x = 1 is a solution, so (x − 1) is a factor
  2. Synthetic division leaves x² − 5x + 6 = 0
  3. Find two numbers that multiply to 6 and add to −5: −3 and −2
  4. Factored: (x − 3)(x − 2) = 0
  5. Zero product property: each factor can be zero
Graph both sides, to see the solutions as crossings

How to use it

  1. 1
    Type the equation with one equals sign: 3x + 5 = 2x - 7, x^2 - 2x - 1 = 0, cos(x) = x.
  2. 2
    Press Solve. Exact solutions are shown as fractions and square roots where possible; other equations get decimal solutions.
  3. 3
    Use the graph link to see both sides of the equation as curves: the solutions are where they cross.

Linear equations

A linear equation is solved by doing the same thing to both sides until x is alone. For 3x + 5 = 2x − 7:

  1. Subtract 2x from both sides: x + 5 = −7.
  2. Subtract 5 from both sides: x = −12.

Check by substituting: 3(−12) + 5 = −31 and 2(−12) − 7 = −31. Both sides agree, so x = −12 is the solution.

Quadratic equations

Move everything to one side to get ax² + bx + c = 0. If it factors, the zero product property finishes the job: x² − 5x + 6 = (x − 2)(x − 3) = 0 means x = 2 or x = 3. If it doesn’t, the quadratic formula always works:

x = (-b ± sqrt(b^2 - 4a c)) / (2a)

The quadratic equation solver page goes through the formula and the discriminant in detail.

Cubic and higher-degree polynomials

For x³ − 6x² + 11x − 6 = 0, the rational root test lists the possible rational solutions, the divisors of 6: ±1, ±2, ±3, ±6. Trying x = 1 gives 0, so it is a solution. Synthetic division by (x − 1) reduces the cubic to x² − 5x + 6 = 0, which gives x = 2 and x = 3.

Every polynomial equation of degree n has at most n real solutions. When a polynomial has no rational roots the calculator finds its real roots numerically instead.

Equations with no formula

Most equations that mix kinds of functions, like cos(x) = x or eˣ = 3 − x, have no solution in closed form. For those the calculator scans [−50, 50] for every sign change of the difference between the two sides, plus places where it touches zero without changing sign, and refines each one with Brent’s method to about twelve significant digits.

For cos(x) = x that gives x ≈ 0.739085133215, the only real solution.

Examples to try

24−220
Solutions as crossings
y = x^3 - 6x^2 + 11x - 6y = 0
The three solutions of the cubic are where its graph meets the x-axis.
Open this example
−112−110
cos(x) = x
y = cos(x)y = x
The curves cross once, at x ≈ 0.739.
Open this example
−15−10−5−200
Two sides, two lines
y = 3x + 5y = 2x - 7
The lines meet at x = −12, the solution of 3x + 5 = 2x − 7.
Open this example

Frequently asked questions

Does the equation solver show steps?
Yes, for linear, quadratic and polynomial equations: isolating x, factoring, the quadratic formula with the discriminant, and the rational root test with synthetic division. Other equations are solved numerically and the method is explained.
Can it solve equations with fractions or decimals?
Yes. Fractions are kept exact, so 1/2 x + 1/3 = 1 gives x = 4/3.
Does it find complex solutions?
For quadratics with a negative discriminant it gives the complex pair. For other equations it finds the real solutions.
How do I solve a system of equations?
Graph each equation in the calculator. Intersections are marked, and selecting one shows its coordinates. The learn page on solving systems by graphing walks through it.
Why does it only search between −50 and 50?
For equations without a formula, a numerical search needs a range. Polynomial equations are solved exactly and have no such limit.

Related tools and guides

Solve on the graph

Graph both sides of any equation and every crossing point is marked with its coordinates.

Open the calculator