Cubic and Quartic Equation Calculator
Enter the coefficients and get the roots right away.
🔒 Your input is never sent to a server.
Solution
Graph
Click the graph to select it; then you can zoom with the mouse wheel and pan by dragging. Until it is selected, the wheel scrolls the page. (Deselect: click outside the graph or press Esc. On mobile: tap it, then pinch to zoom.)
How to use
Choose cubic (ax³ + bx² + cx + d = 0) or quartic (ax⁴ + bx³ + cx² + dx + e = 0) and enter the coefficients; the roots appear immediately. Enter 0 for a missing term. Show solution shows the order of solving, and Show graph shows the graph and the x-intercepts (real roots). The equation you entered is shown large at the top.
How is it solved?
If the coefficients are integers, the rational root theorem is used first to find integer and fractional roots. For a root x = p/q, p must divide the constant term and q must divide the leading coefficient. Once a root is found, the factor theorem lets us split off the factor (qx − p) and lower the degree. The remaining quadratic is solved with the quadratic formula, and cubics or quartics with no rational root are solved numerically (Durand–Kerner) for approximate values.
Substituting x = t − b/3a turns a cubic into t³ + pt + q = 0, and the discriminant Δ = −(4p³ + 27q²) tells the kind of roots: Δ > 0 three distinct real roots · Δ = 0 a repeated root · Δ < 0 one real root and two complex roots.
FAQ
What if a is 0?
The leading term disappears and the degree drops. For a quadratic, use the Quadratic Equation Calculator.
What is a complex root?
A root that contains i, the number whose square is negative (i² = −1). On the graph it corresponds to where the curve does not meet the x-axis.
How accurate are the approximate values?
Values are shown to about 10 significant digits. Repeated roots can drift slightly because of rounding, so integer coefficients are first handled with the exact method.
Results are for reference only and accuracy is not guaranteed. Terms & disclaimer