• Foundation
  • About 16 min
  • 5 practice questions

HCF and LCM by the prime factorisation method

Find the HCF and LCM of two or three numbers from their prime factorisations, and decide whether a word problem needs the HCF or the LCM.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Find the HCF of two or three numbers as the product of the smallest powers of the common primes.
  • Find the LCM as the product of the greatest powers of every prime that appears.
  • Spot whether a real-life problem asks for an HCF (greatest equal share) or an LCM (next time together).

You have found HCF and LCM in earlier classes by listing factors and multiples. That works for small numbers but becomes slow for numbers like 84 and 120. Prime factorisation, which you practised in the last lesson, turns both jobs into a quick comparison of powers.

The two rules

The HCF (highest common factor) is the largest number that divides all the given numbers. Every prime in it must divide every number, so only common primes can appear, and each with the smallest power found among the numbers. The LCM (lowest common multiple) is the smallest number that all the given numbers divide. It must contain every prime that appears in any of them, each with the greatest power found.

HCF = product of the smallest power of each COMMON prime factor. LCM = product of the greatest power of EVERY prime factor that appears.

— Prime factorisation method

HCF and LCM side by side

  • HCF
    • Uses only primes common to all numbers
    • Takes the smallest power of each
    • Divides every given number
    • Is never larger than the smallest number
  • LCM
    • Uses every prime that appears anywhere
    • Takes the greatest power of each
    • Is divisible by every given number
    • Is never smaller than the largest number

Worked example 1: HCF and LCM of 84 and 120

Working: 84 = 2² × 3 × 7 and 120 = 2³ × 3 × 5. Line up the powers of each prime in a table:

Comparing powers prime by prime
PrimePower in 84Power in 120For HCF (smaller)For LCM (greater)
2232²2³
31133
501not common5
710not common7

So HCF(84, 120) = 2² × 3 = 12, and LCM(84, 120) = 2³ × 3 × 5 × 7 = 8 × 3 × 35 = 840. Check: 84 ÷ 12 = 7 and 120 ÷ 12 = 10, both exact; 840 ÷ 84 = 10 and 840 ÷ 120 = 7, both exact.

Worked example 2: three numbers, 18, 60 and 75

Working: 18 = 2 × 3², 60 = 2² × 3 × 5, 75 = 3 × 5². The prime 2 is missing from 75 and the prime 5 is missing from 18, so the only prime common to all three is 3, with smallest power 3¹. So HCF = 3. For the LCM take every prime with its greatest power: 2², 3² and 5². LCM = 4 × 9 × 25 = 900. Check: 900 ÷ 18 = 50, 900 ÷ 60 = 15, 900 ÷ 75 = 12, all exact.

HCF or LCM? Reading word problems

Clue in the questionWhat it needsWhy
Greatest length, largest tile, maximum number in each group, equal pieces with nothing leftHCFYou want the biggest number that divides every quantity exactly
Least number, next time together, ring or flash together again, smallest amount that can be sharedLCMYou want the smallest number that every quantity divides into

Worked example 3: bells ringing together

Two temple bells ring every 18 minutes and every 24 minutes. They ring together at 9:00 a.m. When do they next ring together? Working: they ring together after a number of minutes divisible by both 18 and 24, and we want the smallest such number, so we need the LCM. 18 = 2 × 3² and 24 = 2³ × 3, so LCM = 2³ × 3² = 72 minutes. 72 minutes = 1 hour 12 minutes, so they next ring together at 10:12 a.m.

Worked example 4: cutting ribbons

A tailor has two ribbons, 90 cm and 126 cm long, and wants to cut both into pieces of the same length with nothing left over, making the pieces as long as possible. Working: the piece length must divide both 90 and 126, and we want the greatest, so we need the HCF. 90 = 2 × 3² × 5 and 126 = 2 × 3² × 7, so HCF = 2 × 3² = 18 cm. The tailor gets 90 ÷ 18 = 5 pieces and 126 ÷ 18 = 7 pieces, 12 pieces in all.

Key takeaways: write each number as a product of prime powers first. HCF: common primes, smallest powers. LCM: all primes, greatest powers. In word problems, 'greatest equal size' means HCF and 'next time together' or 'least number' means LCM. Always check by dividing.

Check your understanding

  1. 1. What is the HCF of 96 and 360?

    1. 12
    2. 48
    3. 8
    4. 24
    Show answer

    Answer: D. 96 = 2⁵ × 3 and 360 = 2³ × 3² × 5. The common primes are 2 and 3; the smallest powers are 2³ and 3¹. HCF = 8 × 3 = 24. Check: 96 ÷ 24 = 4 and 360 ÷ 24 = 15.

  2. 2. What is the LCM of 12, 15 and 21?

    1. 1260
    2. 420
    3. 210
    4. 840
    Show answer

    Answer: B. 12 = 2² × 3, 15 = 3 × 5, 21 = 3 × 7. Take every prime with its greatest power: 2² × 3 × 5 × 7 = 4 × 105 = 420. Check: 420 ÷ 12 = 35, 420 ÷ 15 = 28, 420 ÷ 21 = 20.

  3. 3. If a = 2³ × 3² × 5 and b = 2² × 3⁴ × 7, what is HCF(a, b)?

    1. 2³ × 3⁴
    2. 2² × 3² × 5 × 7
    3. 2² × 3²
    4. 2³ × 3⁴ × 5 × 7
    Show answer

    Answer: C. Only 2 and 3 are common to both. Smallest power of 2 is 2², smallest power of 3 is 3². So HCF = 2² × 3² = 36. The prime 5 is only in a and 7 is only in b, so they cannot be in the HCF; 2³ × 3⁴ × 5 × 7 is the LCM.

  4. 4. A gardener has 168 neem saplings and 252 mango saplings. She plants them in rows so that every row has the same number of plants and only one kind of tree. What is the greatest possible number of plants in each row?

    1. 84
    2. 42
    3. 28
    4. 504
    Show answer

    Answer: A. The row size must divide both 168 and 252, and we want the greatest, so find the HCF. 168 = 2³ × 3 × 7 and 252 = 2² × 3² × 7. HCF = 2² × 3 × 7 = 84. That gives 2 rows of neem and 3 rows of mango.

  5. 5. Two runners start together from the same point on a circular track. One completes a round in 12 minutes, the other in 16 minutes. After how many minutes will they first be together at the starting point again?

    1. 48
    2. 96
    3. 28
    4. 192
    Show answer

    Answer: A. They meet at the start after a time that both 12 and 16 divide, and we want the smallest such time, so find the LCM. 12 = 2² × 3, 16 = 2⁴. LCM = 2⁴ × 3 = 48 minutes.

Sign in to keep track of the lessons you finish.

Next lesson → The HCF × LCM rule for two numbers

Privacy · Terms · Refunds · Delivery