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.

A student writing formulas on a chalkboard
Photo by Vitaly Gariev on Unsplash
Try the GCF Calculator – Enter two or more whole numbers to get their greatest common factor, least common multiple, prime factorizations and the Euclidean algorithm worked out.

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…UseWhy
Split into the largest equal groups with nothing left overGCFYou're dividing things up
Cut into the longest equal piecesGCFSame idea, with lengths
When will two events happen together again?LCMYou're counting forward in steps
Smallest number of packs so the counts matchLCMBuilding up to a common total
Simplify a fractionGCFDivide top and bottom
Add fractions with different denominatorsLCMFind 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

More gcf guides

A man standing in front of a chalkboard covered in equationsThe Euclidean Algorithm: The Fastest Way to Find the GCFHow Euclid's division method finds the greatest common factor of large numbers in a few steps, why it works, and how to extend it to three or more numbers.3 min readA young boy writing complex formulas on a chalkboardPrime Factorization: Factor Trees, Division Ladders and Divisibility RulesBreak any number into prime factors using factor trees or the ladder method, with divisibility shortcuts and examples of using primes to find the GCF and LCM.3 min readA person writing with a pencilSimplifying Fractions with the GCF (Including Mixed Numbers and Algebra)Reduce any fraction to lowest terms in one step using the greatest common factor, with examples for improper fractions, mixed numbers and algebraic fractions.2 min read