Cubic Equation Calculator: Find All Roots of ax³ + bx² + cx + d = 0
Enter the four coefficients of ax³ + bx² + cx + d = 0. You get all three roots (real or complex), a graph of the curve and the working.
- Nothing you type is stored
- Free
- No signup
Roots
x = 1, 2, 3
Three real roots- x₁
- 1
- x₂
- 2
- x₃
- 3
Show working
- x³ − 6x² + 11x − 6 = 0
- x = t + 2 → t³ + pt + q = 0
- p = c/a − b²/3a² = −1
- q = 2b³/27a³ − bc/3a² + d/a = 0
- Δ = (q/2)² + (p/3)³ = −1/27
- Δ < 0: t = 2√(−p/3)·cos(⅓·arccos((3q/2p)·√(−3/p)) − 2πk/3), k = 0, 1, 2
- x₁ = 1
- x₂ = 2
- x₃ = 3
How to use
- Write the equation as ax³ + bx² + cx + d = 0 (use 0 for a missing term).
- Enter a, b, c and d.
- Read the roots and open “Show working” to follow the method.
Good to know
Method: substituting x = t − b/3a removes the x² term and gives t³ + pt + q = 0. The sign of Δ = (q/2)² + (p/3)³ decides the case: Δ > 0 one real and two complex roots (Cardano’s formula), Δ = 0 repeated roots, Δ < 0 three real roots (trigonometric form).
Exact form: if one root is a simple fraction, the cubic is divided by (x − root) and the remaining quadratic is solved exactly, so x³ − 8 = 0 shows 2 and −1 ± i√3.
Every cubic with real coefficients has at least one real root, and complex roots always come in conjugate pairs. Numeric roots are polished with Newton’s method and are accurate to many decimal places.
Questions
How many roots does a cubic have?
Exactly three, counting repeated roots and complex roots. At least one of them is always real.
What is Cardano’s method?
A 16th-century formula for t³ + pt + q = 0: t = ∛(−q/2 + √Δ) + ∛(−q/2 − √Δ). It is used when Δ > 0.
Why is the trigonometric method used sometimes?
When there are three real roots, Cardano’s formula needs cube roots of complex numbers. The cosine form gives the same roots directly.
How do I enter x³ − 2x = 0?
Use a = 1, b = 0, c = −2, d = 0. Every missing power gets a 0.
Is my data stored or sent anywhere?
No. The calculation runs entirely in your browser; nothing you type leaves your device.