Cubic Equation Solver
Solve any cubic equation for all its roots
Result
How it is calculated
For ax³ + bx² + cx + d = 0 the tool shifts x = t + offset with offset = −b / 3a, giving t³ + pt + q = 0, where p = (3ac − b²) / 3a² and q = (2b³ − 9abc + 27a²d) / 27a³. It then checks D = q²/4 + p³/27. If D is positive, it uses Cardano's cube roots and prints one real root plus a complex pair. If D is zero (within a small tolerance relative to the size of the roots), it prints the repeated real roots, or a single value for a triple root. If D is negative, it uses a trigonometric formula for three distinct real roots. Roots are rounded to two decimals, with more decimals when they are small (roots 0.01, 0.02, 0.03 print as 0.0100, 0.0200, 0.0300). The general discriminant Δ is also shown, in scientific notation when it is tiny but not zero. The coefficient a cannot be 0, since the equation is then not cubic.
Worked example
Take x³ − 6x² + 11x − 6 = 0, so a = 1, b = −6, c = 11, d = −6. Offset = 2, p = −1, q = 0, so D = −1/27, which is negative: three distinct real roots. With m = 2·√(1/3) ≈ 1.155 and θ = π/6, the three cosine terms plus the offset give 1, 2 and 3. The tool prints 1.00, 2.00, 3.00 (real), and the discriminant is 4.00. Check: (x−1)(x−2)(x−3) expands to the same polynomial.
Common mistakes
- Leaving a coefficient blank or entering a = 0 for an equation that is really quadratic; the tool gives no result when a is zero.
- Dropping the minus sign of a coefficient, for example entering 6 instead of −6 for the x² term.
- Reading a rounded root such as 1.00 as exact; the roots are shown rounded (two decimals, more for roots below 1), so substitute them back before relying on them.
- Expecting every repeated root to be listed three times: a triple root is printed once, and the sign of Δ tells how many roots are real (positive: three distinct real; negative: one real and two complex).
About this calculator
This solver finds all roots of ax³ + bx² + cx + d = 0 using Cardano's method, the 16th-century algebraic technique that depresses the cubic (removing the x² term via substitution) and then solves the resulting form with a combination of cube roots. It reports the discriminant, whose sign tells you the nature of the roots before you even look at the numbers: positive means three distinct real roots, zero means all roots are real and at least two are equal (a double root, or a triple root when all three coincide), and negative means one real root plus a pair of complex conjugate roots.
Engineers and physicists hit cubics when solving for volumes, equilibrium points, or characteristic equations of certain systems, and math students use this to verify hand-worked Cardano's-method solutions, which are notoriously easy to make an arithmetic slip in given how many nested radicals are involved.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
A quick way to check a result is Vieta's relations: the three roots add up to minus b over a and multiply to minus d over a. For x cubed minus 6x squared plus 11x minus 6, the roots 1, 2 and 3 add to 6 and multiply to 6. This works with complex pairs too, though rounding to the displayed decimals can leave a small gap. If a result looks off, post your four coefficients.