Cubic Equation Solver

Solve cubic equations of the form ax³+bx²+cx+d=0.

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter a, b, c and d to find the real roots of ax³ + bx² + cx + d = 0. x³ − 6x² + 11x − 6 factors as (x−1)(x−2)(x−3), so the roots are 1, 2 and 3.

How to use

1
Step 1
Enter coefficient a (the x³ term).
2
Step 2
Enter b, c and d.
3
Step 3
Press Calculate to see the real roots.

How it works

A cubic always has at least one real root. The solver finds all three roots numerically (Durand-Kerner iteration) and lists the real ones, however large they are. If a = 0 the equation is really a quadratic, and the tool solves that instead.

ax³ + bx² + cx + d = 0      sum of roots = −b/a      product of roots = −d/a

Worked example

Three integer roots

Input
a = 2, b = −4, c = −22, d = 24
Output
x = −3, x = 1, x = 4
Walkthrough
Check with Vieta: the roots sum to −3 + 1 + 4 = 2 = −b/a, and multiply to −12 = −d/a.

Limitations

  • Only real roots are listed. Roots of any size are found: x³ − 60x² − x + 60 = 0 gives −1, 1 and 60.
  • x³ − 8 = 0 returns the single real root 2; the two complex roots are not shown.

Questions

What are the roots of x³ − 6x² + 11x − 6?
1, 2 and 3.
What are the roots of x³ − 8?
The real root is 2; the other two are complex.
What are the roots of 2x³ − 4x² − 22x + 24?
−3, 1 and 4.
What happens if a = 0?
The equation is not a cubic, so the tool solves the quadratic that remains.
Does it find large roots?
Yes. a = 1, b = −60, c = −1, d = 60 gives x = −1, x = 1 and x = 60.

Features

  • Real roots of any size
  • Falls back to quadratics
  • Runs in your browser

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • The essence of calculus

    3Blue1Brown

    Visual calculus story that complements symbolic solvers.

    Watch on YouTube
  • Introduction to scientific notation

    Khan Academy

    Scientific notation for calculator and number tools.

    Watch on YouTube
  • Math is Fun

    Math is Fun

    Clear explainers that pair well with calculator-style tools.

  • Geometry Index

    Math is Fun

    Shape and formula index for geometry calculators.