Equation Solver
Solve linear, quadratic and cubic equations and 2 or 3 simultaneous equations, with steps
- Move x terms to the left and numbers to the right (change the sign when a term crosses =)3x = 20 − 5(5 moves to the right as −5)
- Combine like terms3x = 15
- Divide both sides by 3x = 15 ÷ 3 = 5
- Check by putting the answer backLeft side = 20, right side = 20. They match.
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Pick the kind of equation from the tabs at the top: Linear, Quadratic, Cubic or System.
- For a linear equation, type it as you would write it, for example 3x + 5 = 20 or 2(x − 3) = x + 4. For a quadratic or cubic, enter the coefficients a, b, c (and d), or type the whole equation in "Or type the equation" and tap Fill.
- For simultaneous equations, choose 2 or 3 equations, then type them (2x + 3y = 7) or switch to Coefficient grid and fill in the numbers.
- The answer appears as you type, in exact form (fractions and surds) with decimals where useful. Scroll down for the step-by-step solution. Use copy result for just the answer, copy with steps to paste the full working into your notes, and clear to empty the boxes and start again.
One equation solver for linear, quadratic, cubic and simultaneous equations
This equation solver handles the four kinds of equations you meet from Class 8 to Class 12 and in JEE practice: a linear equation in one variable, a quadratic, a cubic, and a system of two or three linear equations. You can type the equation the way it appears in your book. The answer comes out exact (7/3, not 2.3333), and every step is shown so you can check your own working rather than just copy an answer.
Linear equations: move, combine, divide
A linear equation has the variable only to the first power. The method is always the same: bring the x terms to one side and the numbers to the other (a term changes its sign when it crosses the = sign), combine like terms, then divide by the coefficient of x.
2x − 6 = x + 4
2x − x = 4 + 6
x = 10
If the x terms cancel, you get either a false statement like 0 = 2 (no solution) or a true one like 0 = 0 (every value of x works). The solver tells you which.
Quadratic equations
For ax² + bx + c = 0 the solver finds the discriminant D = b² − 4ac, states the nature of the roots, and uses x = (−b ± √D) / 2a. Roots stay exact: x² + 2x − 7 = 0 gives x = −1 ± 2√2. When D is negative the roots are shown as complex numbers in the form a ± bi, which is how you write them from Class 11 onwards.
Cubic equations and the rational root test
For ax³ + bx² + cx + d = 0 with whole-number coefficients, any rational root must be ±(a factor of d) ÷ (a factor of a). The solver lists these candidates and tries each one. Once a root r is found, synthetic division leaves a quadratic, which is then solved exactly.
Example: x³ − 6x² + 11x − 6 = 0. The candidates are ±1, ±2, ±3, ±6. Putting x = 1 gives 1 − 6 + 11 − 6 = 0, so (x − 1) is a factor and the equation becomes (x − 1)(x² − 5x + 6) = 0. The roots are 3, 2 and 1.
When there is no rational root, as with x³ − 2x − 5 = 0, the roots are found numerically (Cardano's formula or the trigonometric method) and shown to six decimal places: here x ≈ 2.094551, plus a pair of complex roots. The cubic discriminant Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d² tells you in advance what to expect:
| Discriminant | Roots |
|---|---|
| Δ > 0 | Three different real roots |
| Δ = 0 | All roots real, at least two equal |
| Δ < 0 | One real root and two complex roots |
Systems of linear equations
For two equations a₁x + b₁y = c₁ and a₂x + b₂y = c₂, the solver works out D = a₁b₂ − a₂b₁ and, when D ≠ 0, uses Cramer's rule: x = Dx/D and y = Dy/D. For 2x + 3y = 7 and x − y = 1, D = −5, Dx = −10 and Dy = −5, so x = 2 and y = 1.
When D = 0 there is no single answer. The Class 10 ratio test explains why:
- a₁/a₂ ≠ b₁/b₂: the lines cross at one point (a unique solution).
- a₁/a₂ = b₁/b₂ ≠ c₁/c₂: the lines are parallel, so there is no solution.
- a₁/a₂ = b₁/b₂ = c₁/c₂: both equations describe the same line, so there are infinitely many solutions. The solver writes them in general form, such as x = 2 − y.
Three equations in x, y and z work the same way with 3×3 determinants. Behind the scenes the solver row-reduces the equations with exact fractions, so it can also tell a system with no solution from one with infinitely many when the determinant is 0. This is the "consistency of a system" question that comes up in Class 12 matrices and in JEE Main.
Tips
- 3x means 3 × x, and 2(x + 1) means 2 × (x + 1). Use ^ or ² for powers: x^2 or x².
- Fractions are fine: x/3 + x/4 = 7 gives x = 12. You can't divide by an expression containing x, so multiply both sides by it first.
- Always substitute the answer back into the original equation. The solver does this check for you in the last step.