GCF vs. LCM: What's the Difference and When to Use Each
The greatest common factor and least common multiple are easy to confuse. Learn what each one means, how they're related, and which one a word problem needs.
Students often learn the greatest common factor and the least common multiple in the same week, and then mix them up for years. A simple way to keep them apart: the GCF is never bigger than the smallest number, and the LCM is never smaller than the largest number.
Definitions
- Greatest common factor (GCF): the largest number that divides into all the given numbers. For 12 and 18 it's 6.
- Least common multiple (LCM): the smallest number that all the given numbers divide into. For 12 and 18 it's 36.
Factors go into a number; multiples come out of it. Factors of 12: 1, 2, 3, 4, 6, 12. Multiples of 12: 12, 24, 36, 48…
Finding both with prime factorization
Write each number as a product of primes:
- 12 = 2² × 3
- 18 = 2 × 3²
For the GCF, take each prime the numbers share, with the lowest power: 2¹ × 3¹ = 6.
For the LCM, take every prime that appears, with the highest power: 2² × 3² = 36.
The GCF calculator shows both results and the factorizations for any list of whole numbers.
The shortcut that links them
For two numbers, GCF × LCM = the product of the numbers. With 12 and 18: 6 × 36 = 216 = 12 × 18. So once you know the GCF, the LCM is just the product divided by it. (This shortcut does not work directly for three or more numbers.)
Which one does the problem need?
| Question sounds like… | Use | Why |
|---|---|---|
| Split into the largest equal groups with nothing left over | GCF | You're dividing things up |
| Cut into the longest equal pieces | GCF | Same idea, with lengths |
| When will two events happen together again? | LCM | You're counting forward in steps |
| Smallest number of packs so the counts match | LCM | Building up to a common total |
| Simplify a fraction | GCF | Divide top and bottom |
| Add fractions with different denominators | LCM | Find the least common denominator |
Two quick examples
GCF: A florist has 36 roses and 24 tulips and wants identical bouquets using every flower. The most bouquets possible is GCF(36, 24) = 12, each with 3 roses and 2 tulips.
LCM: Hot dogs come in packs of 10 and buns in packs of 8. The smallest number of each so nothing is left over is LCM(10, 8) = 40: 4 packs of hot dogs and 5 packs of buns.
Special cases
- If one number divides the other, the GCF is the smaller number and the LCM is the larger. GCF(6, 18) = 6, LCM(6, 18) = 18.
- If the numbers share no factor except 1 (they are coprime), the GCF is 1 and the LCM is their product. GCF(8, 15) = 1, LCM(8, 15) = 120.
Keep practicing
More worked examples are in GCF word problems, and the fastest method for large numbers is explained in the Euclidean algorithm.
Further reading from official sources
- Factors and multiples (Grade 6 math) – Khan Academy