Connect via MCP →

Enter Calculation

Formula

Formula: Cubic Equation Solver Calculator
Show calculation steps (1)
  1. Discriminant

    Discriminant: Cubic Equation Solver Calculator

    The sign of the discriminant of the depressed cubic determines the nature of the roots.

Advertisement

Results

Roots of the cubic equation
x₁ = 4
x₂ = 1
x₃ = -3
three distinct real roots
4.0 0.0 1.0 0.0 -3.0 0.0
Method Cardano's method (depressed cubic)
Discriminant Δ -65.333333
Classification three distinct real roots

What this calculator does

This tool solves any cubic equation of the form \(ax^3 + bx^2 + cx + d = 0\), returning all three roots. Depending on the equation the roots may be three distinct real numbers, a repeated real root, or one real root paired with two complex-conjugate roots. It is pure mathematics and works identically anywhere.

How to use it

Enter the four coefficients a, b, c and d. The leading coefficient a must be non-zero (otherwise the equation is not cubic). Choose how many significant digits to display, then read the three roots, the discriminant and the root classification.

The formula explained

We first normalize by dividing through by a, giving \(x^3 + Bx^2 + Cx + D = 0\). The substitution \(x = t - B/3\) removes the quadratic term and produces a depressed cubic \(t^3 + pt + q = 0\) with $$p = C - \frac{B^2}{3},\quad q = \frac{2B^3}{27} - \frac{BC}{3} + D.$$ The discriminant $$\Delta = \left(\frac{q}{2}\right)^2 + \left(\frac{p}{3}\right)^3$$ then tells us the case. When \(\Delta > 0\) there is one real and two complex roots (Cardano's radical form); when \(\Delta = 0\) there is a repeated real root; when \(\Delta < 0\) all three roots are real and we use the trigonometric form \(t_k = m\cdot\cos(\theta - 2\pi k/3)\). Finally each root is shifted back by \(-B/3\).

Discriminant sign mapping to three root-type cases
The sign of the discriminant tells you whether the roots are all real or include a complex pair.
Cubic curve crossing the x-axis at three points
The real roots of a cubic are where its curve crosses the x-axis.

Worked example

For \(x^3 - 2x^2 - 11x + 12 = 0\) we get \(p = -37/3\), \(q = 4.07407\) and \(\Delta \approx -65.33 < 0\), so there are three real roots. The trigonometric form yields \(x = 4\), \(x = 1\) and \(x = -3\), which indeed factor as \((x-4)(x-1)(x+3)\).

FAQ

Why must a be non-zero? If \(a = 0\) the highest-degree term vanishes and the equation is at most quadratic, so Cardano's method does not apply.

What does the discriminant mean? Its sign classifies the roots: positive gives one real and two complex roots, zero gives a repeated real root, negative gives three distinct real roots.

How are complex roots shown? When present they appear as a conjugate pair \(re + im\cdot i\) and \(re - im\cdot i\); purely real roots have a zero imaginary part.

Last updated: