🧮
🧮 Math & statistics

Polynomial Evaluator (p(x) & derivative)

Results update as you type.

Your numbers

Understanding the polynomial evaluator — concept and principle

This calculator evaluates a polynomial p(x) = a₀xⁿ + a₁xⁿ⁻¹ + … + aₙ and its first derivative p′(x) at a chosen x. Enter the coefficients from the highest power down to the constant. Evaluating polynomials is a basic step in checking roots, plotting curves, interpolation, Taylor approximations and Newton's method, where both p(x) and p′(x) are needed at each step.

Horner's method for p(2)Bring down 2; multiply by 2 and add down each column: 2, 1, 2, 9, so p(2) = 9; the same steps on 6 −6 0 give p′(2) = 12.p(x) = 2x³ − 3x² + 5, x = 2coeffs+ carry(prev × 2)result2−305+4+2+42129((2·2 − 3)·2 + 0)·2 + 5 = 9p(2) = 9, p′(2) = 12p′ = 6x² − 6x: 6 → 6 → 12
Multiply by x, add the next coefficient, repeat — the last number is p(x).

How it is calculated

Horner's method rewrites the polynomial as nested multiplication:

p(x) = (…((a₀x + a₁)x + a₂)x + …)x + aₙ

Start with s = 0; for each coefficient in order, set s ← s·x + coefficient. The final s is p(x).

Derivative: the power rule turns aₖxᵐ into m·aₖxᵐ⁻¹. The calculator multiplies each coefficient (except the constant) by its power to get the coefficients of p′, then evaluates them with Horner's method as well.

The principle

Written the usual way, a degree-n polynomial needs many separate powers of x. Horner's nesting reuses each partial result, so it needs only n multiplications and n additions, which is the minimum for a general polynomial and also reduces rounding error. Each intermediate value of s is itself useful: the sequence of s values gives the coefficients of the quotient when p(x) is divided by (x − x₀), the same numbers you get in synthetic division. The final value is the remainder, which equals p(x₀) by the remainder theorem.

Worked example

  1. Inputs: coefficients 2 −3 0 5, so p(x) = 2x³ − 3x² + 5, at x = 2.
  2. Horner for p: s = 2; s = 2·2 − 3 = 1; s = 1·2 + 0 = 2; s = 2·2 + 5 = 9. So p(2) = 9.
  3. Direct check: 2·8 − 3·4 + 5 = 16 − 12 + 5 = 9.
  4. Derivative coefficients: 2·3 = 6, −3·2 = −6, 0·1 = 0, so p′(x) = 6x² − 6x.
  5. Horner for p′: s = 6; s = 6·2 − 6 = 6; s = 6·2 + 0 = 12. So p′(2) = 12.
How p(x) changes with xHow p changes with x0204060801000.511.522.534Example: 9x
Each point is the calculator re-run with only “x” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
xp(x)
0.54.5
14
1.55
29
2.517.5
332
485

How to read the result

p(x) is the height of the curve at x. p′(x) is the slope of the tangent there: positive means the polynomial is increasing, negative means decreasing, and zero marks a possible maximum, minimum or flat point. In the example the curve passes through (2, 9) and rises with slope 12. If p(x) = 0, x is a root. The quotient from step 2 (2, 1, 2) also shows p(x) = (x − 2)(2x² + x + 2) + 9.

Common mistakes

Keep in mind: Results use floating-point arithmetic. For very large x or high degrees, values can overflow or lose precision; check the magnitude of the result.

Frequently asked questions

Why use Horner's method instead of computing powers?

It is faster (n multiplications instead of about 2n) and usually more accurate.

How do I get the tangent line at x?

Use y = p(x₀) + p′(x₀)(x − x₀). In the example: y = 9 + 12(x − 2) = 12x − 15.

Can it do the second derivative?

Not directly. Enter the derivative's coefficients (6 −6 0 in the example) as a new polynomial; its p′ is the second derivative.

Sources: D. E. Knuth, The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, §4.6.4 · W. G. Horner, A new method of solving numerical equations of all orders, Philosophical Transactions of the Royal Society, 1819

Checked 8 Nov 2026. Standard formulas, computed in your browser with double-precision numbers.

🧮 All math & statistics tools →🌍 Calculators by country →