Cubic Equation Solver

Solve ax³+bx²+cx+d=0 numerically

Cubic Equation Solver — free online tool

🔒 Locally run · Method · · Disclaimer · Cubic Equation Solver

Cubic Equation Solver turns the numbers behind solving ax³+bx²+cx+d=0 numerically into an instant, step-by-step result. Fill in a, b and c on Cubic Equation and read your answer immediately. Cubic Equation displays each intermediate figure as well. That makes Cubic Equation handy for quick estimates anywhere. Cubic Equation is privacy-first: Math inputs stay offline. Cubic Equation sits in the Math section next to related tools and free online cubic equation solver. Cubic Equation is designed for real people. Labels stay plain. Try Cubic Equation now and keep it handy.

What the defaults give

x³ − 9x − 27 = 0 has a single real root at x = 3.9742. The other two roots are complex.

The solver scans the interval −100 to 100 for sign changes, then bisects each bracket until the interval is smaller than 0.0001.

Plotting a cubic

A cubic ax³ + bx² + cx + d = 0 always has at least one real root, because the curve runs to +∞ at one end and −∞ at the other. The number of turns is at most two.

Take x³ − x = 0, which factors as x(x − 1)(x + 1): it crosses the axis at −1, 0 and 1. Confirm the shape with the function grapher — enter x^3 - x. Related: quadratic solver and nth root.

How a numeric solver works

Find x where f(x) = ax³ + bx² + cx + d crosses zero.

A cubic always has at least one real root, because the function runs from −∞ to +∞ as x does (when a is positive) and a continuous curve must cross zero somewhere. The solver walks the interval in small steps, notes every place where the sign of f changes, and then narrows that bracket by repeated halving. Four decimal places need only about twenty halvings per root.

Worked examples

x³ − 9x − 27 = 0 → 3.9742 (one real root)
2x³ − 9x − 27 = 0 → 3.0000, because 2(27) − 27 − 27 = 0
x³ − 18x − 27 = 0 → −3.0000, −1.8541, 4.8541 (three real roots)
x³ − 9x − 54 = 0 → 4.5641

Check the single-root case by substitution: 3.9742³ is 62.770, minus 9 × 3.9742 (35.768) minus 27 is −0.0002, which is zero within the tolerance. The double-root case falls apart quickly too: at x = 3, 54 − 27 − 27 = 0.

Why there is only one root

The derivative 3x² − 9 is zero at x = ±1.732, so the curve turns only there. Between those turning points it dips no lower than −37.4, and the maximum at the left turning point is 10.8 — both on the same side of the axis as the ends are, so the curve crosses zero exactly once. Change c to −18 and the dip reaches −4 and the hump reaches +4, which puts the axis between them and gives three crossings.

That is the general rule for a depressed cubic: three real roots when the local minimum is below zero and the local maximum is above it, one otherwise.

What to watch

The scan range is fixed at −100 to 100. A root outside it is never found, and two roots closer together than the scan step can be missed entirely. Very large coefficients flatten the curve near the axis, which also hides closely spaced roots from a sign-change search.

The solver reports real roots only; a cubic with one real root shows one number and calls the other two complex. Exact fractions, repeated roots and algebraic form are not produced — for those you need the closed-form Cardano solution or a computer algebra system.

Frequently Asked Questions

How many real roots does a cubic have?

One, two or three. A depressed cubic has three when its local maximum is above zero and its local minimum is below zero, and one otherwise.

Why does x³ − 9x − 27 give only one root?

Its turning points sit at ±1.732, where the values are 10.8 and −37.4. Only one branch crosses the axis, so the other two roots are complex.

How accurate is the answer?

To about four decimal places. The solver bisects each bracket until it is smaller than 0.0001, so the reported value is inside that window.

Can it find a root outside −100 to 100?

No. The scan is bounded, so a root beyond that range is never bracketed. Scale the coefficients down or solve on a shifted variable.

Does it show complex roots?

It reports that they exist but not their values. Real roots are the output; complex pairs need the algebraic solution.

About CalcProMaster calculators

CalcProMaster is a free library of 1285 online calculators across 20 categories — finance, health, math, business, construction, engineering, conversion, education and more. Every calculator runs entirely in your browser: no sign-up, no paywall, and no data leaves your device.

What makes these calculators different is transparency. Each tool shows the exact formula it uses. It also shows a step-by-step breakdown of how your inputs become the result. That way you can check the math instead of trusting a black box. Every calculator page explains how to read the result. It also lists common mistakes, assumptions and limitations. An FAQ sits with every one, and the most-used tools add a worked example. Health and finance tools name the formula they follow. Calorie needs use Mifflin-St Jeor. Loans use standard amortization. Each page says plainly when an answer should be confirmed with a professional.

The guides library goes deeper on the calculations people search for most. It covers percentage and discount math, loan EMI and amortization, income-tax brackets, calorie and macro planning, and concrete volumes. Each guide gives the formula, worked examples and links to the matching calculator. The glossary defines the terminology in plain language. The public formula QA dashboard shows the verification status of every calculator's math.

Popular starting points: loan EMI calculator, BMI calculator, percentage calculator, random number generator, and concrete calculator. You can also browse a category above to find the tool you need.

↑ ↓ navigate↵ openesc close