Skip to content

Cubic Equation Solver

Find every root. Understand the curve.

Your cubic equation

Equation preview

From x to t: center the cubic

p
q
Blue algebra cubes on a clean desk

Your cubic, solved

x1
x2
x3
Polynomial discriminant
Step-by-step solution

Explore your cubic

Show on graph

Select a point to inspect it.

Cardano quantity
D = (q/2)² + (p/3)³
Polynomial Δ = −108a⁴D

Graph coordinates and unverified roots are numerical approximations.

Text summary · PDF in member tools

What the discriminant tells you

Value of ΔNumber and type of roots
Δ > 0Three distinct real roots
Δ = 0Repeated real roots
Δ < 0One real root and a complex conjugate pair

Multiplicities count toward the three roots.

Frequently asked questions

What if a is zero?

This tool requires a nonzero cubic coefficient. If a is zero, use the quadratic or linear solver.

Can a cubic have complex roots?

A real-coefficient cubic has three roots counting multiplicities. It can have three real roots or one real root and a complex conjugate pair. Only real roots are x-intercepts.

What does the discriminant mean?

The polynomial discriminant \u0394 is positive for three distinct real roots, zero for repeated roots, and negative for one real root with a complex pair. The Cardano quantity D has the opposite sign because \u0394=-108a\u2074D.

Are the roots exact or approximate?

Rational roots verified by exact substitution are labeled Exact. Other roots are numerical approximations. The rational coefficients, depressed-cubic parameters and discriminants use exact arithmetic.

Show all questions (12)Show fewer questions
What is an inflection point?

It is where the curve changes concavity, at x=-b/(3a). It is not always a local maximum or minimum.

Can I enter fractions?

Enable Fraction inputs to use values such as 1/2. Normal mode uses native number fields. Coefficients support six decimal places, nonzero magnitudes from 0.000001 to 1000000, and fraction denominators at most 1000000.

How does the solver work?

It reduces the cubic to t\u00b3+pt+q=0. Negative D uses a real trigonometric branch; positive D uses real cube roots and a complex conjugate pair; zero D uses exact rational repeated-root formulas. Floating-point roots are refined and rational candidates are checked by exact substitution.

What does the Cubic Equation Solver calculate?

Find every root. Understand the curve.

Which values should I enter?

Enter the values requested by the calculator using the labels and units shown on the page.

What formula does this calculator use?

The calculator uses the following relationship: x=t-b/(3a); p=(3ac-b²)/(3a²); q=(2b³-9abc+27a²d)/(27a³); D=(q/2)²+(p/3)³; polynomial discriminant Δ=-108a⁴D..

Why might my result differ from another source?

Results can differ when another source uses different units, rounding rules, conventions or assumptions. Compare the inputs and definitions before comparing results.

Does the result update automatically?

Yes. Changing an input updates the result using the same calculation engine shown on this page.

Sources & mathematical references

Page information

Updated: October 7, 2026