Cubic Equation Calculator
Solve ax³ + bx² + cx + d = 0 — all three roots, real and complex, with the discriminant that tells you which to expect.
Every cubic has three roots counted with multiplicity, and at least one of them is real — a consequence of the curve running from −∞ to +∞, so it must cross the axis somewhere.
How the cubic equation calculator works
Every cubic has three roots counted with multiplicity, and at least one of them is real — a consequence of the curve running from −∞ to +∞, so it must cross the axis somewhere.
The discriminant says which case you are in. Positive means three distinct real roots; zero means a repeated root; negative means one real root and a complex conjugate pair.
The solution here follows the trigonometric method for the three-real-root case and Cardano's formula otherwise. Cardano's method, published in 1545, was the first general solution and is the reason complex numbers had to be taken seriously — it produces real answers by way of square roots of negatives.
Formula: Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d²
Worked examples
| Inputs | Roots | Note |
|---|---|---|
| x³ − 6x² + 11x − 6 | 1, 2, 3 | roots 1, 2, 3 |
| x³ − 1 | 1, -0.5 ± 0.8660254038i | one real root at 1, plus a complex pair |
| A repeated root | 1, 2, 2 | 1 and 2 (twice) |
FAQFrequently asked questions
How many roots does a cubic have?
Exactly three counted with multiplicity, and at least one is always real.
What does the discriminant tell me?
Positive means three distinct real roots; zero means a repeated root; negative means one real root and a complex conjugate pair.
Why must a cubic have a real root?
Because the curve goes to −∞ at one end and +∞ at the other, so it has to cross the axis.
What is Cardano's formula?
The 1545 general solution to the cubic. It works, but it can require square roots of negatives even when every answer is real — which is how complex numbers entered mathematics.
Do the roots have a pattern?
Yes — they sum to −b/a and multiply to −d/a, which is a quick way to check an answer.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- National curriculum in England — Mathematics — the terms and methods taught in UK schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.