Skip to main content
math

Cubic Equation Calculator

Solve cubic equations ax³ + bx² + cx + d = 0 and find all three roots (real and complex).

Reviewed by Christopher FloiedPublished Updated

This free online cubic equation calculator provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

Leading coefficient

Results

p (depressed form)

0

q (depressed form)

0

Discriminant

0

Shift -b/(3a)

0

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the Cubic Equation Calculator. Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The Cubic Equation Calculator instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

When to Use This Calculator

  • Use the Cubic Equation Calculator when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

Related Calculators

About Cubic Equation Calculator

The Cubic Equation Calculator solves polynomial equations of the third degree: ax³ + bx² + cx + d = 0. Cubic equations arise naturally in many mathematical and scientific contexts, from calculating volumes and geometric constructions to modeling population dynamics and chemical equilibria. The general solution was discovered in the 16th century by Italian mathematicians Scipione del Ferro, Niccolò Tartaglia, and Gerolamo Cardano. Unlike quadratic equations, cubics always have at least one real root (since odd-degree polynomials must cross the x-axis). The cubic discriminant determines the nature of all three roots: three distinct real roots, a repeated root, or one real root paired with two complex conjugates. This calculator uses the depressed cubic method, transforming the equation by substituting x = t - b/(3a) to eliminate the quadratic term before solving.

The Math Behind It

Every cubic equation ax³ + bx² + cx + d = 0 can be reduced to a depressed cubic t³ + pt + q = 0 by the substitution x = t - b/(3a). Here p = (3ac - b²)/(3a²) and q = (2b³ - 9abc + 27a²d)/(27a³). The depressed cubic is solved using Cardano's formula: t = ∛(-q/2 + √(q²/4 + p³/27)) + ∛(-q/2 - √(q²/4 + p³/27)). The discriminant Δ = -4p³ - 27q² determines the nature of the roots. When Δ > 0, all three roots are real and distinct (the casus irreducibilis, which ironically requires complex intermediate calculations). When Δ = 0, at least two roots are equal. When Δ < 0, there is one real root and two complex conjugate roots. The sum of the roots equals -b/a, the sum of products of pairs equals c/a, and the product of all three roots equals -d/a (Vieta's formulas for cubics). Cubic equations were historically significant because their solution led to the discovery of complex numbers, as mathematicians needed square roots of negative numbers even when all roots were real.

Formula Reference

Depressed Cubic

t³ + pt + q = 0

Variables: Substitution x = t - b/(3a) removes the x² term

Cubic Discriminant

Δ = -4p³ - 27q²

Variables: Δ > 0: three real roots; Δ = 0: repeated root; Δ < 0: one real root + two complex

Worked Examples

Example 1: Simple depressed cubic

Solve x³ - 6x + 4 = 0

Step 1:Already in depressed form with a=1, b=0: p = -6, q = 4
Step 2:Discriminant: Δ = -4(-6)³ - 27(16) = 864 - 432 = 432 > 0
Step 3:Three distinct real roots exist
Step 4:By inspection or Cardano's method, one root is x = 2
Step 5:Factor: (x - 2)(x² + 2x - 2) = 0
Step 6:Other roots: x = -1 ± √3

x = 2, x = -1 + √3 ≈ 0.732, x = -1 - √3 ≈ -2.732

Common Mistakes & Tips

  • !Forgetting that every cubic has at least one real root, unlike quadratics which might have none
  • !Not performing the substitution x = t - b/(3a) to get the depressed form before applying Cardano's formula
  • !Sign errors in the depressed cubic coefficients p and q due to the complex fractions
  • !Ignoring the casus irreducibilis: when all three roots are real but Cardano's formula involves complex cube roots

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Do all cubic equations have a closed-form solution?

Yes. Unlike quintic and higher-degree equations (which generally do not), all cubic equations can be solved using Cardano's formula, which expresses the roots in terms of radicals.

Why is the casus irreducibilis problematic?

When a cubic has three real roots, Cardano's formula paradoxically requires computing cube roots of complex numbers. The final results are real, but the intermediate steps involve complex arithmetic. This historically motivated the development of trigonometric solution methods.

Embed this calculator on your site

Paste this snippet into your blog, course page, or documentation to drop a live, interactive Cubic Equation Calculator into your page.

Free to embed — includes a link back to MegaCalc.