Math

Cubic Equation Solver

Solve a cubic polynomial for real and complex roots, including repeated roots and equations that reduce to a lower degree.

01

Your inputs

02

Your result

Ready when you are.

Adjust the inputs, then calculate to see your result here.

Calculated on your device.

GET MORE FROM YOUR RESULT

Using the Cubic Equation Solver

Enter the coefficients of ax cubed plus bx squared plus cx plus d equals zero, keeping their signs. Set the leading coefficient to zero when you actually have a quadratic; the solver then uses the lower-degree method rather than dividing by zero.

Worked example

Use the example inputs below to reproduce this result. These are the form's starting values, not recommended targets. Changing your inputs updates your result above; this worked example stays fixed for comparison. Results are rounded for display.

Example inputs

a in ax³ + bx² + cx + d = 0
1
b
-6
c
11
d
-6

Example result

Root 1
3
Root 2
1
Root 3
2
Maximum normalized residual
0.0000000000000001110223

Method and assumptions

Normalizes coefficients, reduces to a depressed cubic, and uses Cardano / trigonometric roots according to the discriminant. Roots are listed with multiplicity; coefficient a = 0 falls back to quadratic, linear or constant cases. Every numerical root is checked against the normalized polynomial; ill-conditioned coefficient ratios or large residuals are rejected. Tiny perturbations near a repeated root may substantially change the roots.

Reference: dlmf.nist.gov — method and further reading

Check the answer in the original problem

After solving, substitute the result into the original equation or relationship where possible. This can catch a sign error or a coefficient entered in the wrong position. Keep the exact inputs available when comparing with another tool, since changing a coefficient or rounding an intermediate value can change the problem being solved.

Common question

Why can the same root appear more than once?

A repeated root has multiplicity greater than one. Listing it twice or three times records that multiplicity, so a cubic still has three roots over the complex numbers when counted this way. A lower-degree equation has fewer roots.