Cubic Equation Calculator
Cardano / trigonometric closed form for a real cubic. Same engine as Polynomial Roots. Three real roots or one real plus a conjugate pair. Not Ferrari. Not a second cubic engine. Runs locally.
Trust summary Engine tested · Specification checked · 21/21 tests · Production surface contract 1/1 · v1.2.0
- Input interpretation
- Enter values to calculate.
- Result
- —
- Model
- All three roots of a real cubic ax³+bx²+cx+d = 0 by Cardano / trigonometric closed form.
- Scope
- Real coefficients
- Verification
- Engine tested · 21/21 tests · Production surface contract 1/1 · Specification checked · v1.2.0
- Named expert review
- Optional · Not performed
- Specification basis
- ISO 80000-2:2019 Quantities and units — Mathematics
- Evidence
- 7 golden · 6 boundary · 8 property · Production surface contract 1/1 · Artifact integrity PASS
- Production
- Embedded snapshot: unpublished · Build schema 1.2.0 ready · Semantic contract ✓ · Attestation report not published on origin · Live production status STALE (2 capabilities; 162 remain CURRENT) @ 2026-09-20T09:01:12.147Z
- Semantic contract
- PASS
Formulas
Core equations used by this calculator.
How to use
Enter a, b, c, d
From ax³ + bx² + cx + d = 0 with a ≠ 0. All-roots of a general polynomial stays at /polynomial-roots.
Read every root
Three real roots when the depressed discriminant is negative. Otherwise one real root and a complex conjugate pair.
Example calculations
Common configurations with formula and result.
Three real roots
(x−1)(x−2)(x−3) = 0
One real root
x³ − 1 = 0
Cubic Equation calculator specification
Version 1.2.0 · Engine tested
- Engine tested 21/21 tests · Production surface contract 1/1
- Named expert review Not performed
- Calculation version 1.2.0
- Definition
- ax³ + bx² + cx + d = 0 has three roots in the complex plane. This page is method=cardano on math.polynomial.roots. Depress to t³ + p t + q = 0, then Cardano or the trigonometric form. Not a second engine. Not Ferrari.
- What it calculates
- All three roots of a real cubic ax³+bx²+cx+d = 0 by Cardano / trigonometric closed form.
- Inputs
- a
- b
- c
- d
- Outputs
- roots
- degree
- solver
- cubic_case
- residual_max
- Formula
t³ + p t + q = 0 after x = t − b/(3a)- Assumptions
- Real coefficients
- a ≠ 0
- Float64
- Not a CAS
- Not Ferrari as a product
- Units
- dimensionless
- Boundary conditions
- a = 0 → INVALID_INPUT
- degree ≠ 3 with method=cardano → INVALID_INPUT
- unknown method (including ferrari, quadratic, cas) → INVALID_MODE
- Example
- a=1 b=-6 c=11 d=-6 → 1, 2, 3
- Validation cases
2 published on this page · 21/21 tests · Production surface contract 1/1 · View evidence
- a=1 b=-6 c=11 d=-6 → 1, 2, 3
- method=ferrari a=1 b=0 c=0 d=-1 → INVALID_MODE
- Specification basis
- ISO 80000-2:2019 Quantities and units — Mathematics
- Calculation version
- 1.2.0
Related tools
Other calculators in this family: Absolute Value Calculator, Absolute Value Inequality Calculator, Column Space Calculator, Condition Number Calculator, Least Squares Calculator, Left Nullspace Calculator, Linear Equation Calculator, Linear Inequality Calculator . Explore all Algebra & Equations.
Frequently asked questions
Key distinctions behind the calculation.
Is this a second polynomial engine?
No. It is method=cardano on math.polynomial.roots, the same engine as /calc/math/polynomial-roots. Degree 4–8 still uses Durand–Kerner on that page.
Is this the quadratic formula page?
No. /calc/math/quadratic is ax²+bx+c with discriminant, vertex, and a parabola. This page is the cubic closed form.
Do you ship Ferrari’s quartic formula?
No. Quartic and higher stay Durand–Kerner on /polynomial-roots. Ferrari is INVALID_MODE.