Mathwords logoMathwords

Horner's Method — Definition, Formula & Example

Horner's method is a fast way to evaluate a polynomial at a number. You start with the leading coefficient, then repeat two moves: multiply by the input and add the next coefficient.

Let p(x)=anxn+an−1xn−1+⋯+a1x+a0p(x) = a_n x^n + a_{n-1}x^{n-1} + \cdots + a_1 x + a_0 and let x0x_0 be a number. Define bn=anb_n = a_n and bk=ak+bk+1x0b_k = a_k + b_{k+1}x_0 for k=n−1,n−2,…,0k = n-1, n-2, \ldots, 0. Then b0=p(x0)b_0 = p(x_0), and p(x)=(x−x0)(bnxn−1+bn−1xn−2+⋯+b1)+b0p(x) = (x - x_0)(b_n x^{n-1} + b_{n-1}x^{n-2} + \cdots + b_1) + b_0. The method needs exactly nn multiplications and nn additions.

Key Formula

p(x0)=(⋯((anx0+an−1)x0+an−2)x0+⋯+a1)x0+a0p(x_0) = \Big(\cdots\big((a_n x_0 + a_{n-1})x_0 + a_{n-2}\big)x_0 + \cdots + a_1\Big)x_0 + a_0
Where:
  • aka_k = The coefficient of xkx^k. Use 0 for any missing power.
  • x0x_0 = The number where you evaluate the polynomial
  • nn = The degree of the polynomial
  • p(x0)p(x_0) = The value of the polynomial at x0x_0

Worked Example

Problem: Use Horner's method to evaluate p(x)=2x3−6x2+2x−1p(x) = 2x^3 - 6x^2 + 2x - 1 at x=3x = 3.
Step 1: Rewrite the polynomial in nested form. The coefficients, from highest power to lowest, are 2,−6,2,−12, -6, 2, -1.
p(x)=((2x−6)x+2)x−1p(x) = \big((2x - 6)x + 2\big)x - 1
Step 2: Work from the inside out. Start with b3=2b_3 = 2. Multiply by 3, then add the next coefficient. Do this twice.
b2=−6+2⋅3=0,b1=2+0⋅3=2b_2 = -6 + 2 \cdot 3 = 0, \qquad b_1 = 2 + 0 \cdot 3 = 2
Step 3: Multiply by 3 one last time and add the constant term. That gives the value of the polynomial.
b0=−1+2⋅3=5b_0 = -1 + 2 \cdot 3 = 5
Answer: p(3)=5p(3) = 5. You used only 3 multiplications and 3 additions. As a bonus, the intermediate values 2,0,22, 0, 2 give the quotient: 2x3−6x2+2x−1=(x−3)(2x2+2)+52x^3 - 6x^2 + 2x - 1 = (x - 3)(2x^2 + 2) + 5.

Why It Matters

Synthetic division in precalculus is Horner's method written as a table. You use it with the Remainder Theorem and to test possible roots. In numerical analysis and computer science courses, Horner's method is the standard way software evaluates polynomials, such as the polynomial approximations behind built-in functions like sin⁡x\sin x. Fewer operations make it faster and usually reduce rounding error.

Common Mistakes

Mistake: Skipping missing powers. For x3−4x+1x^3 - 4x + 1, a student uses only the coefficients 1,−4,11, -4, 1.
Correction: Every power from xnx^n down to x0x^0 needs a slot. Write a 0 for each missing term, so the coefficients are 1,0,−4,11, 0, -4, 1. If you skip the zero, the coefficients shift into the wrong places and the result is usually wrong.

Related Terms