Polynomial Calculator

Solve quadratic and cubic polynomial equations or evaluate a polynomial at any x. Instant roots with step-by-step working shown.

📊 Polynomial Calculator

Find roots of ax² + bx + c = 0

Find roots of ax³ + bx² + cx + d = 0

Evaluate P(x) - enter coefficients from highest to lowest degree

Root 1
Root 2
Discriminant (D)
Real Root 1
Real Root 2
Real Root 3
P(x) Result

Step-by-step working

📊 What is a Polynomial Calculator?

A polynomial calculator is a mathematical tool that solves polynomial equations and evaluates polynomial expressions. Polynomials are algebraic expressions consisting of variables raised to non-negative integer powers with real coefficients - the building blocks of algebra and calculus. This calculator handles the two most important cases in secondary and undergraduate mathematics: quadratic equations (degree 2) and cubic equations (degree 3), plus the ability to evaluate any polynomial at a given point.

Polynomial equations arise in virtually every quantitative field. Quadratic equations model projectile motion (the path of a ball thrown upward), optimisation problems (maximising profit or minimising cost), and circuit analysis in electrical engineering. Cubic equations appear in structural engineering (beam deflection), economics (supply-demand equilibria), and physics (potential energy curves). Understanding polynomial roots - the values where the polynomial equals zero - is fundamental to all these applications.

A common misconception is that all polynomial equations have "nice" integer roots. In reality, most quadratics produce irrational roots involving surds (e.g., x = 1 + √3), and cubic equations frequently yield complex numerical roots. This calculator handles all cases: two real roots, one repeated root, and complex conjugate roots for quadratics; and one or three real roots for cubics.

The Evaluate mode lets you compute P(x) for any polynomial of any degree you define. This is useful for checking function values, building tables of values for graphing, and verifying whether a suspected root actually satisfies the equation. The calculation uses Horner's method - an efficient algorithm that requires only n multiplications and n additions for a degree-n polynomial.

📐 Formula

Quadratic Formula: x = (−b ± √(b² − 4ac)) ÷ (2a)
a = coefficient of x² (must be non-zero)
b = coefficient of x
c = constant term
D = b² − 4ac = discriminant. D > 0: two real roots; D = 0: repeated root; D < 0: complex roots
Vieta's formulas: x₁ + x₂ = −b/a   |   x₁ × x₂ = c/a
Example: x² − 5x + 6 = 0 → D = 25 − 24 = 1 → x = (5 ± 1)/2 → x₁ = 3, x₂ = 2
Cubic: ax³ + bx² + cx + d = 0 (solved numerically)
Newton–Raphson iteration: xₙ₊₁ = xₙ − f(xₙ) / f'(xₙ)
f'(x) = 3ax² + 2bx + c (derivative of the cubic)
Fundamental Theorem: every degree-n polynomial has exactly n roots (real or complex)

📖 How to Use This Calculator

Steps

1
Choose a mode - Select Quadratic to solve ax² + bx + c = 0, Cubic for degree-3 equations, or Evaluate P(x) to compute a polynomial's value at a specific x.
2
Enter the coefficients - For Quadratic/Cubic, type the values of a, b, c (and d for cubic) into the fields. For Evaluate, enter all coefficients from highest degree to lowest, separated by commas (e.g., for 3x² − 2x + 1 enter 3, -2, 1).
3
Click Calculate - The calculator displays all roots, the discriminant value for quadratics, and the complete step-by-step working so you can follow the method.

💡 Example Calculations

Example 1 — Two Distinct Real Roots

Solve x² − 5x + 6 = 0

1
Identify a = 1, b = −5, c = 6. Discriminant D = (−5)² − 4(1)(6) = 25 − 24 = 1
2
D > 0 → two distinct real roots. x = (5 ± √1) / 2 = (5 ± 1) / 2
3
x₁ = (5 + 1) / 2 = 3    x₂ = (5 − 1) / 2 = 2
Roots: x₁ = 3 and x₂ = 2   |   Check: 3×2 = 6 = c/a ✓ and 3+2 = 5 = b/a ✓
Try this example →

Example 2 — Complex Roots (Negative Discriminant)

Solve x² + 2x + 5 = 0

1
a = 1, b = 2, c = 5. D = 2² − 4(1)(5) = 4 − 20 = −16
2
D < 0 → two complex roots. x = (−2 ± √(−16)) / 2 = (−2 ± 4i) / 2
3
x₁ = −1 + 2i    x₂ = −1 − 2i (complex conjugates)
Roots: −1 + 2i and −1 − 2i   |   No real x-intercepts; the parabola sits above the x-axis
Try this example →

Example 3 — Cubic with Three Real Roots

Solve x³ − 6x² + 11x − 6 = 0

1
a = 1, b = −6, c = 11, d = −6. This factors as (x−1)(x−2)(x−3).
2
Newton–Raphson iterations from multiple starting points converge to roots 1, 2, and 3.
3
Verification: 1³−6(1)²+11(1)−6 = 1−6+11−6 = 0 ✓   2³−6(4)+22−6 = 8−24+22−6 = 0 ✓
Real roots: x = 1, 2, 3
Try this example →

❓ Frequently Asked Questions

What is a polynomial equation?+
A polynomial equation is formed by setting a polynomial expression equal to zero: aₙxⁿ + aₙ₋₁xⁿ⁻¹ + … + a₁x + a₀ = 0. The degree n is the highest power. Degree 2 is quadratic, degree 3 is cubic, degree 4 is quartic. The Fundamental Theorem of Algebra guarantees exactly n roots (counting complex roots and multiplicity).
What is the quadratic formula and how is it derived?+
The quadratic formula x = (−b ± √(b²−4ac)) / (2a) is derived by completing the square on ax² + bx + c = 0. Divide by a, move c/a to the right, add (b/2a)² to both sides, factor the perfect square on the left, take square roots, and isolate x. The ± symbol produces the two roots.
What does the discriminant tell you?+
The discriminant D = b² − 4ac tells you the nature of the quadratic roots without solving. D > 0: two distinct real roots (parabola crosses x-axis twice). D = 0: one repeated real root (parabola touches x-axis once). D < 0: two complex conjugate roots (parabola does not touch x-axis). The discriminant appears under the square root in the quadratic formula.
Can a quadratic equation have no real solutions?+
Yes — when the discriminant D < 0. For example, x² + 1 = 0 has no real solution because x² ≥ 0 for all real x, so x² + 1 ≥ 1 > 0. The solutions ±i are complex numbers. Geometrically, the parabola y = x² + 1 sits entirely above the x-axis and never intersects it.
What are Vieta's formulas?+
Vieta’s formulas relate the coefficients of a polynomial to symmetric functions of its roots. For ax² + bx + c = 0: sum of roots = −b/a, product of roots = c/a. For ax³ + bx² + cx + d = 0: sum = −b/a, sum of products of pairs = c/a, product of all three = −d/a. These formulas let you verify roots quickly without substitution.
Why does a cubic always have at least one real root?+
A cubic polynomial P(x) = ax³ + … is continuous and P(x) → ±∞ as x → ±∞ (since ax³ dominates). By the Intermediate Value Theorem, a continuous function that goes from −∞ to +∞ must cross zero at least once. In contrast, a quadratic (even degree) can remain entirely positive or entirely negative, giving no real roots.
How does Newton-Raphson find cubic roots?+
Starting from an initial guess x₀, Newton–Raphson repeatedly applies xₙ₊₁ = xₙ − f(xₙ)/f′(xₙ) until the change is smaller than a tolerance (typically 10−¹¹). The method converges quadratically near a root — the number of correct decimal places roughly doubles each iteration. This calculator starts from 13 different initial guesses to catch all real roots.
What is the difference between factored form and standard form?+
Standard form is ax² + bx + c (coefficients listed). Factored form is a(x − r₁)(x − r₂) where r₁ and r₂ are the roots. Once you find roots using the quadratic formula, the factored form follows directly. For example, roots 2 and 3 with a = 1 give (x − 2)(x − 3) = x² − 5x + 6 in standard form.
What is the Rational Root Theorem?+
The Rational Root Theorem states that if a polynomial with integer coefficients has a rational root p/q (in lowest terms), then p must divide the constant term and q must divide the leading coefficient. For example, for x³ − 6x² + 11x − 6, the constant is 6 and leading coefficient is 1, so rational roots must be ±1, ±2, ±3, ±6. Testing shows 1, 2, 3 are all roots.
How do I use the Evaluate mode to check if a number is a root?+
Enter the polynomial coefficients from highest to lowest degree (e.g., for x³ − 6x² + 11x − 6 enter 1, -6, 11, -6), then enter the suspected root as x. If P(x) = 0, the number is indeed a root. This mode uses Horner’s method for efficiency: for degree n, it performs exactly n multiplications and n additions.

What is a polynomial equation?

A polynomial equation is an equation of the form aₙxⁿ + aₙ₋₁xⁿ⁻¹ + … + a₁x + a₀ = 0, where n is the degree. Quadratic (degree 2) and cubic (degree 3) are the most common. The Fundamental Theorem of Algebra states every degree-n polynomial has exactly n roots (counting complex roots and multiplicity).

How does the quadratic formula work?

The quadratic formula x = (−b ± √(b²−4ac)) / (2a) gives the roots of ax² + bx + c = 0. It is derived by completing the square. The discriminant D = b²−4ac determines the nature: D > 0 gives two real roots, D = 0 gives one repeated root, D < 0 gives two complex conjugate roots.

What is the discriminant of a quadratic equation?

The discriminant D = b² − 4ac of a quadratic ax² + bx + c = 0 determines the number and type of roots. D > 0: two distinct real roots. D = 0: one repeated real root (the parabola touches the x-axis). D < 0: two complex conjugate roots (no real x-intercepts). The discriminant appears under the square root in the quadratic formula.

How many real roots can a cubic equation have?

A cubic equation ax³ + bx² + cx + d = 0 can have either one real root and two complex conjugate roots, or three real roots (which may include repeated roots). Unlike quadratics, a cubic always has at least one real root because its graph (a continuous curve going from −∞ to +∞) must cross the x-axis at least once.

What are complex roots and when do they occur?

Complex roots occur when the discriminant of a quadratic is negative (D < 0). They take the form a ± bi, where i = √−1. Complex roots always come in conjugate pairs for polynomials with real coefficients. For example, if 2 + 3i is a root, then 2 − 3i is also a root. Complex roots have no real x-intercepts - the parabola does not cross the x-axis.

What are Vieta's formulas for a quadratic?

For ax² + bx + c = 0 with roots x₁ and x₂: sum of roots x₁ + x₂ = −b/a, and product of roots x₁ × x₂ = c/a. For example, x² − 5x + 6 = 0 has roots 2 and 3: sum = 5 = −(−5)/1 ✓, product = 6 = 6/1 ✓. Vieta's formulas let you verify roots and construct polynomials from known roots.

What is polynomial evaluation (Horner's method)?

Evaluating P(x) at a specific x means computing the numerical value. Horner's method does this efficiently: instead of computing each power separately, rewrite as ((aₙx + aₙ₋₁)x + aₙ₋₂)x + … This requires only n multiplications and n additions for a degree-n polynomial, versus up to n(n+1)/2 multiplications with the naive approach.

How do you factor a quadratic polynomial?

To factor ax² + bx + c: find roots r₁ and r₂ using the quadratic formula, then write a(x − r₁)(x − r₂). For example, 2x² − 8x + 6 = 0: divide by 2 → x² − 4x + 3, roots are x = 1 and x = 3, so factors are 2(x − 1)(x − 3). If roots are irrational (e.g., √5), the factored form contains surds; if complex, factored form over reals is left as-is.

What is the difference between roots, zeros, and solutions of a polynomial?

These three terms mean the same thing: values of x where the polynomial equals zero. 'Roots' is the algebraic term (roots of an equation), 'zeros' is the function term (zeros of the function f(x) = polynomial), and 'solutions' is the equation-solving term. All three refer to x values satisfying aₙxⁿ + … + a₀ = 0.

Can all cubic equations be solved analytically?

Yes - Cardano's formula (1545) provides an exact closed-form solution for all cubic equations, analogous to the quadratic formula. However, the formula is complex and often produces nested cube roots of complex numbers even when all roots are real. In practice, numerical methods like Newton–Raphson are preferred for cubic and higher-degree polynomials due to simplicity and speed.