Advanced

Cubic Equation Solver

Find every real and complex root of any cubic equation ax³ + bx² + cx + d = 0 and see the curve plotted.
Must be non-zero
Three real roots
x = 3, x = 2, x = 1
Root 1
3
Root 2
2
Root 3
1
Discriminant Δ
-0.037
Step by step
  1. 1

    Shift: t = x + b/(3a)

    6 ÷ (3 × 1) = 2
    Substituting x = t − b/(3a) removes the x² term, giving the depressed cubic t³ + pt + q = 0.
  2. 2

    p = (3ac − b²) ÷ (3a²)

    (3 × 1 × 11 − 36) ÷ (3 × 1) = -1
  3. 3

    q = (2b³ − 9abc + 27a²d) ÷ (27a³)

    0 ÷ 27 = 0
  4. 4

    Discriminant Δ = (q/2)² + (p/3)³

    (0 ÷ 2)² + (-1 ÷ 3)³ = -0.0370
    Δ > 0: one real root; Δ < 0: three real roots; Δ = 0: repeated root.
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

A cubic ax³ + bx² + cx + d = 0 always has three roots. This solver reduces it to a depressed cubic, checks the discriminant Δ = (q/2)² + (p/3)³, then applies Cardano’s formula for one real root or a trigonometric formula for three real roots, listing each root and graphing the curve.

Formula
ax³ + bx² + cx + d = 0 → depressed cubic t³ + pt + q = 0, Δ = (q/2)² + (p/3)³
How this is calculated

Enter the four coefficients a, b, c and d. The leading coefficient a must be non-zero, otherwise the equation is not cubic and the calculator returns no result. The equation is first divided through conceptually by a and reduced to a depressed cubic t³ + pt + q = 0 using the substitution x = t − b/(3a), where p = (3ac − b²)/(3a²) and q = (2b³ − 9abc + 27a²d)/(27a³).

The nature of the roots is decided by the discriminant Δ = (q/2)² + (p/3)³, which is proportional to −(4p³ + 27q²). When Δ > 0 there is exactly one real root, computed with Cardano’s formula t = ∛(−q/2 + √Δ) + ∛(−q/2 − √Δ), plus a conjugate pair of complex roots. When Δ ≤ 0 all three roots are real and are found with the stable trigonometric formula t = 2√(−p/3) · cos((1/3)·arccos((3q/2p)·√(−3/p)) − 2πk/3) for k = 0, 1, 2.

Each t is shifted back by −b/(3a) to recover x. Complex roots are shown as a real part plus or minus an imaginary part (…i). The graph plots y = ax³ + bx² + cx + d across a window spanning the real roots, where each x-axis crossing marks a real solution. Results are exact up to floating-point rounding; very large coefficient ratios can introduce small numerical error.

Frequently asked questions

If a = 0 the x³ term vanishes and the equation is quadratic (or lower), not cubic, so the cubic method does not apply. Use a quadratic solver instead.

Every cubic with real coefficients has exactly three roots counted with multiplicity: either three real roots, or one real root and a pair of complex-conjugate roots.

Δ > 0 means one real and two complex roots; Δ = 0 means a repeated real root; Δ < 0 means three distinct real roots.

Also known as

ax^3+bx^2+cx+d
cubic roots
third degree equation
cardano formula
solve cubic
cubic formula
degree 3 equation

APA

TG we-Calculate Editorial Team. (2026). Cubic Equation Solver [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/cubic-equation-solver

Chicago

TG we-Calculate Editorial Team. "Cubic Equation Solver." TG we-Calculate. 2026. https://we-calculate.com/calculator/cubic-equation-solver.

IEEE

TG we-Calculate Editorial Team, "Cubic Equation Solver," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/cubic-equation-solver

BibTeX

@misc{wecalculate_cubic_equation_solver, title = {Cubic Equation Solver}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/cubic-equation-solver}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?