Polynomial Evaluator

Evaluate polynomial p(x) = aₙxⁿ + … + a₁x + a₀ at any x. Up to degree 6.

Inputs

Result

p(2)
7.000000
Polynomial: x^3 - 2x^2 + 5x - 3.
  • Polynomialx^3 - 2x^2 + 5x - 3
  • Degree3
  • x2
  • p(x)7.00000000
  • Horner 10 = 0.0000.
  • Horner 2prev × 2 + 0 = 0.0000.
  • Horner 3prev × 2 + 0 = 0.0000.
  • Horner 4prev × 2 + 1 = 1.0000.
  • Horner 5prev × 2 + -2 = 0.0000.

Step-by-step

  1. Use Horner's method: ((((a₆x + a₅)x + a₄)x + a₃)x + a₂)x + a₁)x + a₀.
  2. Step 1: 0 = 0.0000.
  3. Step 2: prev × 2 + 0 = 0.0000.
  4. Step 3: prev × 2 + 0 = 0.0000.
  5. Step 4: prev × 2 + 1 = 1.0000.
  6. Step 5: prev × 2 + -2 = 0.0000.
  7. Step 6: prev × 2 + 5 = 5.0000.
  8. Step 7: prev × 2 + -3 = 7.0000.

How to use this calculator

  • Set non-zero coefficients (use 0 for unused terms).
  • Set x value.
  • Read p(x).

About this calculator

Polynomial evaluation via Horner's method: rewrite p(x) = aₙxⁿ + … + a₀ as nested multiplications: ((aₙx + aₙ₋₁)x + aₙ₋₂)x + …. Cuts the operation count from O(n²) (naive) to O(n) (linear). For p(x) = x³ − 2x² + 5x − 3 at x = 2: ((1·2 − 2)·2 + 5)·2 − 3 = ((0·2 + 5)·2 − 3) = 7. Used everywhere — graphics, signal processing, finance (NPV is a polynomial in 1/(1+r)).

Frequently asked

Fewer multiplications, fewer rounding errors, and O(n) work vs. O(n²) naive. The standard polynomial evaluation algorithm.

Related calculators