# Cubic Equation Calculator

> Solve any cubic equation with the trigonometric method or Cardano’s formula, with the discriminant, depressed cubic and real or complex roots.

Category: Algebra, geometry & advanced math · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/cubic-equation-roots-calculator

Enter a, b, c and d. The discriminant decides the method: three real roots by the trigonometric formula, one real root by Cardano’s formula, or exact repeated roots when it is zero.

Also called: Cubic formula calculator, Cubic solver.

## Inputs
- a (x³ coefficient) (default 1)
- b (x² coefficient) (default -6)
- c (x coefficient) (default 11)
- d (constant) (default -6)

## Results
- Roots
- x₁
- x₂
- x₃
- Discriminant Δ
- Nature of the roots
- Depressed cubic
- Method used

## Formula

```
Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d²;  x = t − b/3a gives t³ + pt + q = 0;  Δ > 0: t = 2√(−p/3)·cos(⅓·arccos((3q/2p)√(−3/p)) − 2πk/3);  Δ < 0: t = ∛(−q/2 + √D) + ∛(−q/2 − √D), D = q²/4 + p³/27
```

Where:
- a, b, c, d: the coefficients (a ≠ 0)
- Δ: the discriminant
- p, q: coefficients of the depressed cubic
- k: 0, 1, 2

## Worked example
1. Δ = 18(1)(−6)(11)(−6) − 4(−216)(−6) + (36)(121) − 4(1331) − 27(36) = 7128 − 5184 + 4356 − 5324 − 972 = 4 > 0, so there are three distinct real roots.
2. Substituting x = t + 2 gives the depressed cubic t³ − t = 0, so p = −1 and q = 0.
3. Trigonometric formula: t = 2√(1/3)·cos(30° − 120°k) gives t = 1, −1 and 0, so x = 3, 1 and 2.

**Result:** x³ − 6x² + 11x − 6 = 0 has the roots x = 1, 2 and 3.

## What the result means

Δ > 0 means three distinct real roots, Δ < 0 one real root and a complex-conjugate pair, Δ = 0 a repeated root. Every cubic with real coefficients has at least one real root.

## Assumptions and limits
- Coefficients are real; a must not be 0.
- Roots are shown to 10 significant figures; exact radical forms are not written out.

## Questions

### Why use cosines when all three roots are real?

In that case Cardano’s formula needs cube roots of complex numbers even though the answers are real (the “casus irreducibilis”). The trigonometric form gives the same roots using only real arithmetic.

### How is accuracy protected?

The discriminant is computed exactly from your coefficients, so the case is never misjudged by rounding. Cardano’s formula takes the larger cube root first to avoid cancellation, and every root is refined with Newton’s method.

## Related calculators
- [Quadratic Formula Calculator](https://calculators.geekmidst.com/calculators/quadratic-formula-calculator)
- [Quartic Equation Calculator](https://calculators.geekmidst.com/calculators/quartic-equation-roots-calculator)
- [Polynomial Roots Calculator](https://calculators.geekmidst.com/calculators/polynomial-roots-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/cubic-equation-roots-calculator
