Greatest common factor
The GCF is the largest number that divides all the given numbers with no remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF). You need it to simplify fractions.
Write each number as a product of primes and multiply the primes they share.
24 = 2 × 2 × 2 × 3
36 = 2 × 2 × 3 × 3
Both contain 2, 2 and 3, so GCF(24, 36) = 2 × 2 × 3 = 12.
Least common multiple
The LCM is the smallest number that all the given numbers divide into. When you add fractions, the LCM of the denominators is the least common denominator.
Start with the prime factors of the largest number and add any factors it is missing from the others. 36 = 2 × 2 × 3 × 3 is missing one more 2 from 24, so LCM(24, 36) = 36 × 2 = 72.
For small numbers, listing multiples is often quicker: the multiples of 6 are 6, 12, 18, 24, and the first one that 8 divides is 24, so LCM(6, 8) = 24.
A shortcut for two numbers
LCM(a, b) = a × b ÷ GCF(a, b)
For 24 and 36: 864 ÷ 12 = 72. This also works as a check, since GCF × LCM always equals the product of the two numbers.
Large numbers: the Euclidean algorithm
Factoring big numbers is slow. Instead, divide the larger number by the smaller one, then divide the smaller one by the remainder, and keep going until the remainder is 0. The last divisor is the GCF. The calculator switches to this method on its own when the numbers are large.
Relatively prime numbers
When the GCF is 1, as with 9 and 14, the numbers are called relatively prime (or coprime). Their LCM is simply their product, 126.