Skip to main content

Cubic Equation Calculator

Solve cubic equation problems step-by-step with our free calculator. See formulas, worked examples, and clear explanations.

Skip to calculator
Mathematics

Cubic Equation Calculator

Solve cubic equations ax^3 + bx^2 + cx + d = 0 using Cardano's formula. Find all real and complex roots, discriminant, critical points, and Vieta's relations.

Last updated: December 2025Reviewed by NovaCalculator Mathematics Team

Calculator

Adjust values & calculate

Enter Coefficients

ax^3 + bx^2 + cx + d = 0

Roots
x = 1, x = 2, x = 3
Three distinct real roots
Discriminant
4.0000
Inflection Point
x = 2.000000
Vieta's Formulas
Sum of roots
6.0000
Sum of products
11.0000
Product of roots
6.0000
Depressed Cubic
p
-1.0000
q
0.0000
Critical Points
x = 1.42265, x = 2.57735
Your Result
Roots: 1, 2, 3 | Nature: Three distinct real roots
Share Your Result
Understand the Math

Formula

x = cbrt(-q/2 + sqrt(q^2/4 + p^3/27)) + cbrt(-q/2 - sqrt(q^2/4 + p^3/27))

Where the depressed cubic t^3 + pt + q = 0 is derived from ax^3 + bx^2 + cx + d = 0 by substituting x = t - b/(3a). The values p = (3ac - b^2)/(3a^2) and q = (2b^3 - 9abc + 27a^2d)/(27a^3).

Last reviewed: December 2025

Worked Examples

Example 1: Three Distinct Real Roots

Solve x^3 - 6x^2 + 11x - 6 = 0
Solution:
Using Cardano's method or factoring: x^3 - 6x^2 + 11x - 6 = (x - 1)(x - 2)(x - 3) = 0 Verification with Vieta's formulas: Sum of roots: 1 + 2 + 3 = 6 = -(-6)/1 Sum of products: 1*2 + 1*3 + 2*3 = 11 = 11/1 Product: 1*2*3 = 6 = -(-6)/1
Result: Roots: x = 1, x = 2, x = 3

Example 2: One Real and Two Complex Roots

Solve x^3 + x + 2 = 0 (a=1, b=0, c=1, d=2)
Solution:
Depressed cubic: t^3 + t + 2 = 0 (already depressed since b=0) p = 1, q = 2, discriminant = -4(1) - 27(4) = -112 < 0 Using Cardano's formula: u = cbrt(-1 + sqrt(1 + 1/27)), v = cbrt(-1 - sqrt(1 + 1/27)) Real root approximately x = -1 Complex roots: 0.5 +/- 1.3229i
Result: One real root x = -1, two complex roots 0.5 +/- 1.3229i
Expert Insights

Background & Theory

The Cubic Equation Calculator applies the following established principles and formulas. Mathematics rests on a hierarchy of number systems, each extending the previous. The natural numbers (1, 2, 3, ...) support counting and ordering. The integers add negative values and zero, enabling subtraction without restriction. The rational numbers, expressible as p/q where p and q are integers and q is nonzero, close the system under division. The real numbers fill the gaps left by irrationals such as the square root of 2 or pi, forming a complete ordered field. The complex numbers, written as a + bi where i is the square root of negative one, complete the algebraic closure of the reals and allow every polynomial to have a root. Prime factorization states that every integer greater than one is uniquely expressible as a product of primes, a result known as the Fundamental Theorem of Arithmetic. Computing the greatest common divisor (GCD) of two integers relies most efficiently on the Euclidean algorithm: repeatedly replace the larger number with the remainder when it is divided by the smaller, until the remainder is zero. The last nonzero remainder is the GCD. The least common multiple (LCM) follows from the identity LCM(a, b) = |a * b| / GCD(a, b). Modular arithmetic defines equivalence classes of integers that share the same remainder under division by a modulus n. Fermat's Little Theorem and Euler's Theorem arise from this structure and underpin modern cryptography. Logarithms are the inverses of exponential functions. If b raised to the power x equals y, then the logarithm base b of y equals x. The natural logarithm uses base e, approximately 2.71828. Combinatorics counts arrangements and selections. The number of ordered arrangements (permutations) of r objects from n distinct objects is nPr = n! / (n - r)!. The number of unordered selections (combinations) is nCr = n! / (r! * (n - r)!). Pascal's triangle arranges these binomial coefficients so that each entry equals the sum of the two entries directly above it. The Fibonacci sequence, defined by F(1) = 1, F(2) = 1, and F(n) = F(n-1) + F(n-2), appears throughout nature and connects deeply to the golden ratio via Binet's formula.

History

The history behind the Cubic Equation Calculator traces back through the following developments. Mathematics as a systematic discipline traces to ancient Mesopotamia. Babylonian clay tablets dating to around 1800 BCE demonstrate knowledge of quadratic equations, Pythagorean triples, and base-60 arithmetic, suggesting a practical mathematical tradition far preceding Greek formalism. Euclid of Alexandria compiled the Elements around 300 BCE, establishing the axiomatic method that would define rigorous mathematics for over two thousand years. His work organized plane geometry, number theory, and proportion into logically chained propositions derived from a small set of postulates. The algorithm bearing his name for computing GCDs appears in Book VII and remains in use today. In the 9th century, the Persian scholar Muhammad ibn Musa Al-Khwarizmi wrote Al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, the treatise whose title gave algebra its name. He systematized the solution of linear and quadratic equations and described procedures that operated on unknowns as objects, a conceptual leap away from purely numerical calculation. Rene Descartes introduced coordinate geometry in 1637 by uniting algebra and Euclidean geometry, allowing curves to be studied through equations. This synthesis set the stage for calculus. Isaac Newton and Gottfried Wilhelm Leibniz independently developed calculus during the 1660s and 1670s, triggering a priority dispute that lasted decades and divided British and Continental mathematicians. Carl Friedrich Gauss proved the Fundamental Theorem of Algebra in 1799, showing that every nonconstant polynomial has at least one complex root. His Disquisitiones Arithmeticae of 1801 established modern number theory. David Hilbert's formalist program at the turn of the 20th century sought to place all of mathematics on an explicit axiomatic foundation, a project that Kurt Godel's incompleteness theorems of 1931 showed to be fundamentally limited. Alan Turing's work in the 1930s on computability introduced the theoretical model of the stored-program computer and linked mathematical logic directly to the limits of algorithmic calculation. His proof that no algorithm can decide in general whether an arbitrary program will halt or run forever placed fundamental boundaries on what mathematics can mechanically determine, and it opened the discipline now known as theoretical computer science.

Share this calculator

Explore More

Frequently Asked Questions

A cubic equation is a polynomial equation of degree three, written in the standard form ax^3 + bx^2 + cx + d = 0, where a is not equal to zero. The coefficient a is called the leading coefficient, b is the quadratic coefficient, c is the linear coefficient, and d is the constant term. Unlike quadratic equations that form parabolas, cubic equations graph as S-shaped curves that can cross the x-axis up to three times. Every cubic equation with real coefficients has at least one real root, which is guaranteed by the Intermediate Value Theorem since the function approaches positive infinity in one direction and negative infinity in the other.
Cardano's formula, published in 1545 by Gerolamo Cardano, is the cubic analog of the quadratic formula. The method first eliminates the quadratic term by substituting x = t - b/(3a) to create a depressed cubic t^3 + pt + q = 0. Then it uses the substitution t = u + v and solves for u and v using the relationship u^3 + v^3 = -q and 3uv = -p. The resulting cube roots give the solution. While historically groundbreaking, the formula can produce complex intermediate values even when all roots are real, a situation known as casus irreducibilis. In such cases, the trigonometric method provides a more practical approach.
The discriminant of a cubic equation reveals the nature of its roots without actually solving it. For ax^3 + bx^2 + cx + d = 0, the discriminant is calculated as -4p^3 - 27q^2 (from the depressed form). When the discriminant is positive, the equation has three distinct real roots. When it equals zero, the equation has repeated roots (either a double root and a single root, or a triple root). When the discriminant is negative, the equation has one real root and two complex conjugate roots. This classification is extremely useful for quickly understanding the behavior of the cubic equation.
Vieta's formulas establish elegant relationships between the coefficients of a polynomial and its roots. For a cubic equation ax^3 + bx^2 + cx + d = 0 with roots r1, r2, and r3, the formulas state: the sum of roots r1 + r2 + r3 = -b/a, the sum of products of pairs r1*r2 + r1*r3 + r2*r3 = c/a, and the product of all roots r1*r2*r3 = -d/a. These formulas are incredibly useful for checking solutions and for problems where you need relationships between roots without finding the actual root values. They also extend naturally to polynomials of any degree.
Critical points of a cubic function f(x) = ax^3 + bx^2 + cx + d are found by setting the derivative equal to zero. The derivative is f'(x) = 3ax^2 + 2bx + c, which is a quadratic equation. Using the quadratic formula gives the critical points. If the discriminant 4b^2 - 12ac is positive, there are two critical points (a local maximum and minimum). If it equals zero, there is one inflection point where the function flattens momentarily. If negative, there are no real critical points and the function is monotonically increasing or decreasing. The inflection point is always at x = -b/(3a).
A depressed cubic is a cubic equation with no quadratic term, written as t^3 + pt + q = 0. Any general cubic ax^3 + bx^2 + cx + d = 0 can be converted to depressed form by substituting x = t - b/(3a), which eliminates the x^2 term through a process called Tschirnhaus transformation. This simplification is useful because the depressed cubic is much easier to solve analytically. The values of p and q in the depressed form determine the discriminant and the nature of the roots. Cardano's formula and the trigonometric method both work directly with the depressed cubic form to find solutions.
Educational Note: This calculator is provided for educational and informational purposes. Results are based on the formulas and inputs provided. Always verify important calculations independently. NovaCalculator processes calculator inputs client-side; optional analytics follow visitor consent settings.Reviewed by: NovaCalculator Mathematics Team โ€” Verified against standard mathematical and scientific references. Last reviewed: December 2025. ยฉ 2024โ€“2026 NovaCalculator.

Share this calculator

Formula

x = cbrt(-q/2 + sqrt(q^2/4 + p^3/27)) + cbrt(-q/2 - sqrt(q^2/4 + p^3/27))

Where the depressed cubic t^3 + pt + q = 0 is derived from ax^3 + bx^2 + cx + d = 0 by substituting x = t - b/(3a). The values p = (3ac - b^2)/(3a^2) and q = (2b^3 - 9abc + 27a^2d)/(27a^3).

Worked Examples

Example 1: Three Distinct Real Roots

Problem: Solve x^3 - 6x^2 + 11x - 6 = 0

Solution: Using Cardano's method or factoring:\nx^3 - 6x^2 + 11x - 6 = (x - 1)(x - 2)(x - 3) = 0\nVerification with Vieta's formulas:\nSum of roots: 1 + 2 + 3 = 6 = -(-6)/1\nSum of products: 1*2 + 1*3 + 2*3 = 11 = 11/1\nProduct: 1*2*3 = 6 = -(-6)/1

Result: Roots: x = 1, x = 2, x = 3

Example 2: One Real and Two Complex Roots

Problem: Solve x^3 + x + 2 = 0 (a=1, b=0, c=1, d=2)

Solution: Depressed cubic: t^3 + t + 2 = 0 (already depressed since b=0)\np = 1, q = 2, discriminant = -4(1) - 27(4) = -112 < 0\nUsing Cardano's formula:\nu = cbrt(-1 + sqrt(1 + 1/27)), v = cbrt(-1 - sqrt(1 + 1/27))\nReal root approximately x = -1\nComplex roots: 0.5 +/- 1.3229i

Result: One real root x = -1, two complex roots 0.5 +/- 1.3229i

Frequently Asked Questions

What is a cubic equation and what does it look like?

A cubic equation is a polynomial equation of degree three, written in the standard form ax^3 + bx^2 + cx + d = 0, where a is not equal to zero. The coefficient a is called the leading coefficient, b is the quadratic coefficient, c is the linear coefficient, and d is the constant term. Unlike quadratic equations that form parabolas, cubic equations graph as S-shaped curves that can cross the x-axis up to three times. Every cubic equation with real coefficients has at least one real root, which is guaranteed by the Intermediate Value Theorem since the function approaches positive infinity in one direction and negative infinity in the other.

How does Cardano's formula solve cubic equations?

Cardano's formula, published in 1545 by Gerolamo Cardano, is the cubic analog of the quadratic formula. The method first eliminates the quadratic term by substituting x = t - b/(3a) to create a depressed cubic t^3 + pt + q = 0. Then it uses the substitution t = u + v and solves for u and v using the relationship u^3 + v^3 = -q and 3uv = -p. The resulting cube roots give the solution. While historically groundbreaking, the formula can produce complex intermediate values even when all roots are real, a situation known as casus irreducibilis. In such cases, the trigonometric method provides a more practical approach.

What does the discriminant tell you about cubic equation roots?

The discriminant of a cubic equation reveals the nature of its roots without actually solving it. For ax^3 + bx^2 + cx + d = 0, the discriminant is calculated as -4p^3 - 27q^2 (from the depressed form). When the discriminant is positive, the equation has three distinct real roots. When it equals zero, the equation has repeated roots (either a double root and a single root, or a triple root). When the discriminant is negative, the equation has one real root and two complex conjugate roots. This classification is extremely useful for quickly understanding the behavior of the cubic equation.

What are Vieta's formulas for cubic equations?

Vieta's formulas establish elegant relationships between the coefficients of a polynomial and its roots. For a cubic equation ax^3 + bx^2 + cx + d = 0 with roots r1, r2, and r3, the formulas state: the sum of roots r1 + r2 + r3 = -b/a, the sum of products of pairs r1*r2 + r1*r3 + r2*r3 = c/a, and the product of all roots r1*r2*r3 = -d/a. These formulas are incredibly useful for checking solutions and for problems where you need relationships between roots without finding the actual root values. They also extend naturally to polynomials of any degree.

How do you find the critical points of a cubic function?

Critical points of a cubic function f(x) = ax^3 + bx^2 + cx + d are found by setting the derivative equal to zero. The derivative is f'(x) = 3ax^2 + 2bx + c, which is a quadratic equation. Using the quadratic formula gives the critical points. If the discriminant 4b^2 - 12ac is positive, there are two critical points (a local maximum and minimum). If it equals zero, there is one inflection point where the function flattens momentarily. If negative, there are no real critical points and the function is monotonically increasing or decreasing. The inflection point is always at x = -b/(3a).

What is a depressed cubic and why is it useful?

A depressed cubic is a cubic equation with no quadratic term, written as t^3 + pt + q = 0. Any general cubic ax^3 + bx^2 + cx + d = 0 can be converted to depressed form by substituting x = t - b/(3a), which eliminates the x^2 term through a process called Tschirnhaus transformation. This simplification is useful because the depressed cubic is much easier to solve analytically. The values of p and q in the depressed form determine the discriminant and the nature of the roots. Cardano's formula and the trigonometric method both work directly with the depressed cubic form to find solutions.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy