GCD and LCM Calculator
Find the greatest common divisor (GCD, also called HCF) and least common multiple (LCM) of two or more whole numbers.
Numbers
GCD (greatest common divisor):
LCM (least common multiple):
How it works
GCD is found pairwise using the Euclidean algorithm: gcd(a, b) = gcd(b, a mod b) until b is 0. LCM is derived from GCD: lcm(a, b) = (a × b) ÷ gcd(a, b), applied across the whole list.