LCM & GCD Calculator

Find the least common multiple and greatest common divisor of any list of numbers.

Formula

gcd via the Euclidean algorithm  ·  lcm(a,b) = |ab| / gcd(a,b)

Tips

  • GCD and HCF are the same thing under different names — highest common factor is the more common term in UK schools.
  • Use the GCD to simplify fractions and ratios, and the LCM to find a common denominator or to work out when repeating events coincide.
  • For two numbers, gcd × lcm always equals their product. That identity does not extend to three or more.

Frequently asked questions

What does coprime mean?

Two numbers are coprime when their only common divisor is 1. They need not be prime themselves — 8 and 9 are coprime despite both being composite.

Related tools