📐 Cubic Equation: Calculator

Solve ax³ + bx² + cx + d = 0 for all real roots.

EQUATION
x³ - 6x² + 11x - 6 = 0
REAL ROOT(S)
x = 0
Root 1
Root 2
Root 3
Root Type
Enter coefficients a, b, c, d to solve ax³ + bx² + cx + d = 0.

How the Cubic Equation Calculator Works

A cubic equation has the general form ax³ + bx² + cx + d = 0, where a ≠ 0. Unlike a quadratic, a cubic always has at least one real root, and can have up to three. This calculator uses the classic depressed-cubic substitution followed by Cardano's method, switching automatically to the trigonometric form when the equation has three distinct real roots (the case where Cardano's original formula requires taking cube roots of complex numbers even though the final answers are real).

Depressed cubic: divide by a, then let x = t − b/3, giving t³ + pt + q = 0
p = c − b²/3,   q = 2b³/27 − bc/3 + d
Discriminant Δ = q²/4 + p³/27

Understanding the Three Discriminant Cases

The sign of the discriminant Δ tells you what kind of roots to expect. When Δ > 0, there is one real root and a pair of complex-conjugate roots. When Δ ≈ 0, the equation has a repeated real root along with one other real root (a double root touches the x-axis rather than crossing it). When Δ < 0, all three roots are real and distinct — historically called casus irreducibilis because it can't be solved with real-number cube roots alone, which is why this calculator switches to the trigonometric form (using arccosine and cosine) in that case instead of Cardano's direct radical formula.

Where Cubic Equations Show Up

Cubic equations appear whenever a relationship involves a variable raised to the third power — volume calculations, certain physics and engineering models (like beam deflection or fluid flow), economics cost curves, and polynomial curve fitting. Because factoring a cubic by hand is often impractical unless the roots are simple integers, a numerical method like the one used here is the standard approach for finding real roots quickly and accurately.

❓ Frequently Asked Questions

How many real roots does a cubic equation have?
A cubic equation always has at least one real root, and can have up to three. Whether it has one or three real roots depends on the sign of the discriminant Δ = q²/4 + p³/27 calculated from the depressed cubic form.
What is the discriminant telling me in this calculator?
The discriminant sign determines the root structure: positive means one real root and two complex roots, approximately zero means a repeated real root, and negative means three distinct real roots, each requiring a different solution method internally.
Why does this calculator use trigonometry to solve some cubics?
When a cubic has three distinct real roots (negative discriminant), Cardano's direct cube-root formula technically requires taking the cube root of a complex number, even though the final results are real. The trigonometric form sidesteps this by using cosine and arccosine instead, which is the standard workaround.
Can coefficient a be zero?
No. If a = 0, the equation ax³ + bx² + cx + d = 0 is no longer a cubic — it reduces to a quadratic or lower-degree equation. Use a dedicated Quadratic Formula Calculator in that case.
How precise are the roots shown here?
Roots are calculated using standard double-precision JavaScript floating-point arithmetic and rounded to 4 decimal places for display, which is accurate enough for virtually all academic and practical purposes.

🏆 About This Tool — Accuracy & Trust

🔒 Data Privacy: All calculations run entirely within your browser using JavaScript. Nothing you enter here is ever transmitted to our servers, stored, sold, or shared.

📐 Accuracy Note: This tool uses standard, widely published formulas and guidelines. Results are estimates for informational purposes; for financial, medical, or engineering decisions, consult a licensed professional.

📅 Last Updated: September 2026.