The greatest common factor (GCF) of two numbers is the largest number that divides both. The least common multiple (LCM) is the smallest number that both divide into. GCF is used to simplify fractions, and LCM to find common denominators.
Try it with your own problem ↓Find the GCF and LCM of 12 and 18.
GCF(12, 18) = 6 and LCM(12, 18) = 36.
Open the free The Factor Tree with this example already filled in. It shows every step, and you can type over it with your own numbers.
Work it out: gcf 12 18Opens The Factor Tree with this exampleOr try these
Write both prime factorizations and multiply the primes they share, the smaller power of each. 12 = 2² × 3 and 18 = 2 × 3², so the GCF is 2 × 3 = 6.
Multiply every prime that appears in either one, using the larger power: 2² × 3² = 36.
1. Numbers whose GCF is 1 are called relatively prime.
Show The Steps is free, with no accounts or ads, and everything is worked out in your own browser. Start at the home page.