Cubic Equation Solver
Solve ax³ + bx² + cx + d = 0 and get all three roots, real or complex, using Cardano's method with a discriminant classification and high accuracy.
1x³ − 6x² + 11x − 6 = 0
Classification & discriminant
Three distinct real roots.
- Depressed cubic: t³ + pt + q with p = -1, q = 0
- Discriminant Δ = −4p³ − 27q² = 4
- Δ > 0 → three distinct real roots (solved with the trigonometric method).
- Real roots refined with a Newton polish pass for accuracy.
What is the Cubic Equation Solver?
The ByteTools Cubic Equation Solver finds all three roots of any cubic equation ax³ + bx² + cx + d = 0.
- All three roots — real and complex — for any cubic
- Discriminant classification: three real, repeated, or one real + complex pair
- Cardano and trigonometric methods chosen automatically
- Newton polish pass for maximum numerical accuracy
- Shows the depressed cubic and discriminant values
- 100% private — computed entirely in your browser
How to use the Cubic Equation Solver
- 1
Enter the coefficients a, b, c and d of ax³ + bx² + cx + d = 0.
- 2
Make sure a is not zero — otherwise the equation is quadratic, not cubic.
- 3
Read the three roots, shown as real numbers or complex a ± bi pairs.
- 4
Check the discriminant and root classification.
- 5
Copy the roots with one click.
About the Cubic Equation Solver
The ByteTools Cubic Equation Solver finds all three roots of any cubic equation ax³ + bx² + cx + d = 0. It first reduces the cubic to depressed form, evaluates the discriminant to classify the roots, then applies Cardano's formula or the trigonometric method — whichever is numerically appropriate — and finishes each real root with a Newton polish pass for extra accuracy.
You always get the complete answer: three distinct real roots, a repeated root, or one real root plus a complex-conjugate pair written as a ± bi. The discriminant value and the classification are shown alongside the roots, so the result doubles as a worked explanation for algebra and precalculus students.
The solver runs 100% locally in your browser with plain JavaScript. Your coefficients are never uploaded, results appear as you type, and everything can be copied with one click.
Frequently asked questions
How many roots does a cubic equation have?
Every cubic has exactly three roots when you count complex roots and multiplicity. There are three possibilities: three distinct real roots, a repeated real root, or one real root plus a pair of complex-conjugate roots. A cubic always has at least one real root.
What is the discriminant of a cubic equation?
For the depressed cubic t³ + pt + q, the discriminant is Δ = −4p³ − 27q². If Δ > 0 there are three distinct real roots, if Δ = 0 there is a repeated root, and if Δ < 0 there is one real root and two complex-conjugate roots. The solver shows Δ with the answer.
What is Cardano's formula?
Cardano's formula solves the depressed cubic t³ + pt + q = 0 as t = ∛(−q/2 + √(q²/4 + p³/27)) + ∛(−q/2 − √(q²/4 + p³/27)). When all three roots are real the square root becomes imaginary, so the solver switches to the equivalent trigonometric form, which stays entirely in real arithmetic.
Can this solver handle complex roots?
Yes. When the discriminant is negative, the solver returns the single real root plus the complex pair in the form a + bi and a − bi, with both parts computed to full floating-point precision. For example x³ + x + 1 = 0 gives x ≈ −0.6823 and x ≈ 0.3412 ± 1.1615i.
What if my leading coefficient a is zero?
Then the equation is not a cubic — it is a quadratic (or simpler), and Cardano's method does not apply. The tool detects this and points you to the quadratic solver instead of dividing by zero.
Related tools
Quadratic Equation Solver
Solve any quadratic equation ax² + bx + c = 0. Get real or complex roots, the discriminant, vertex and axis of symmetry with clear step-by-step working.
Polynomial Roots Calculator
Find every real and complex root of a polynomial from its coefficients using the Durand–Kerner method. Works for any degree from 1 to 10, instantly.
Discriminant Calculator
Compute the discriminant b² − 4ac of a quadratic equation, classify its roots as two real, one repeated or complex, and see the actual root values.
Completing the Square Calculator
Convert ax² + bx + c into vertex form a(x − h)² + k with every intermediate step shown. Get the vertex coordinates and check your algebra homework fast.
Online Graphing Calculator
Plot up to three y = f(x) functions on one graph. Supports sin, cos, tan, log, sqrt, powers and more, with adjustable window and PNG export.