How it works
The GCD is the largest whole number that divides evenly into both numbers, found using the Euclidean algorithm.
The LCM is the smallest whole number that both numbers divide evenly into, found from the GCD: (first number ÷ GCD) × second number.
Formula: LCM = (first number ÷ GCD) × second number
Examples
Two numbers with common factors
12 and 18 have a GCD of 6 and an LCM of 36.
Two coprime numbers
4 and 7 share no common factor other than 1, so their GCD is 1 and their LCM is their product, 28.
Things to keep in mind
- Both numbers must be positive whole numbers.
- "HCF" (highest common factor) is another name for the same thing as GCD — the two terms are used in different regions for an identical calculation.