Skip to content

Resource · Guide or article

Horner's Method

Explains Horner's rule for evaluating a polynomial with n additions and n multiplications by nesting terms.

Reviewed

Open the original: Horner's Method (opens the original site in a new tab)

Add to a roadmap

Keep this resource with a roadmap you follow. It appears as your own extra resource; the roadmap's steps don't change and it doesn't count toward your tracked steps.

Source content: English

In mathematics, Horner's method (or Horner's scheme) is an algorithm for polynomial evaluation. With this method, it is possible to evaluate a polynomial with only n additions and n multiplications. Hence, its storage requirements are n times the number of bits of x. Horner's method can be based on the following identity: To solve the right part of the identity above, for a given x, we start by iterating through the polynomial from the inside out, accumulating each iteration result. After n iterations, with n being the order of the polynomial, the accumulated result gives us the polynomial evaluation.

PrepKit overview

PrepKit editors wrote and reviewed this overview from the source repository. It is not text from the resource itself.

Suited to
The source does not state a level
Format
Reference

What it covers

  • Evaluating 4x^4 + 2x^3 + 3x^2 + x + 3 at x = 2 directly, counted as 14 operations
  • The nested form of the same polynomial, counted as 4 additions and 4 multiplications

How to use it

PrepKit study advice, not a claim made by the source.

Write both evaluators, check they agree at x = 2, then use the Horner loop to parse a digit string in any base.

Scope and limitations

The rule itself is a Wikipedia-rendered image and the inline loop expression is loose, so treat it as pseudocode.

Access and format

Free English README on GitHub in the MIT-licensed trekhleb/javascript-algorithms repository.

Reviewed by PrepKit on Oct 2, 2026. Listing source commit: 85293e3e2b88

Evidence behind this overview
  • src/algorithms/math/horner-method/README.md

Pages that include this

Get the PrepKit newsletter

Optional. You don't need it to use PrepKit.

How we handle your email