Cubic / Quartic Solver
Find all real and complex roots of a cubic or quartic polynomial, shown on the graph and on the complex plane.
Your Values
Visualization
Results
Step-by-Step Solution
How Cubic / Quartic Solver Works?
The cubic / quartic solver checks the degree, lists the rational root candidates, finds every root at once with the Durand–Kerner method, and refines each root with Newton’s method.
- Type a degree 3 or 4 polynomial
- Check the degree
- List rational candidates ±p/q
- Iterate Durand–Kerner on all roots
- Polish each root with Newton’s method
- Verify with Vieta’s sum of roots
The top chart shows the real roots as x-intercepts. The complex plane below it shows every root, real roots on the horizontal axis and complex roots as mirrored pairs.
Cubic / Quartic Formula
The cubic formula solves ax³ + bx² + cx + d = 0 through the depressed cubic t³ + pt + q = 0, and the cubic discriminant Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d² decides the type of roots.
- p
- (3ac − b²) / 3a²
- q
- (2b³ − 9abc + 27a²d) / 27a³
- x
- t − b / 3a
- Δ > 0
- 3 distinct real roots
- Δ < 0
- 1 real and 2 complex roots
| Equation | Roots | Factored form |
|---|---|---|
| x³ − 6x² + 11x − 6 = 0 | 1, 2, 3 | (x − 1)(x − 2)(x − 3) |
| x⁴ − 5x² + 4 = 0 | −2, −1, 1, 2 | (x² − 1)(x² − 4) |
| x³ + x + 1 = 0 | −0.6823 and 0.3412 ± 1.1615i | 1 real, 2 complex |
| x⁴ + 1 = 0 | ±0.7071 ± 0.7071i | 4 complex roots |
Gerolamo Cardano published the cubic formula in Ars Magna in 1545, and the same book contained Lodovico Ferrari’s solution of the quartic.