Skip to content
LoveToCalc

Equation solver

Type an equation or an inequality and see how it is solved, line by line, with the reason for every step.

Write powers as x^2 or x². The multiplication sign can be left out: 2x, 3(x + 1). For an inequality, use <, >, <= or >=.

Try:

Solution and working

Solution

  • x equals 5

Working

  1. 3 times (x minus 2) equals x plus 4

  2. Expand the brackets.

    (3 times x) minus 6 equals x plus 4

  3. Subtract x from both sides.

    (2 times x) minus 6 equals 4

  4. Add 6 to both sides.

    2 times x equals 10

  5. Divide both sides by 2.

    x equals 5

How to use the solver

Which equations it solves

Linear equations in any arrangement. Brackets are multiplied out, fractions are cleared by multiplying both sides by the common denominator, and then x is gathered on one side and the numbers on the other.

Quadratic equations are solved the shortest way that works:

If the equation has a double root or no real solutions, the solver says so. If both sides are always equal, as in 2(x + 1) = 2x + 2, every x is a solution, and if they can never be equal there is none.

Cubic equations are solved when they have a whole-number root. With no constant term, x is factored out. Otherwise the solver tries the divisors of the constant term until the left side becomes zero, divides that factor out by polynomial division, and solves the quadratic that is left.

Inequalities of the first and second degree, and of the third when they have a whole-number root. A linear inequality is solved like an equation, with one exception that the solver writes out on the line where it happens: when both sides are multiplied or divided by a negative number, the inequality sign turns. From the second degree on, everything moves to the left side, the zeros are worked out, and a sign table shows where the expression is positive and where it is negative. The answer is given both as an inequality and in interval notation, for example −2 < x < 3, that is x ∈ (−2, 3). If the expression has no zeros, the solver says whether it is positive or negative for every x.

What it does not solve it says plainly instead of guessing: x in a denominator (1/x = 2), x under a root or inside a function, two unknowns in one equation, cubics with no whole-number root, equations of degree four or higher, and double inequalities such as 1 < x < 3. They need other methods than the ones written out here.

Worked examples

Brackets. 3(x − 2) = x + 4. Multiply out: 3x − 6 = x + 4. Subtract x from both sides: 2x − 6 = 4. Add 6: 2x = 10. Divide by 2: x = 5. Substitute to check: 3 · 3 = 9 and 5 + 4 = 9.

Factorising. x² − 5x + 6 = 0. Two numbers with product 6 and sum −5 are −2 and −3, so the equation is (x − 2)(x − 3) = 0. A product is zero when one of its factors is: x = 2 or x = 3.

The quadratic formula. 2x² + 3x − 1 = 0 has no whole-number roots. With a = 2, b = 3 and c = −1 the formula gives x = (−3 ± √(9 + 8))/4 = (−3 ± √17)/4, about 0.281 and −1.781.

A linear inequality. 1 − 2x > 7. Subtract 1 from both sides: −2x > 6. Divide by −2, and turn the sign because the number is negative: x < −3. Try x = −4: 1 + 8 = 9, and 9 > 7.

A sign table. x² − x − 6 < 0. The zeros are x = −2 and x = 3, so the left side is (x + 2)(x − 3). Both factors are negative to the left of −2, so the product is positive there. Between the zeros the factors have opposite signs and the product is negative, and to the right of 3 it is positive again. The inequality holds where the product is negative: −2 < x < 3.

A cubic. x³ − 6x² + 11x − 6 = 0. Try x = 1: 1 − 6 + 11 − 6 = 0, so x − 1 is a factor. Polynomial division leaves x² − 5x + 6, which factorises as (x − 2)(x − 3). The solutions are x = 1, x = 2 and x = 3.

Last reviewed October 8, 2026 ·How pages are reviewed

The formula behind this

All math calculators

Put this calculator on your site

Copy the code into your page where the calculator should appear. It loads from lovetocalc.com, so it stays current on its own — all we ask is that the credit line comes with it.