Math · free · step by step

Equation Solver

Solve linear, quadratic, cubic and higher equations exactly, with surds and complex roots, and simultaneous equations with up to four unknowns. Every step is shown and the answer is drawn on a graph.

Solution

Step by step

Graph

Worked examples

Examples with answers

TypeEquationSolution
Quadraticx^2 - 5x + 6 = 02, 3
Quadratic with surdsx^2 - 5x + 3 = 0(5 − √13)/2, (5 + √13)/2
Complex rootsx^2 + 2x + 5 = 0−1 − 2i, −1 + 2i
Cubicx^3 - 6x^2 + 11x - 6 = 01, 2, 3
Linear3(x - 2) = 2x + 17
Two unknownsx + y = 5
x - y = 1
x = 3, y = 2
Three unknownsx + y + z = 6
2x - y + z = 3
x + 2y - z = 2
x = 1, y = 2, z = 3
Circle and linex^2 + y^2 = 25
y = x + 1
(−4, −3) and (3, 4)
Exponential2^x = 10≈ 3.32192809489

Reference

The quadratic formula and the discriminant

For a·x² + b·x + c = 0 with a ≠ 0, the solutions are given by the quadratic formula. The discriminant D = b² − 4ac, the part under the square root, tells you what kind of solutions to expect before you work them out.

x=−b±b2−4ac2a

DiscriminantSolutionsExample
D > 0Two different real solutions; the parabola crosses the x-axis twice.x² − 5x + 6 = 0 → 2, 3
D = 0One repeated solution; the parabola touches the x-axis.x² − 4x + 4 = 0 → 2
D < 0Two complex solutions and no real ones; the parabola misses the x-axis.x² + 2x + 5 = 0 → −1 − 2i, −1 + 2i

Simultaneous equations

How elimination works

Write the equations as rows of numbers (a matrix), then add or subtract multiples of one row from another until each row holds a single unknown. The solver does this with exact fractions and shows each row operation, such as R2 → R2 − 2·R1. If a row ends up saying 0 = 5 there is no solution; if a whole row becomes 0 = 0 there are infinitely many.

More math

Other math tools

Questions

Equation Solver FAQ

Free, private and works offline: everything is worked out in your browser.

How do I solve an equation?

Type it with an equals sign, for example 3(x − 2) = 2x + 1, and the answer appears as you type: x = 7. Every step is shown underneath, and the graph marks where the two sides meet.

How do I solve a quadratic equation?

Use the quadratic formula x = (−b ± √(b² − 4ac)) / 2a for ax² + bx + c = 0. For x² − 5x + 6 = 0, a = 1, b = −5 and c = 6, so x = 2, 3. The solver shows a, b, c, the discriminant and the simplified answer, including surds such as x = (5 − √13)/2, (5 + √13)/2.

What does the discriminant tell me?

The discriminant D = b² − 4ac decides the kind of solutions: D > 0 gives two different real solutions, D = 0 one repeated solution, and D < 0 two complex solutions with no real ones (the parabola never touches the x-axis).

Can it find complex roots?

Yes. x² + 2x + 5 = 0 has D = −16, so x = −1 − 2i, −1 + 2i, where i² = −1. Cubic and higher equations list their complex roots too.

How do I solve simultaneous equations?

Put each equation on its own line, for example x + y = 5 and x − y = 1, giving x = 3, y = 2. Two, three or four unknowns are solved exactly with fractions by elimination, step by step. Two non-linear equations, such as a circle and a line, are solved numerically: x² + y² = 25 and y = x + 1 meet at (−4, −3) and (3, 4).

What if there is no solution or infinitely many?

The solver says so. x = x + 1 has no solution; 2(x + 1) = 2x + 2 is true for every x. For simultaneous equations, parallel lines (x + y = 2 and x + y = 5) have no solution, and the same line written twice has infinitely many, given in terms of a free variable.

Can it solve cubic and quartic equations?

Yes. It looks for rational roots first (x³ − 6x² + 11x − 6 = 0 gives x = 1, 2, 3), divides them out and finishes with the quadratic formula. Equations like x³ = 2 give the exact root ∛2. Anything left is found numerically, complex roots included.

How does it solve equations like sin x = 0.5 or 2^x = 10?

These have no simple formula, so the solver searches a range (−10 to 10 unless you change it) and finds every place where the two sides meet, to about 10 digits: 2^x = 10 gives x ≈ 3.32192809489. Choose DEG for trig in degrees; sin x = 0.5 from 0° to 360° gives x = 30° and 150°.

Is it free and private?

Yes. Everything is worked out in your browser, nothing you type is sent anywhere, and there is no sign-up. A link to your equation can be copied to share it.

Built and maintained by Zubaer Ahammed · Updated · Runs on your device; nothing you add is uploaded