Cubic Equation Solver

Solve ax³ + bx² + cx + d = 0 and get all three roots, real or complex.

What the Cubic Equation Solver does

A cubic always has three roots counted with multiplicity, and at least one of them is real. This solver reduces the equation to a depressed cubic and applies Cardano's method, switching to the trigonometric form when all three roots are real.

Formula

  • ax³ + bx² + cx + d = 0
  • Substitute x = t − b ÷ 3a to get t³ + pt + q = 0
  • Solve by Cardano or trigonometric form

Inputs explained

InputUnitRequiredNotes
a (x³)numberYes
b (x²)numberYes
c (x)numberYes
d (constant)numberYes

How to use it

  1. Enter a (x³), b (x²), c (x) and d (constant).
  2. Select Calculate.

Worked example

Solve x³ − 6x² + 11x − 6 = 0.

a
1
b
-6
c
11
d
-6

Roots are 1, 2 and 3.

Frequently asked questions

Does a cubic always cross the x-axis?

Yes, at least once. The ends run to opposite infinities, so the curve must cross somewhere.

Related calculators