---
slug: cubic-equation-calculator
title: "Cubic Equation Calculator"
category: math
updated: 2026-11-19
canonical: https://calcseed.com/c/math/cubic-equation-calculator/
html: /c/math/cubic-equation-calculator/
---

# Cubic Equation Calculator

Solve a cubic equation using Cardano's method, including complex roots.

## Quick answer

**Quick answer:** with the default inputs (1, -6, 11, -6), the root 1 is **3**. At these inputs: discriminant = **-0.04**, root 2 = **2**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| a | 1 |  |
| b | -6 |  |
| c | 11 |  |
| d | -6 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Root 1 | 3 |  |
| Discriminant | -0.037037 |  |
| Root 2 | 2 |  |
| Root 3 | 1 |  |

## Formula

```text
Depressed cubic: t^3 + pt + q = 0,   &Delta; = (q/2)^2 + (p/3)^3
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| a | number |  | 1 |
| b | number |  | -6 |
| c | number |  | 11 |
| d | number |  | -6 |

## Outputs

| Result | Format |
| --- | --- |
| Root 1 | primary |
| Discriminant | number |
| Root 1 | number |
| Root 2 | number |
| Root 3 | number |

## How it works

### What this calculator solves

A cubic equation ax^3 + bx^2 + cx + d = 0 has three roots counting multiplicity, and Cardano's method finds all of them: one real root with a complex pair, or three real roots, depending on the discriminant. The defaults solve x^3 − 6x^2 + 11x − 6 = 0, which factors as (x − 1)(x − 2)(x − 3) and therefore has roots 3, 2 and 1. The calculator reports the discriminant alongside the roots so you can see which case you are in.

### The depressed cubic and the discriminant

The first substitution removes the quadratic term. Substituting x = t − b/(3a) turns the general cubic into the depressed form t^3 + pt + q = 0, where p = c/a − b²/(3a²) and q = 2b³/(27a³) − bc/(3a²) + d/a. The discriminant &Delta; = (q/2)² + (p/3)³ then classifies the roots before any root is computed: its sign alone decides whether you get one real root, a repeated root, or three distinct real roots.

### Worked example at the defaults

Solve x^3 − 6x^2 + 11x − 6 = 0, so a = 1, b = −6, c = 11, d = −6. Step 1: shift = b/(3a) = −2. Step 2: p = 11 − (−6)²/3 = 11 − 12 = −1. Step 3: q = 2 × (−216)/27 − (−6 × 11)/3 − 6 = −16 + 22 − 6 = 0. Step 4: &Delta; = 0²/4 + (−1)³/27 = −1/27 ≈ −0.037. Since &Delta; < 0 there are three distinct real roots, and the trigonometric branch returns x1 = 3, x2 = 2, x3 = 1 — exactly the factorization (x − 1)(x − 2)(x − 3).

#### Vieta checks

A quick Vieta check confirms all three roots: their sum 1 + 2 + 3 = 6 must equal −b/a = 6; the pairwise sum 1 × 2 + 1 × 3 + 2 × 3 = 11 must equal c/a = 11; and the product 1 × 2 × 3 = 6 must equal −d/a = 6. All three match, so the roots are correct without any further arithmetic.

### What the discriminant tells you

| Discriminant | Root structure | Example |
| --- | --- | --- |
| &Delta; > 0 | One real root plus a complex-conjugate pair | x^3 − 1 = 0 gives x = 1 and two complex roots |
| &Delta; = 0 | All real, with a repeated root | (x − 2)²(x + 1) = 0 gives 2, 2, −1 |
| &Delta; < 0 | Three distinct real roots | Defaults give 3, 2, 1 |

The three cases correspond to how the cubic&rsquo;s graph crosses the x-axis: three crossings when &Delta;  0. For the repeated-root example x^3 − 3x^2 + 4 = 0, the same computation gives p = −3 and q = 2, so &Delta; = 1 − 1 = 0 and the calculator returns the double root 2 alongside −1.

### Common mistakes

Cubic problems add algebraic volume to the usual root-finding slips, and most errors trace to one of the following.

- Entering a = 0: the equation is then quadratic or worse, and Cardano&rsquo;s divisions break down — use a quadratic solver instead.
- Sign slips in the depressed coefficients: with b = −6 the shift is −2, and forgetting to subtract it moves every root by 2.
- Reading &Delta; > 0 as three real roots: the inequality is the reverse of the quadratic convention, since (q/2)² + (p/3)³ must be negative for the trigonometric branch to apply.
- Expecting exact radicals for the defaults: &Delta; < 0 uses the casus irreducibilis, where real roots genuinely require trigonometry or numerical methods in this implementation.
- Checking only one root: with three roots, verify all with Vieta — the sum, pairwise sum and product checks each catch different errors.

#### Cubics versus quadratics

The structural difference is the odd degree: every real cubic crosses the x-axis at least once, so a purely complex answer is impossible, while a quadratic can hide entirely in the complex plane. The discriminant conventions flip accordingly — a negative quadratic discriminant means no real roots, but a negative cubic discriminant means the maximum case of three real roots. When a cubic has an obvious rational root r, synthetic division by (x − r) reduces it to the quadratic case, which is a useful hand check against the calculator&rsquo;s output.

### Where cubic equations appear

Volume problems are the classical source — a box with a square base of height-to-side constraints produces a cubic in the side length. Calculus uses cubics to locate critical points of quartic functions, since the derivative of a quartic is cubic. Economics and engineering fit cubic cost and stress models, and in 2026 numerical-analysis coursework the cubic is the standard demonstration problem for Newton&rsquo;s method, where the roots 3, 2 and 1 of the default equation give three different basins of convergence from a single starting guess.

## FAQ

### What are the roots of x³ − 6x² + 11x − 6 = 0?

Three real roots: x = 3, x = 2 and x = 1, since the polynomial factors as (x − 1)(x − 2)(x − 3). The discriminant is about −0.037, which is negative, confirming three real roots.

### How many real roots can a cubic have?

Either one real root plus a complex pair, or three real roots, decided by the sign of &Delta; = (q/2)² + (p/3)³. A negative &Delta; gives three real roots, zero gives a repeated root, and positive gives exactly one.

### Why do complex roots show only a real part?

The numeric output shows the real component of the complex pair, because both members share the same real part −b/(3a)-adjusted value. The steps describe the pair rather than printing two numbers with imaginary components.

### What is Cardano's method?

A classical procedure that shifts x by b/(3a) to remove the quadratic term, then solves the depressed cubic t³ + pt + q = 0 with cube roots or, when &Delta; < 0, an equivalent trigonometric formula. It was published in 1545 and still underlies textbook solutions.

### What does a = 0 do?

The equation stops being cubic and the calculator reports that a must be non-zero. With a = 0, b &ne; 0 you have a quadratic and should use a quadratic solver for the correct two-root output.

### How do I check cubic roots by hand?

Use Vieta&rsquo;s formulas: the roots must sum to −b/a, multiply in pairs to c/a, and multiply all together to −d/a. For the defaults, 3 + 2 + 1 = 6, 3 × 2 + 3 × 1 + 2 × 1 = 11 and 3 × 2 × 1 = 6 all match.

### Can a cubic have exactly two real roots?

Only by counting multiplicity: a double root counts twice, as in (x − 2)²(x + 1), which has the distinct values 2 and −1. Distinct real roots come only in counts of one or three.

### Does the calculator handle negative coefficients?

Yes — the defaults already include b = −6 and d = −6. Signs feed straight into p, q and the shift, which is why the worked example&rsquo;s arithmetic tracks every sign explicitly.

## Method and sources

Methodology: Results follow exact mathematical definitions; the arithmetic is deterministic and can be verified by hand from the steps shown.

Last updated: 2026-11-19.
- Cardano's formula for solving the depressed cubic.
