StatGardenREF. DESK
Calculators/Maths/Cubic equation
Maths

Cubic equation calculator

Real roots of ax³ + bx² + cx + d = 0 via Cardano’s method.

What this calculator does

Cubic equation works out real roots of ax³ + bx² + cx + d = 0 via Cardano’s method. Enter your own figures above and the answer updates as you type: nothing is fixed in the code, so the result reflects exactly the numbers you supply.

The formula this calculator evaluates is printed under the tool and explained below, so you can check the working by hand or reuse it in a spreadsheet.

The formula

FormulaDepressed cubic t³+pt+q=0 via x=t−b/3a; discriminant Δ=(q/2)²+(p/3)³ decides one vs three real roots

The inputs explained

FieldWhat to enter
aA number. Starts at 1.
bA number. Starts at -6.
cA number. Starts at 11.
dA number. Starts at -6.

Worked examples

Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.

How the answer changes with a

Every other input is held at the calculator’s starting values while a varies. Select any row to load that scenario into the calculator.

How the answer changes with a
aReal root(s)Number of real rootsDiscriminant Δ
0.59.9003125.0370
0.755.657510.636488
11, 2, 33-0.037037
1.50.86588510.565158
20.80305610.641204
30.7300510.475995