What this calculator does
A cubic equation has three roots in the complex numbers, and between one and three of them are real. Solving it by hand is a sequence of standard moves: divide by the leading coefficient, substitute x = y − b/3a to remove the squared term, then solve the resulting depressed cubic with Cardano's formula or a trigonometric substitution. The discriminant tells you which case you are in before you compute anything. A positive discriminant means one real root and a pair of complex conjugates. Zero means repeated roots. A negative discriminant means three distinct real roots, which is the case that needs the cosine form to avoid complex intermediate numbers. The solver performs those steps and reports the case, so the roots come with an explanation of why there are one, two, or three of them.
How to use it
- Enter the coefficients a, b, c, and d in descending powers of x.
- Keep the signs, for example -6 for a term of -6x².
- Read the real roots and the case that produced them.
- Use the discriminant as a check on how many real roots to expect.
- Substitute a root back into the original equation to confirm the answer.
How it works
Example calculations
Example 1: Three distinct real roots
x³ − 6x² + 11x − 6 has p = -1.00, q = 0.00, and D = -0.0370. A negative discriminant means three distinct real roots, here 1.0000, 2.0000, 3.0000. The sum is 6.00 and the product is 6.00, matching −b/a and −d/a.
Example 2: A repeated root
x³ − 3x + 2 is (x − 1)²(x + 2), so D = 0.00 and the case is three real roots, two of them equal. The distinct roots are -2.0000 and 1.0000, and counting multiplicity there are 3 real roots.
Example 3: One real root and two complex roots
x³ + x + 1 has D = 0.2870. A positive discriminant means one real root, -0.6823, and a complex conjugate pair that is not displayed. Cardano's formula gives the real root directly without needing complex arithmetic in between.
What the result means
The discriminant is the most informative single number. Positive means the curve crosses the x-axis once; zero means it touches the axis at a repeated root; negative means it crosses three times. That shape is easy to see on a graph: the cubic rises, turns, falls, turns, and rises, and the number of crossings follows from where the local maximum and minimum sit relative to the axis. Vieta's relations give a free check: the sum of the roots is −b/a, the product is −d/a, and the sum of the pairwise products is c/a. If the roots you get do not satisfy those, something in the coefficients or the input is wrong. When coefficients are large or nearly repeated, floating-point rounding can blur the distinction between the cases, so substitute the roots back to verify.
Common mistakes
- Entering coefficients in the wrong order, for example the constant as b.
- Dropping a negative sign when the equation was rearranged.
- Expecting three real roots and ignoring the discriminant's warning.
- Forgetting that a repeated root counts twice toward the three roots.
- Rounding roots so aggressively that they no longer satisfy the equation.
- Divide-by-zero errors when a is set to zero and the equation becomes a quadratic.
Assumptions and limits
- The equation is written in the form ax³ + bx² + cx + d = 0.
- Coefficients are real numbers.
- a is non-zero for the cubic case, though a zero value falls back to the quadratic.
- Roots are displayed rounded to four decimal places and near-equal roots are merged.
- Complex roots are counted in the case description but not listed.
Frequently asked questions
How many real roots can a cubic have?
Either one or three, counting a repeated root as more than one. A cubic with real coefficients always has at least one real root, because the curve must cross the x-axis somewhere.
What is the discriminant telling me?
Its sign decides the case. Positive gives one real root and two complex roots, zero gives repeated real roots, and negative gives three distinct real roots.
Why are three roots sometimes shown as two?
When a root is repeated, the distinct values are fewer than three. The calculator merges near-equal roots for display but reports how many roots exist including repeats.
Can I use this for a quadratic?
Yes. Set a to zero and the solver falls back to the quadratic formula, reporting the number of real roots and the discriminant of that quadratic.
How do I check a root?
Substitute it into ax³ + bx² + cx + d and confirm the result is zero, allowing for rounding. A quick check with two roots also confirms the third through the sum relation.
Why does the answer show complex roots only in the description?
The tool focuses on real roots because they are what most graphs, engineering problems, and homework questions ask for. The case description tells you when a complex pair exists.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.