Roboculator
Online CalculatorsCategoriesDate & EventsNews
Get Started
Online CalculatorsCategoriesDate & EventsNewsGet Started
Roboculator

Smart calculators for every challenge. Free, fast, and private.

Categories

  • Finance
  • Health
  • Math
  • Construction
  • Conversion
  • Everyday Life

Popular Tools

  • Date & Events
  • Loan Calculator
  • BMI Calculator
  • Percentage Calc
  • Latest News
  • Search All

Resources

  • Glossary
  • Topic Tags
  • News & Insights

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Editorial Policy
  • Disclaimer
© 2026 Roboculator. All rights reserved.
Roboculator

roboculator.com

  1. Home
  2. /Math
  3. /Algebra Calculators - Equation Solvers
  4. /Cubic Equation Calculator

Cubic Equation Calculator

Calculator

Results

Equation Valid Flag

1

Cubic Discriminant

-0

Root Case Code

2

Real Root Count

3

Root x1

0

Root x2

-0

Root x3

-0

Sum of Roots

-0

Product of Roots

-0

Results

Equation Valid Flag

1

Cubic Discriminant

-0

Root Case Code

2

Real Root Count

3

Root x1

0

Root x2

-0

Root x3

-0

Sum of Roots

-0

Product of Roots

-0

The Cubic Equation Calculator solves third-degree polynomial equations of the form ax³ + bx² + cx + d = 0 using Cardano’s method combined with trigonometric substitution. Enter the four coefficients, and the calculator instantly provides all real roots, the discriminant, and the classification of the solution type.

Cubic equations represent a significant step up in complexity from quadratic equations and have a rich history spanning thousands of years. While the ancient Babylonians could solve certain cubic problems geometrically, the first general algebraic solution was discovered by Italian mathematicians Scipione del Ferro and Niccolò Tartaglia in the early 16th century, later published by Gerolamo Cardano in his landmark 1545 work Ars Magna. This achievement was a watershed moment in mathematics—it proved that algebraic solutions existed beyond the familiar quadratic formula.

Cubic equations arise naturally in many scientific and engineering contexts. In fluid dynamics, the cubic equation governs the relationship between flow rate and pressure drop in certain pipe configurations. In materials science, cubic equations describe the equation of state for real gases (the van der Waals equation). In structural engineering, buckling analysis of columns involves solving cubic characteristic equations. In economics, cubic cost and revenue functions model more realistic scenarios than simple quadratic models.

The general approach implemented in this calculator uses Cardano’s method. First, the cubic is converted to a depressed cubic by substituting $$x = t - \frac{b}{3a}$$ to eliminate the squared term, yielding $$t^3 + pt + q = 0$$. The discriminant of this depressed cubic, along with the quantities \(Q = p/3\) and \(R = q/2\), determines the nature of the solutions.

When the internal discriminant \(D = Q^3 + R^2\) is positive, there is one real root and two complex conjugate roots, and Cardano’s formula applies directly using cube roots. When \(D\) is negative (the famous casus irreducibilis), all three roots are real, but paradoxically, Cardano’s formula involves complex intermediate expressions. This calculator handles this case elegantly using trigonometric substitution, expressing the three real roots as $$t_k = 2\sqrt{-Q}\cos\left(\frac{\theta + 2\pi k}{3}\right), \quad k = 0, 1, 2$$ where \(\theta = \arccos\left(\frac{-R}{\sqrt{-Q^3}}\right)\).

The overall discriminant of the original cubic \(ax^3 + bx^2 + cx + d = 0\) is given by $$\Delta = -(4p^3 + 27q^2) \cdot a^2$$ (shown here in simplified form for the depressed cubic). A positive discriminant means three distinct real roots; zero means at least two equal roots; negative means one real and two complex roots. This calculator computes and displays all of this information automatically.

Understanding cubic equations is a gateway to Galois theory, one of the deepest areas of abstract algebra, which explains when polynomial equations can be solved by radicals and ultimately led to the proof that no general formula exists for equations of degree five or higher.

Visual Analysis

How It Works

The calculator uses a two-stage approach to solve $$ax^3 + bx^2 + cx + d = 0$$:

Stage 1: Depressed Cubic

Substitute \(x = t - \frac{b}{3a}\) to obtain the depressed form $$t^3 + pt + q = 0$$ where:

$$p = \frac{3ac - b^2}{3a^2}, \quad q = \frac{2b^3 - 9abc + 27a^2d}{27a^3}$$

Stage 2: Solve Depressed Cubic

Compute \(Q = p/3\), \(R = q/2\), \(D = Q^3 + R^2\).

  • If \(D > 0\): One real root via Cardano’s formula: \(t = \sqrt[3]{-R + \sqrt{D}} + \sqrt[3]{-R - \sqrt{D}}\)
  • If \(D < 0\): Three real roots via trigonometric method: \(t_k = 2\sqrt{-Q}\cos\left(\frac{\theta + 2\pi k}{3}\right)\)
  • If \(D = 0\): Repeated roots (special case)

Finally, shift back: \(x_k = t_k - \frac{b}{3a}\).

Understanding Your Results

The discriminant tells you the root structure at a glance. A positive discriminant means three distinct real roots—all are displayed as x&sub1;, x&sub2;, x&sub3;. A negative discriminant means only one real root (x&sub1;) exists alongside a complex conjugate pair (x&sub2; and x&sub3; show NaN). The Real Root x&sub1; is always computed regardless of discriminant sign and represents the principal real solution of the cubic equation.

Worked Examples

Three real roots: x³ − 6x² + 11x − 6 = 0

Inputs

a1
b-6
c11
d-6

Results

discriminant4
x13
x21
x32

Factors as (x−1)(x−2)(x−3) = 0, so roots are 1, 2, 3. Discriminant > 0 confirms three distinct real roots.

One real root: x³ + x + 1 = 0

Inputs

a1
b0
c1
d1

Results

discriminant-31
x1-0.682328

Discriminant < 0 indicates one real root (≈ −0.6823) and two complex conjugate roots.

Frequently Asked Questions

A cubic equation is a polynomial equation of degree three, written in the general form ax³ + bx² + cx + d = 0, where a ≠ 0. It always has at least one real root and can have up to three distinct real roots.

Cardano’s formula is the cubic analog of the quadratic formula. For the depressed cubic t³ + pt + q = 0, one root is given by t = √³(−q/2 + √(q²/4 + p³/27)) + √³(−q/2 − √(q²/4 + p³/27)). It was first published by Gerolamo Cardano in 1545.

A depressed cubic has the form t³ + pt + q = 0 (no t² term). Any general cubic ax³ + bx² + cx + d = 0 can be converted to depressed form by the substitution x = t − b/(3a), which eliminates the quadratic term.

The casus irreducibilis occurs when a cubic equation has three distinct real roots but Cardano’s formula involves taking cube roots of complex numbers. This paradox is resolved by using the trigonometric method, which expresses all three real roots using cosines.

By the Fundamental Theorem of Algebra, every cubic equation has exactly three roots (counted with multiplicity) in the complex numbers. In terms of real roots, it always has at least one and at most three distinct real roots.

The discriminant Δ of a cubic determines root structure: Δ > 0 means three distinct real roots; Δ = 0 means at least two equal roots (could be a triple root or one simple + one double root); Δ < 0 means one real root and two complex conjugate roots.

No. If a = 0, the equation reduces to a quadratic (bx² + cx + d = 0) or lower degree. Use our Quadratic Formula Calculator for degree-two equations.

Cubic equations appear in the van der Waals equation for real gases, beam deflection formulas in structural engineering, cubic spline interpolation in computer graphics, and optimization problems where cost or revenue functions are cubic polynomials.

The calculator uses standard IEEE 754 double-precision floating-point arithmetic, providing approximately 15–16 significant digits of precision. For most practical applications, the results are extremely accurate. Numerical issues can arise only for equations with very large or very small coefficients.

This calculator solves cubic (degree 3) equations only. While quartic equations also have a closed-form solution (Ferrari’s formula), it is considerably more complex. For degree 5 and above, the Abel–Ruffini theorem proves that no general algebraic solution exists.

Sources & Methodology

Cardano, G. (1545). <em>Ars Magna</em>. | Nickalls, R.W.D. (1993). A new approach to solving the cubic. <em>The Mathematical Gazette</em>, 77(480), 354-359. | Weisstein, E.W. "Cubic Formula." MathWorld. https://mathworld.wolfram.com/CubicFormula.html
R

Roboculator Team

The Roboculator Team explains calculations, planning tools, and practical formulas in clear language for real-life situations.

How helpful was this calculator?

Be the first to rate!

Related Calculators

Quadratic Formula Calculator

Algebra Calculators - Equation Solvers

Completing the Square Calculator

Algebra Calculators - Equation Solvers

System of Equations Calculator

Algebra Calculators - Equation Solvers

Elimination Method Calculator

Algebra Calculators - Equation Solvers

Substitution Method Calculator

Algebra Calculators - Equation Solvers

Simultaneous Equations Calculator

Algebra Calculators - Equation Solvers