Cubic Equation Solver
Solve ax³ + bx² + cx + d = 0 for x using Cardano's method. Returns all three roots — real or complex — with a step-by-step depressed-cubic derivation.
Input
Coefficient of x³. Must not be zero.
Coefficient of x².
Coefficient of x.
Constant term.
Output
Guides
What does this calculator do?
Enter the four coefficients a, b, c, d of a cubic equation ax³ + bx² + cx + d = 0 and this tool solves for all three roots of x — real or complex — using Cardano's method, with a step-by-step derivation shown alongside the answer.
How to use it
- Enter a (the coefficient of x³ — must not be zero), b (coefficient of x²), c (coefficient of x), and d (the constant term).
- Read the three roots from the Roots field, the discriminant from Discriminant (Δ), and the full derivation from Step-by-Step Solution.
The math
Dividing the equation by a gives x³ + Bx² + Cx + D = 0. Substituting x = t − B/3 eliminates the quadratic term, leaving a depressed cubic:
t³ + pt + q = 0
p = C − B²/3
q = 2B³/27 − BC/3 + DThe sign of the discriminant Δ = (q/2)² + (p/3)³ decides the shape of the roots:
- Δ > 0 — one real root and a complex-conjugate pair, found directly from Cardano's radical formula:
u = ∛(−q/2 + √Δ),v = ∛(−q/2 − √Δ), with the real roott = u + v. - Δ = 0 — all three roots are real, with at least two equal: a triple root at
t = 0when p and q are both zero, otherwise a simple root and a double root. - Δ < 0 — three distinct real roots. Cardano's radical formula would require taking a complex cube root of a real number here (the historical "casus irreducibilis"), so this calculator uses the equivalent trigonometric form instead, which stays entirely in real arithmetic.
Finally, x = t − B/3 undoes the substitution to recover the roots of the original equation.
Example use cases
- Algebra homework and coursework — checking cubic factoring or root-finding work, including cases that don't factor into nice integers.
- Engineering and physics — cubic equations show up in beam deflection, fluid dynamics (van der Waals equation of state), and control-system characteristic equations.
- Verifying a known factorization — enter the expanded coefficients of a cubic you've factored by hand and confirm the roots match.
Privacy
All calculations run locally in your browser — your input is never sent to a server.
Related tools
For quadratic equations, see the Quadratic Formula Solver. For simple linear equations, see the Linear Equation Solver.
More ways to use this tool
REST API
curl -X POST https://api.iotools.cloud/v1/tool/cubic-equation-solver \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"coeffA": "1",
"coeffB": "-6",
"coeffC": "11",
"coeffD": "-6"
}'Swap in your own key from your account. The tool's fields are the body — no wrapper.
Ask an AI agent
Use the IOTools `cubic-equation-solver` tool (Cubic Equation Solver) on this input:
YOUR_INPUT_HEREPaste this at any agent connected to the IOTools MCP server, then add your input.
Embed widget
<iframe
src="https://iotools.cloud/embed/cubic-equation-solver/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="Cubic Equation Solver — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>Drop this into your own page — free, no key required, just a link back.
| Cost per call | From 5 credits |
|---|