Skip to main content
Number tools100% FreeInstant

Cubic Equation Solver: Roots of ax³ + bx² + cx + d = 0

This free solver finds all three roots of a cubic equation, including complex roots. It also gives the discriminant, tells you how many real roots there are and checks each root in the equation.

By Debmedia Technologies LLP · Kolkata, India · Updated

What Is It and When Do You Need It?

Cubic equations appear in physics, engineering and finance. The general formula is long, so a solver saves time and mistakes.

Enter the four coefficients.

How to Use This Tool

  1. Enter or paste your input in the box or boxes above.
  2. Choose the options, if there are any.
  3. Press the button to run the tool.
  4. Read the result and use the copy button where one is shown.

How the Calculation Works

The equation is divided by a and shifted to a depressed cubic t³ + pt + q = 0. If the discriminant is negative or zero the trigonometric method gives the real roots; otherwise Cardano's formula with cube roots is used, and the remaining roots follow from the complex cube roots of unity. Real roots are refined with Newton's method.

Worked Example

x³ - 6x² + 11x - 6 = 0 has the roots 1, 2 and 3. x³ - 1 = 0 has the root 1 and the complex pair -0.5 ± 0.866025i.

Common Uses

  • Algebra homework.
  • Engineering formulas.
  • Volume and box problems.
  • Checking code.

Tips and Common Mistakes

  • Enter 0 for a missing term.
  • Complex roots always come in pairs for real coefficients.
  • Check a root by putting it back into the equation.
  • Check the first result against a case you already know, so you can trust the tool for the rest.
  • Nothing you type leaves your device. The work is done by your browser, so it also works with a slow connection once the page has loaded.

Next, you may need the quadratic equation solver, exponent and root calculator, prime number checker, GCD and LCM calculator.

Everything runs in your browser. Nothing you type is uploaded, stored or sent to any outside service.

Frequently Asked Questions

Always three, counting repeated roots and complex roots. At least one is real.
If it is positive there are three different real roots. If it is zero there is a repeated root. If it is negative there is one real root and two complex ones.
Then the equation is not cubic. Use the quadratic equation solver instead.
Roots are found with the trigonometric and Cardano methods and then polished with Newton steps, so they are accurate to about 12 digits.

Disclaimer: results are calculated in your browser from the numbers you enter. Check important results before you rely on them for money, health, safety or legal decisions.