Skip to content
Advertisement
Hosinger Special Offer

Polynomial Solver

Polynomial Solver from Gizcalc helps you estimate results quickly within the Math & Statistics category.

  • Instant results
  • Charts & tables
  • Save & compare
  • Private – runs in your browser
Roots —

Sample inputs are pre-filled so you can see a result quickly. Results are estimates only and may not be accurate because prices, interest rates, taxes, fees, fuel costs, tariffs, market returns, medical costs, and local rules can change. Please verify current values before making financial, tax, legal, medical, or business decisions.

Formula used

x = t − b ÷ 3a, where t³ + pt + q = 0

  • p = c/a − b²/(3a²)
  • q = 2b³/(27a³) − bc/(3a²) + d/a
  • Δ = (q/2)² + (p/3)³, the discriminant

About the Polynomial Solver

What is the Polynomial Solver?

A polynomial equation sets a sum of powers of x equal to zero. This solver handles cubic equations ax³ + bx² + cx + d = 0 — and, by setting the leading coefficients to 0, quadratic and linear equations too. A cubic always has three roots when complex and repeated roots are counted, and at least one of them is real.

Instead of guessing, the solver uses the closed-form Cardano / trigonometric method: it reduces the cubic to the depressed form t³ + pt + q = 0, uses the discriminant to decide between one real root and three, and then computes every root directly.

How to use the Polynomial Solver

  1. a (coefficient of x³) — set to 0 to solve a quadratic (and a = b = 0 for a linear equation). (sample: 1)
  2. b (coefficient of x²) (sample: -6)
  3. c (coefficient of x) (sample: 11)
  4. d (constant) — the constant term. (sample: -6)
  5. Press Find Roots (results also refresh as you type). The result card shows the Roots, along with Degree, Real roots found, Real root 1 and Real root 2.

Formula used

x = t − b ÷ 3a, where t³ + pt + q = 0

  • p = c/a − b²/(3a²)
  • q = 2b³/(27a³) − bc/(3a²) + d/a
  • Δ = (q/2)² + (p/3)³, the discriminant

If Δ > 0 there is one real root and two complex roots; if Δ = 0 all roots are real and at least two are equal; if Δ < 0 there are three different real roots, found using cosines.

Worked example

These are the sample values already filled in the calculator above, and the result it returns for them:

InputSample value
a (coefficient of x³)1
b (coefficient of x²)-6
c (coefficient of x)11
d (constant)-6
ResultValue
Roots1, 2, 3
Degree3
Real roots found3
Real root 11
Real root 22
Real root 33

Tips for using the Polynomial Solver

  • Rational root test: any rational root of a polynomial with whole-number coefficients equals a factor of d divided by a factor of a.
  • Once you know one root r, divide the cubic by (x − r) to get a quadratic for the other two.
  • Complex roots of real polynomials always come in conjugate pairs, such as −0.5 ± 0.866i.

Frequently asked questions

Exactly three, counting repeated and complex roots. Because complex roots come in pairs, a cubic with real coefficients always has at least one real root.

It is the 16th-century closed-form solution of the cubic. After substituting x = t − b/3a to remove the x² term, the real root of t³ + pt + q = 0 is t = ∛(−q/2 + √Δ) + ∛(−q/2 − √Δ).

1, 2 and 3, because the polynomial factors as (x − 1)(x − 2)(x − 3).

No — this solver handles polynomials up to degree 3. Quartics need Ferrari's method or a numerical root finder.