GCF and LCM

Prime factorisation answers both questions at once: shared factors give the GCF, and everything needed gives the LCM.

Two gears mesh together: one with 16 teeth, one with 12. Mark one tooth on each with paint, and line the marks up.

Now turn them. How far must they go before both marks are back at the top together?

two gears, one marked tooth each 16 12 16 teeth 12 teeth both marks start at the top turn them — after how many teeth are both marks back on top?

The big gear returns every 16 teeth. The small one every 12. You need a number that both reach.

24? The small one is home, the big one is not. 48 works: 16 × 3 and 12 × 4.

That is the lowest common multiple — the first moment two repeating cycles agree.

The GCF is the opposite question: not when do they next agree, but what is the largest piece they share. Here 4 — you could split both gears into groups of four teeth, and no larger group works for both.

A factor tree for 36 giving 2 times 2 times 3 times 3 36 4 9 2233 36 = 2² · 3² GCF: shared primes, lowest powers LCM: every prime, highest powers

Factors go down, multiples go up

Factors of 12: 1, 2, 3, 4, 6, 12 — a short, finite list, all no bigger than 12.

Multiples of 12: 12, 24, 36, 48, … — an endless list, all no smaller than 12.

Mixing these two up is the root of most GCF/LCM errors, so fix the direction first: GCF is small, LCM is large.

Prime factorisation does both jobs

Break each number into primes with a factor tree. 24 = 23 · 3 and 36 = 22 · 32.

GCF: take each shared prime to the lowest power. Here 22 · 3 = 12.

LCM: take every prime that appears, to the highest power. Here 23 · 32 = 72.

Lowest for GCF, highest for LCM

Both use the same factorisations. The GCF keeps only what the numbers share; the LCM keeps everything either one needs.

A useful check

GCF × LCM = a × b, always.

For 24 and 36: 12 × 72 = 864, and 24 × 36 = 864 ✓

This catches mistakes instantly, and it lets you find one if you already know the other.

Which one does the word problem want?

GCF when you are splitting things into equal groups, or cutting into equal pieces as large as possible. The answer is smaller than the numbers.

LCM when two cycles start together and you want the next time they line up, or when you are buying packs of different sizes to match. The answer is larger.

Ask: bigger or smaller?

Before computing anything, decide whether the answer should be bigger or smaller than the numbers in the problem. That single question picks GCF or LCM correctly almost every time.

Relatively prime numbers

If two numbers share no factor but 1, their GCF is 1 and they are called relatively prime — like 8 and 15.

In that case the LCM is simply their product: 8 × 15 = 120.

Worked examples

Both at once

Find the GCF and LCM of 18 and 30.

  1. Factorise: 18 = 2 · 32 and 30 = 2 · 3 · 5 Prime factorisation makes both answers readable.
  2. GCF: shared primes at lowest powers — 2 · 3 = 6 Both have one 2 and at least one 3; neither shares a 5.
  3. LCM: every prime at highest power — 2 · 32 · 5 = 90 Take 32 from 18 and the 5 from 30.
  4. Check: 6 × 90 = 540 = 18 × 30 ✓ The product rule confirms both.

GCF = 6, LCM = 90.

Which one?

Two lighthouses flash every 12 and 18 seconds. They flash together now. When do they next flash together?

  1. Ask: bigger or smaller than 12 and 18? The next shared flash is later, so bigger — that means LCM.
  2. 12 = 22 · 3, 18 = 2 · 32 Factorise both.
  3. LCM = 22 · 32 = 36 Highest power of each prime.

In 36 seconds.

The other kind

A florist has 48 roses and 36 tulips, and wants identical bunches using every flower. What is the largest number of bunches?

  1. Ask: bigger or smaller? The number of bunches must divide both counts, so smaller — GCF.
  2. 48 = 24 · 3 and 36 = 22 · 32 Factorise.
  3. GCF = 22 · 3 = 12 Lowest power of each shared prime.
  4. Each bunch: 4 roses and 3 tulips. 48 ÷ 12 and 36 ÷ 12 — worth stating, as it is often the follow-up question.

12 bunches.

Words to know

Factor
A number that divides evenly into another.
Multiple
The result of multiplying by a whole number: 12 is a multiple of 4.
GCF
Greatest common factor — the largest number dividing both.
LCM
Least common multiple — the smallest number both divide into.
Prime factorisation
A number written as a product of primes: 60 = 22 · 3 · 5.

Mistakes to watch for

Swapping them. The GCF can never be larger than the smaller number, and the LCM can never be smaller than the larger one. That one sanity check catches the swap immediately.

Using the highest powers for the GCF. It is the other way round: GCF takes the lowest power of each shared prime, LCM the highest. The GCF must divide both, so it cannot take more than either has.

Forgetting a prime that appears in only one number when building the LCM. The LCM must be a multiple of both, so every prime in either number has to be in it.

Reaching for the formula when the question is about timing or sharing. "When do they coincide?" is LCM; "what is the biggest equal group?" is GCF. Decide which story you are in first.

The bicycle world calls a gear pair with a common factor a non-hunting gear — the same teeth meet each other every cycle, so wear concentrates on those teeth.

Engineers deliberately choose tooth counts with no common factor, often a prime, so every tooth eventually meets every other and wear spreads evenly.

Some cicadas emerge every 13 or 17 years. Both are prime, which makes it hard for any predator with a shorter cycle to sync up with them.

Browse all courses