Skip to content
Mathematics

Cubic equation solver

Calculate the real and complex roots of a·x³ + b·x² + c·x + d = 0 and the coefficients of the depressed cubic.

Free & no registration Calculated in your browser
01

Your inputs

The starting values are an example.

Decimals: 12.5 · Thousands: 1,234.56. Follow the field instructions for lists.

02

Your result

Enter your values and select Calculate.

Your calculation will appear here.

Your result will include the relevant values and units.

Understand the calculation

Formula and example

How it is calculated

With A=b/a, B=c/a, C=d/a and x=t−A/3, the equation becomes t³+pt+q=0, where p=B−A²/3 and q=2A³/27−AB/3+C.

Worked example

x³ − 6x² + 11x − 6 = 0 has roots 1, 2 and 3. Substituting x=t+2 gives t³−t=0.

Things to check

  • Cardano and trigonometric formulas give numerical approximations. Nearly coincident roots are sensitive to rounding.
  • If a = 0, the quadratic or linear calculation takes over.

Frequently asked questions

Why can a root occur more than once?

Multiplicity describes how often its factor occurs in the polynomial. (x−1)³ has only one distinct root, but the root 1 has multiplicity three.