Overview
A cubic equation has three roots, counting repeats, and at least one is real. This solves ax³ + bx² + cx + d = 0 for all of them, including complex ones.
Enter the four coefficients, with 0 for any missing power.
Worked examples
| Inputs | Result |
|---|---|
| a1b-6c11d-6 | Real roots: x = 1, x = 2, x = 3 |
Show 2 more examples
| a2b-4c-22d24 | Real roots: x = -3, x = 1, x = 4 |
| a1b0c0d-1 | Real root: x = 1Complex roots: x = -0.5 ± 0.866i |
How it works
The equation is first reduced to a simpler “depressed” cubic. A quantity called the discriminant then decides the method: with three real roots it uses a trigonometric formula, and with one real root it uses Cardano’s formula. Results are rounded to 4 decimals.
The formula
| p, q | Coefficients of the depressed cubic |
Practical tips
- x³ − 6x² + 11x − 6 = 0 has roots 1, 2 and 3.
- x³ − 1 = 0 has one real root, 1, and two complex roots, −0.5 ± 0.866i.
- Check any root by substituting it back into the equation.
Frequently asked questions
Why does every cubic have a real root?
Its graph heads to opposite infinities on each side, so it must cross the x-axis at least once.
What if a = 0?
It’s no longer a cubic. Use our quadratic formula calculator instead.