Highest common factor

The highest common factor (hcf) of a set of integers is the largest integer which is a factor of all of them (in other words, which divides all of them).

For example, the hcf of \(18\), \(21\) and \(30\) is \(3\).

The highest common factor is also known as the greatest common divisor (gcd).

A highest common factor of a set of polynomials is a polynomial of greatest possible degree which divides all of them.


  • An hcf of \(3x^2\) and \(2x\) is \(x\); note that \(-x\) is also an hcf of these.
  • An hcf of \(x^2+2x\) and \(x^2+3x+2\) is \(x+2\).

If the polynomials have integer coefficients, we usually require the hcf to also have the greatest possible coefficients (in magnitude), so an hcf of \(6x^2\) and \(4xy\) is \(2x\); \(-2x\) is also an hcf, but \(x\) is not an hcf as the coefficient \(1\) is smaller than \(2\).