Cubic Equation Calculator
This cubic equation calculator solves any equation of the form a times x cubed, plus b times x squared, plus c times x, plus d, equals zero, working out all three roots in one step. Cubic equations turn up across algebra, physics and engineering whenever a variable is raised to the third power, and finding the roots by hand with Cardano's formula is slow and easy to get wrong, especially when the answers involve complex numbers. You enter the four coefficients, a, b, c and d, with a required to be non-zero, since a zero leading coefficient turns the equation into a quadratic. The calculator returns all three roots together, however many are real and however many form a complex conjugate pair, plus a count of how many roots are real and a repeat of the leading coefficient for reference. Every cubic with real coefficients has at least one real root, and either three real roots or one real root paired with two complex ones, so the result always shows at least one real value. Roots are found numerically using the Durand-Kerner method, which converges on every root at once rather than solving for each separately. Try the worked example below, coefficients 1, -6, 11 and -6, which factors into roots of 1, 2 and 3, to see how the calculator lays out its answer before entering your own numbers.
The formula
A cubic ax^3 + bx^2 + cx + d = 0 has three roots. The calculator finds them numerically (Durand-Kerner iteration), which handles real and complex roots uniformly. By Vieta, the roots sum to minus b/a and multiply to minus d/a.
Worked example
For x^3 minus 6x^2 plus 11x minus 6 = 0, the roots are 1, 2 and 3, since it factors as (x minus 1)(x minus 2)(x minus 3). Enter 1, -6, 11, -6 to confirm.
Frequently asked questions
How many roots does a cubic have?
Three, counted with multiplicity. With real coefficients that is either three real roots, or one real and a complex conjugate pair.
How are the roots found?
Numerically, with the Durand-Kerner method, which converges to all roots at once, real or complex.
Does a cubic always have a real root?
Yes. A real cubic crosses the x axis at least once, so it always has at least one real solution.
Who this calculator is for
This calculator is for algebra students and anyone needing a quick, reliable result.
What this calculator assumes
- You enter valid numbers.
- The standard method is applied.
- Results are rounded for display.
Formula and sources
Related calculators
- Quadratic Formula Calculator: solve a quadratic.
- Scientific Calculator: general maths.
- Matrix Calculator: matrix operations.