Use the free Cubic Equation Solver below: your data never leaves your browser — all work happens on your device, and nothing is uploaded to any server.
Why cubics are harder than quadratics
A cubic equation has the form ax cubed plus bx squared plus cx plus d equals zero, where a is not zero. It always has three roots, counting complex ones, but finding them is much harder than finding quadratic roots. The quadratic formula fits in one line. The cubic formula, found by Cardano in the 1500s, is long, involves cube roots, and in some cases passes through complex numbers even when all three roots are real. That strange case has a name: the casus irreducibilis.
The tool spares you the messy algebra. It uses Cardano’s method internally, and when three real roots exist it switches to a trigonometric formula that avoids complex intermediate steps. You enter four coefficients and get all three roots, plus the depressed cubic and the discriminant that decide which case you are in. Understanding what those intermediate values mean is more useful than memorising the full formula.
The depressed cubic
The first step removes the squared term. Substituting x equals t minus b over 3a turns the general cubic into a depressed cubic: t cubed plus pt plus q equals zero. This shift slides the curve sideways so that its point of symmetry sits on the vertical axis. It does not change the number or nature of the roots; it only makes them easier to find. The tool shows p and q so you can see the simpler equation hiding inside yours.
The discriminant of the depressed cubic is q squared over 4 plus p cubed over 27. Its sign decides the case. A positive discriminant means one real root and two complex roots. A negative discriminant means three different real roots. Zero means a repeated root. Reading the sign before computing anything tells you what kind of answer to expect, which is a good check against arithmetic slips later.
One real root and two complex roots
When the discriminant is positive, Cardano’s formula gives the real root directly: the sum of two cube roots, shifted back by minus b over 3a. The two complex roots are conjugates, sharing a real part and with opposite imaginary parts. The tool reports all three. A classic example is x cubed minus 2 equals zero, whose real root is the cube root of 2, about 1.26, with two complex partners.
Cubics of this type appear in volume problems. Doubling a cube, finding the side of a box with a given volume, or solving for a dimension that enters three times all lead to cubic equations with one sensible real answer. The complex roots are mathematically real but physically meaningless in those contexts, and knowing which root to keep is part of solving the problem, not an afterthought.
Three real roots and the trigonometric trick
When the discriminant is negative, all three roots are real, but Cardano’s formula expresses them through cube roots of complex numbers. Working that out by hand is painful, and historically it puzzled mathematicians for decades. The trigonometric method avoids the problem: the three roots are given by a cosine formula with angles spaced by 120 degrees. The tool uses this method automatically in this case.
The example x cubed minus 6x squared plus 11x minus 6 equals zero has roots 1, 2, and 3, and its discriminant is negative. Try it in the tool and watch all three appear. Notice the sum check: the three roots add up to minus b over a, which is 6 here. That sum is a quick check on any cubic solution, just as the product of quadratic roots gives c over a.
Repeated roots
When the discriminant is exactly zero, two roots coincide. The cubic touches the horizontal axis at the repeated root instead of crossing it, and crosses at the third root. Repeated roots are common in problems where a shape is at a boundary case, such as a box whose dimensions are pushed to a limit. The tool flags this case plainly, because a repeated root is easy to mistake for a missing root if you only count distinct answers.
Checking cubic answers
Checking by substitution works for cubics just as for quadratics: put each root back into the original equation and confirm you get zero, allowing for small rounding errors. With three roots to check, the work triples, but the principle is identical. The sum check is faster: add the three roots and compare with minus b over a. If the sum is wrong, at least one root is wrong, and you know to recompute rather than trust the set.
Where cubics matter
Cubics describe volume, growth with feedback, and curves that bend twice. The volume of a box, the trajectory of a lens design, the equilibrium of certain chemical systems, and the shape of a Bezier curve in graphic design all involve cubics. Whenever a quantity depends on a cube, or a curve changes direction twice, expect a cubic behind it.
For most students, the goal is not to memorise Cardano’s formula. It is to know that cubics always have three roots, to read the discriminant, and to verify answers with the sum and product checks. The tool handles the heavy lifting; your job is to set the equation up correctly and to judge which roots make sense in context.
Related tools
- Solucionador de Ecuaciones Cúbicas (Spanish version)
- System of Equations Solver
- Mixed Number Converter

Pingback: Quadratic Equation Solver - Roots With Steps Shown