Cubic Equation Solver

Cubic Equation Solver | ax³+bx²+cx+d=0 | Premium Math Tool

Enter Your Cubic Equation

Fill in the coefficients for ax³ + bx² + cx + d = 0. Use any real numbers, including decimals and fractions.

x³ + 0x² + 0x + 0 = 0

Roots & Analysis

Step-by-Step Solution

Every calculation explained using Cardano’s Formula and basic algebra.

Interactive Graph

Pan and zoom to explore the cubic curve. Hover for exact coordinates.

Cubic curve Real roots Turning points Inflection

Worked Examples

Click any example to load it instantly.

Educational Guide

Everything you need to know about cubic equations.

What is a Cubic Equation?

A cubic equation is a polynomial equation where the highest power of the variable is 3. The standard form is:

ax³ + bx² + cx + d = 0, where a ≠ 0

The word “cubic” comes from the Latin cubus meaning cube. The equation always has exactly 3 roots (counting multiplicity) in the complex number system — guaranteed by the Fundamental Theorem of Algebra.

Cubic equations appear everywhere: in engineering (beam deflection), physics (wave equations), economics (cost optimization), and computer graphics (Bézier curves).

  • The coefficient a (≠ 0) controls the overall shape and direction
  • The coefficient b shifts the curve horizontally
  • The coefficient c controls the steepness near the middle
  • The constant d is the y-intercept (value at x = 0)

Cardano’s Formula

Discovered by Gerolamo Cardano (published 1545), this is the general analytic solution for any cubic. First, we normalize by dividing through by a to get:

x³ + px + q = 0 (depressed cubic)

Where: p = (3ac − b²) / 3a² and q = (2b³ − 9abc + 27a²d) / 27a³

Then the discriminant of the depressed cubic is:

Δ = −4p³ − 27q²

The three cube roots are found via:

x = ∛(−q/2 + √(q²/4 + p³/27)) + ∛(−q/2 − √(q²/4 + p³/27))

When the discriminant is positive, we use trigonometric form (casus irreducibilis) to avoid complex intermediate values even when all roots are real.

The Discriminant (Δ)

The discriminant tells you the nature of the roots before you even solve the equation.

Δ = 18abcd − 4b³d + b²c² − 4ac³ − 27a²d²
  • Δ > 0: Three distinct real roots. The curve crosses the x-axis three times.
  • Δ = 0: A repeated root. Either a double root + one simple root, or one triple root.
  • Δ < 0: One real root and two complex conjugate roots.

The discriminant is a fundamental invariant of the cubic — it determines the root structure without needing to find the actual roots.

Types of Roots

Real Roots are numbers on the number line where the cubic curve actually crosses or touches the x-axis. They can be positive, negative, zero, rational, or irrational.

Complex Roots always come in conjugate pairs: if (a + bi) is a root, then (a − bi) is also a root. These roots do not appear on the real number line graph.

Repeated Roots occur when the curve is tangent to the x-axis. A double root means the curve touches but doesn’t cross; a triple root is an inflection point sitting on the x-axis.

  • 3 distinct real roots → Δ > 0
  • 1 real + 2 complex conjugate → Δ < 0
  • 1 real double + 1 real simple → Δ = 0
  • 1 real triple root → Δ = 0 and also specific conditions on b, c

Reading the Graph

The graph of a cubic is an S-shaped (or reverse-S) curve. Key features:

  • X-intercepts: The real roots. The curve crosses (simple root) or touches (repeated root) the x-axis here.
  • Turning points: Local maxima and minima. Found by solving f′(x) = 3ax² + 2bx + c = 0.
  • Inflection point: Where the curve changes from concave up to concave down. Always at x = −b/(3a).
  • Y-intercept: The value of f(0) = d.
  • If a > 0: curve goes from bottom-left to top-right (↗)
  • If a < 0: curve goes from top-left to bottom-right (↘)

Common Mistakes

  • Forgetting a ≠ 0: If a = 0, you have a quadratic, not a cubic.
  • Sign errors: Always double-check the sign of b, c, d when entering coefficients.
  • Assuming all roots are real: A cubic always has one real root, but the other two may be complex.
  • Not verifying: Always substitute roots back into the original equation to check.
  • Rounding too early: In multi-step calculations, rounding intermediate values introduces large errors. Keep full precision until the final answer.
  • Missing the depressed cubic step: Skipping the substitution x = t − b/(3a) makes Cardano’s formula much harder to apply.

Calculation History

Your recent equations. Click to reload any calculation.

Cubic Equation Solver — Free, accurate, educational. Built with pure HTML, CSS & JavaScript. No external libraries.

Scroll to Top