GCF vs LCM: How to Find Them

The greatest common factor and least common multiple sound alike but answer opposite questions. Here are three ways to find each, and how to tell which one a problem is asking for.

• 7 min read
01

Factors and Multiples

  • Factors divide into a number exactly. The factors of 12 are 1, 2, 3, 4, 6 and 12. There are only a few, and none is bigger than 12.
  • Multiples are what you get by multiplying a number by 1, 2, 3 and so on. The multiples of 12 are 12, 24, 36, 48… and they never end.

So the GCF (greatest common factor) is the biggest factor two numbers share, and the LCM (least common multiple) is the smallest multiple they share. The GCF is also called the GCD (greatest common divisor) or HCF (highest common factor).

02

Method 1: Listing

For small numbers, just write them out. For 12 and 18:

  • Factors of 12: 1, 2, 3, 4, 6, 12
  • Factors of 18: 1, 2, 3, 6, 9, 18

The shared factors are 1, 2, 3 and 6, so the GCF is 6. For the LCM, list multiples until they meet:

  • Multiples of 12: 12, 24, 36
  • Multiples of 18: 18, 36

The LCM is 36. Tip: list the multiples of the larger number and check each one against the smaller. It takes fewer steps.

03

Method 2: Prime Factorization

Break each number into primes by dividing by 2, 3, 5, 7… until only primes are left. Then line the primes up in a table:

Number23Product
1222322 × 3
182322 × 32
GCF lowest23= 6
LCM highest2232= 36
12 = 2² × 3 and 18 = 2 × 3²
  • GCF: use only the primes in every number, each with its lowest power: 2 × 3 = 6.
  • LCM: use every prime, each with its highest power: 2² × 3² = 36.

This method shines with three or more numbers. For 24, 36 and 60:

Number235Product
24233—23 × 3
362232—22 × 32
60223522 × 3 × 5
GCF lowest223—= 12
LCM highest23325= 360
GCF(24, 36, 60) = 12 and LCM = 360
04

Method 3: Euclid's Algorithm

For big numbers, factoring is slow. Euclid's algorithm needs only division: divide the larger number by the smaller, then divide the smaller by the remainder, and repeat until the remainder is 0. The last divisor is the GCF. For 252 and 105:

GCF(252, 105) = 21

It works because any number that divides both 252 and 105 also divides the remainder 42, so the problem keeps shrinking without changing the answer.

05

The LCM Shortcut

For two numbers, the GCF and LCM are linked:

GCF × LCM=a × b

So once you have the GCF, LCM = a × b ÷ GCF. For 252 and 105: 252 × 105 ÷ 21 = 1,260. A quick way to divide first and keep the numbers small: 252 ÷ 21 = 12, then 12 × 105 = 1,260.

If the GCF is 1 (the numbers are coprime), the LCM is simply the product: LCM(15, 28) = 420. This shortcut only works two numbers at a time.

06

Which One Do I Need?

  • GCF: splitting into equal groups, as large as possible. 24 roses and 36 tulips into identical bouquets with nothing left over: GCF(24, 36) = 12 bouquets, each with 2 roses and 3 tulips.
  • LCM: waiting for things to line up again. One bus every 12 minutes, another every 18: they next leave together after LCM(12, 18) = 36 minutes.
  • LCM: matching packs. Hot dogs in 10s, buns in 8s: buy 40 of each (4 packs of hot dogs, 5 of buns).

A quick test: if the answer should be smaller than your numbers, it's a GCF problem. If it should be bigger, it's an LCM problem.

07

GCF and LCM in Fractions

  • Simplify with the GCF: divide the top and bottom by their GCF in one step. GCF(18, 24) = 6, so 18/24 = 3/4.
  • Add with the LCM: the least common denominator is the LCM of the denominators. For 1/12 + 1/18, LCM(12, 18) = 36, so 3/36 + 2/36 = 5/36.

The fraction calculator does both automatically.

08

Practice Problems

Check your answers with the GCF and LCM Calculator.

  1. GCF of 16 and 24
    Show answer8
  2. LCM of 6 and 8
    Show answer24
  3. GCF and LCM of 20 and 30
    Show answerGCF 10, LCM 60. Check: 10 × 60 = 600 = 20 × 30.
  4. GCF of 84 and 126
    Show answer42. 84 = 2² × 3 × 7 and 126 = 2 × 3² × 7, so 2 × 3 × 7.
  5. LCM of 4, 6 and 10
    Show answer60 = 2² × 3 × 5
  6. GCF of 391 and 299 (use Euclid's algorithm)
    Show answer23. 391 = 1 × 299 + 92, 299 = 3 × 92 + 23, 92 = 4 × 23 + 0.
  7. Simplify 36/48
    Show answer3/4, dividing both by GCF(36, 48) = 12
  8. Two lights blink every 9 and 15 seconds. They just blinked together. When will they next blink together?
    Show answerIn 45 seconds, the LCM of 9 and 15

Find both in one go. The GCF and LCM Calculator shows the prime factor table, the factor lists or Euclid's steps for up to 6 numbers.

Open GCF and LCM Calculator →