Cubic Equation Calculator
Solve ax³ + bx² + cx + d = 0, returning all real roots and any complex pair.
What is Cubic Equation?
A cubic equation has a squared and a cubed term and therefore three roots in total. It always has at least one real root, because its graph must cross the horizontal axis; the other two may be real or complex.
How it works
The cubic is divided through by a, depressed by the substitution x = t − a/3, and solved with Cardano's formula. The discriminant decides whether the result is one real root plus a complex pair, a repeated real root, or three distinct real roots — a distinction a naive numeric iteration gets wrong, which is why the closed form is used.
- Enter your input. Type or paste your input into the field above — the tool responds instantly.
- Review the result. Output updates live as you type. Everything runs entirely in your browser.
- Copy or download. Use the Copy button to grab the result, or Download to save it as a file.
Examples
Realistic sample
Type or paste any realistic input — the tool computes the result locally and instantly.
Common mistakes
Expecting a server round-trip
Nothing is uploaded — every tool in this category runs entirely in your browser.