Cubic Equation Solver

Solve equations of the form ax3 + bx2 + cx + d = 0

A cubic equation has a third-degree term, so its graph can have up to two turning points and up to three real x-intercepts. Cubics appear in algebra, curve fitting, engineering approximations, optimization models, and physical relationships where linear and quadratic expressions are not flexible enough. This solver accepts the four polynomial coefficients and reports every root, including complex roots when fewer than three real intercepts exist.

To solve a cubic means finding every value of x for which the polynomial equals zero. These values are also called roots or zeros; real roots are x-intercepts of the plotted polynomial. A cubic can have three real roots, one real root plus a complex conjugate pair, or roots with multiplicity when the curve touches the axis or passes through it with a flattened shape.

ax3 + bx2 + cx + d = 0

Enter the coefficients in descending powers of x: a multiplies x3, b multiplies x2, c multiplies x, and d is the constant. Supply 0 for every missing term. For example, x3 - 7x + 6 = 0 uses a = 1, b = 0, c = -7, and d = 6.

Entering cubic coefficients in the correct order

For this cubic solver, coefficient placement matters more than any button press. First move every term to the left side so the equation equals zero, then read the coefficients from the cubic term through the constant. For 2x3 + 5 = 9x, rearrange to 2x3 - 9x + 5 = 0. The entries are therefore a = 2, b = 0, c = -9, and d = 5.

After selecting Solve Cubic, each returned value is a root of the entered polynomial. Real roots appear as decimals. Nonreal roots appear as a real part combined with i times an imaginary part; for real coefficients, those nonreal answers occur as a conjugate pair. If a = 0, the equation is not cubic, and the solver instead applies its quadratic or linear fallback.

Cubic coefficients and roots do not have built-in units. If x represents a measured quantity in your model, however, each root uses the same unit as x. You must still apply the constraints of the original problem: for instance, a negative time may be mathematically valid but unusable in a time-based application.

What each cubic coefficient input means

Coefficient a: the multiplier of the x3 term. It sets the cubic’s end behavior and vertical scale: a positive value rises to the right, while a negative value falls to the right. If a is zero, the entered equation is no longer cubic.

Coefficient b: the multiplier of x2. Along with the other coefficients, it affects the location of turning points and the horizontal shift used to remove the squared term in Cardano’s method.

Coefficient c: the multiplier of x. This term affects the local slope and can substantially change the number and location of real roots.

Coefficient d: the constant. It is the polynomial value at x = 0, so it gives the graph’s y-intercept. Altering d shifts the polynomial’s value at the origin and may change its real-root pattern.

How Cardano’s method solves this cubic equation

This cubic equation calculator uses the standard Cardano reduction. It first shifts the variable to eliminate the squared term, converting the entered polynomial into a depressed cubic. The substitution is:

x = t - b 3a

For a nonzero cubic coefficient, that substitution produces the depressed cubic:

t3 + pt + q = 0

where

p= 3ac-b2 3a2 , q= 2b3-9abc+27a2d 27a3

The Cardano discriminant used by this solver is:

Δ = (q2)2 + (p3)3

Its sign determines the cubic-root case. When Δ > 0, there is one real root and two complex roots. When Δ = 0, at least two roots coincide. When Δ < 0, all three roots are distinct and real. The analysis beneath the result reports the applicable case for the coefficients you enter.

Interpreting cubic roots and complex pairs

A root returned by this cubic solver is a value that makes the polynomial zero; it is not automatically the appropriate answer for every applied problem. Pure algebra treats every root as part of the solution. A model may impose extra conditions, such as requiring a length to be positive or discarding complex values when only real measurements are meaningful.

Graphing helps explain the output. Each real root is an x-axis intersection. A repeated root commonly corresponds to a tangent-like touch at the axis, although multiplicity can also produce a flattened crossing. Complex roots are still valid algebraic roots, but they do not create additional real x-intercepts on the ordinary Cartesian graph.

Worked cubic example: three real roots

Consider x3 - 6x2 + 11x - 6 = 0. Enter a = 1, b = -6, c = 11, and d = -6. This polynomial factors as (x - 1)(x - 2)(x - 3), so its roots are 1, 2, and 3. The displayed decimal values should agree apart from normal rounding.

This cubic illustrates the three-real-roots branch: the graph crosses the x-axis three times. It also provides a practical coefficient-order check, because a result near 1.000000, 2.000000, and 3.000000 indicates that the terms were entered in their intended positions.

Worked cubic example: one real root and a complex pair

For x3 + x + 1 = 0, enter a = 1, b = 0, c = 1, and d = 1. This cubic has one real x-intercept, so the solver returns one real root and two conjugate complex roots. The pair supplies the remaining roots required when multiplicity is counted.

Vieta’s formula offers a useful check for a genuine cubic: the three roots, including complex roots, add to -b/a. In this example b = 0, so the total is zero. The imaginary components of a conjugate pair cancel, leaving a real sum.

Cubic solver edge cases and numerical output

This cubic solver deliberately recognizes near-degenerate equations. When a is extremely small, its code treats the expression as quadratic rather than relying on a negligible cubic term. If a and b are both effectively zero, it falls back to a linear equation. This is useful when rounded data contains coefficients that are close to zero.

Roots are displayed to six decimal places for readability. That formatting does not guarantee six significant digits of physical or mathematical precision for all inputs. Very large or very small coefficients can magnify floating-point effects, and repeated roots can display as values that differ slightly after numerical calculation. Symbolic factorization or a computer algebra system is better suited to exact-form work.

The calculator accepts real numeric coefficients, including negative decimals. It does not parse symbolic coefficients, slash fractions, or complex coefficients. Enter 0 rather than leaving a missing polynomial term blank; for example, use 0 for b in a cubic with no squared term.

Why cubic root classification depends on the discriminant

The discriminant calculation on this page is specific to the depressed cubic created from your four coefficients. It does more than label the answer: it selects the numerical branch used to return either three real roots, a repeated-root result, or one real root with a complex pair.

For the three-real-root branch, the solver uses a trigonometric form of Cardano’s method. For a positive discriminant, it uses real cube roots to obtain the real solution and then constructs the conjugate pair. At a zero discriminant, it returns the repeated value according to its multiplicity. These different paths avoid treating every cubic as though it had the same root pattern.

That structure also explains why the coefficient fields cannot be treated as unrelated numbers. Together, a, b, c, and d define one polynomial, its shifted form, its discriminant, and ultimately the roots shown in the result box. Check the standard form before solving whenever the output is unexpected.

Enter coefficients

Standard form: ax³ + bx² + cx + d = 0. If a term is missing, enter 0.

The default example solves x³ - 7x + 6 = 0, which has three real roots.

Enter coefficients to compute roots.
After solving, this area explains the root pattern and discriminant case.

Mini-game: Cubic Root Radar

This optional cubic-root mini-game turns graph reading into a quick challenge. Each round draws a new cubic curve. Aim the vertical solver beam and click or tap where the curve crosses the x-axis. Some cubics have three real roots and others have one, while the HUD tracks the real intercepts still required. It is a visual companion to the calculator’s central idea: real roots are x-values that make the cubic polynomial zero.

Score 0 Time 75.0s Streak 0 Wave 0 Need 0 Best 0

Wave equation: ready to generate a cubic.

Cubic Root Radar

Find real cubic roots by placing solver pings where the graph crosses the x-axis. Move your pointer or finger to aim, then click or tap to lock a root. Keyboard players can use the arrow keys to aim and Enter or Space to ping.

  • Clear as many cubic waves as you can in 75 seconds.
  • Watch the Need counter: a cubic can have one or three real roots.
  • Accurate root hits build streaks and earn bigger bonuses; misses cost time.

Best score saved on this device: 0

Takeaway: every real cubic root is an x-axis crossing. Complex roots count algebraically but do not appear as additional x-intercepts.

Embed this calculator

Copy and paste the HTML below to add the Cubic Equation Solver: Cardano Roots, Repeated Roots, and Complex Pairs to your website.