How to solve an equation
- Pick the type of equation: linear, quadratic, cubic, or a system of two or three linear equations.
- Type the coefficients into the boxes. Use negative numbers for minus signs, and 0 for missing terms: for x² − 9 = 0 enter a = 1, b = 0, c = −9.
- The solution appears instantly with the working shown underneath.
Methods used
Quadratic equations are solved with the quadratic formula x = (−b ± √(b² − 4ac)) ÷ 2a. The discriminant b² − 4ac decides the type of answer: positive gives two real roots, zero gives one repeated root, and negative gives two complex roots, shown as p ± qi. The vertex and factored form are included so you can sketch the parabola.
Cubic equations use Cardano's method: after dividing by a and shifting x, the cubic becomes t³ + pt + q = 0, solved with cube roots when it has one real root, or the trigonometric form when it has three. Systems of linear equations are solved with Cramer's rule, which divides determinants. If the main determinant is zero, the lines or planes are parallel or identical, so there is no single solution.
Answers are computed with double-precision arithmetic and shown to 10 significant figures; values within 10⁻¹² of zero are shown as 0. Everything runs in your browser.
What does a negative discriminant mean?
The parabola does not cross the x-axis, so there are no real solutions. The two solutions are complex numbers.
How do I enter x² = 5x?
Move everything to one side first: x² − 5x = 0, so a = 1, b = −5, c = 0. The roots are 0 and 5.
Can it solve systems with fractions?
Yes. Type decimals for the coefficients (0.5 for 1/2). The answer is given as a decimal; use the fraction calculator to convert it.