Equation Solver
Solve linear and quadratic equations and pairs of linear equations exactly, with square roots, complex roots and the working.
Your equation
Filled in with example values. Replace them with your own.
Whole numbers, decimals or fractions (−3, 0.5, 2/3). Use a negative number for a minus sign; an empty box counts as 0.
Results update as you type.
Result
x1 = 1 − √2 ≈ −0.4142135624
Two real roots
x = 1 − √2, x = 1 + √2
- Discriminantb² − 4ac
- 8
- VertexLowest or highest point
- (1, −2)
How it’s solved
Discriminant
b² − 4ac = (-2)² − 4 × 1 × (-1) = 8
Quadratic formula
x = (−b ± √discriminant) ÷ 2a = 1 − √2, 1 + √2
How the equation solver works
Choose the type of equation and type its coefficients into the boxes. They can be whole numbers, decimals or fractions. The solver works with exact fractions throughout, so answers like 5/18 or 1 ± √2 stay exact, and shows the decimal value and the working.
The formulas
Linear: ax + b = c → x = (c − b) ÷ a
Quadratic: ax² + bx + c = 0 → x = (−b ± √(b² − 4ac)) ÷ 2a
Two equations (Cramer’s rule): x = (c₁b₂ − b₁c₂) ÷ (a₁b₂ − b₁a₂)
y = (a₁c₂ − c₁a₂) ÷ (a₁b₂ − b₁a₂)
Worked examples
- 2x + 3 = 11: 2x = 8, so x = 4.
- x² − 3x + 2 = 0: discriminant 9 − 8 = 1, so x = (3 ± 1) ÷ 2: x = 1 or x = 2.
- x² − 2x − 1 = 0: discriminant 8 = 4 × 2, so x = 1 ± √2 ≈ −0.414 or 2.414.
- 2x² + 4x + 10 = 0: discriminant −64, so x = −1 ± 2i (no real roots).
- 2x + 3y = 12 and 4x − y = 10: x = 3, y = 2.
Frequently asked questions
What does the discriminant tell me?
For ax² + bx + c = 0, the discriminant b² − 4ac decides the roots. Positive: two different real roots. Zero: one repeated root. Negative: no real roots, only two complex ones.
Why are some answers written with √?
When the discriminant is not a perfect square, the roots are irrational. The calculator gives them exactly, with the square root simplified (for example 1 ± √2), and as decimals.
How do I enter x² − 5 = 0?
Put 1 for a, leave b empty (or 0) because there is no x term, and enter −5 for c. Move every term to one side first so that the equation equals 0.
What if the two equations have no single solution?
If the lines are parallel they never meet, so there is no solution. If both equations describe the same line, every point on it is a solution. The calculator tells you which.