Numbers

HCF and LCM by prime factorisation, with word problems

By Mr Gan · O-Level E Maths · Updated August 2026 · 7 min read

Write both numbers as products of prime factors in index notation. For HCF (highest common factor), take every prime that appears in both lists, at its lowest power. For LCM (lowest common multiple), take every prime that appears in either list, at its highest power. Multiply out each set separately and you have both answers, without listing multiples or factors by hand.

Why students mix up HCF and LCM

Both HCF and LCM come from the same prime factorisation, which is exactly why they get confused. Once a student has 360 = 2³ × 3² × 5 and 300 = 2² × 3 × 5² written out, the actual arithmetic is easy, and the result is always a whole number since prime factors of integers are rational numbers. The mistake happens one step earlier: taking the highest power when the question wants HCF, or the lowest power when it wants LCM.

The second common failure is in word problems. Many students can compute HCF and LCM correctly on a bare numbers question, then freeze when the same skill is hidden inside a sentence about tiles, bells, or buses. Learning to translate the sentence into "this is an HCF question" or "this is an LCM question" is worth more marks than the calculation itself.

The method

Step 1

Write both numbers in index notation using prime factors

Step 2

HCF: common primes, lowest power each, then multiply

Step 3

LCM: all primes present, highest power each, then multiply

Step 4

Check: HCF × LCM = the product of the two numbers

Watch the whole method in about a minute.

Worked example 1: HCF and LCM of 360 and 300

Find the HCF and LCM of 360 and 300, giving both as products of prime factors.

Solution

1
Write 360 in prime factors: 360 = 2 × 2 × 2 × 3 × 3 × 5, so 360 = 2³ × 3² × 5.
2
Write 300 in prime factors: 300 = 2 × 2 × 3 × 5 × 5, so 300 = 2² × 3 × 5².
3
For HCF, take each common prime (2, 3, 5) at its lowest power in the two lists: 2² (lowest of 2³ and 2²), 3¹ (lowest of 3² and 3¹), 5¹ (lowest of 5¹ and 5²). So HCF = 2² × 3 × 5 = 4 × 3 × 5 = 60.
4
For LCM, take each prime that appears anywhere at its highest power: 2³ (highest of 2³ and 2²), 3² (highest of 3² and 3¹), 5² (highest of 5¹ and 5²). So LCM = 2³ × 3² × 5² = 8 × 9 × 25 = 1800.
5
Check: 60 × 1800 = 108000, and 360 × 300 = 108000. The two match, so both answers are correct.

Why the check works: for exactly two numbers, HCF × LCM always equals the product of the two original numbers. It is a fast way to catch an arithmetic slip in either calculation, but it only applies when you are working with two numbers, not three or more.

Worked example 2: a word problem, bells ringing together

Bell A rings every 18 minutes and Bell B rings every 24 minutes. Both bells ring together at 8:00 am. At what time will they next ring together?

Solution

1
"Next time together" means we need a common multiple of 18 and 24, and the smallest such time is the LCM.
2
Prime factorise: 18 = 2 × 3 × 3 = 2 × 3², and 24 = 2 × 2 × 2 × 3 = 2³ × 3.
3
LCM takes the highest power of each prime present: 2³ (highest of 2¹ and 2³) and 3² (highest of 3² and 3¹). So LCM = 2³ × 3² = 8 × 9 = 72.
4
The bells next ring together after 72 minutes, which is 1 hour 12 minutes after 8:00 am, so at 9:12 am.

A second word problem: square tiles

A rectangular floor measures 360 cm by 300 cm. It is to be covered exactly with the largest possible square tiles, with no cutting. Find the length of one tile.

1
"Largest tile that divides both lengths exactly" is an HCF signal, not an LCM one.
2
From worked example 1, HCF(360, 300) = 60.
3
The largest square tile that fits exactly along both edges has side 60 cm.

The step students get wrong

Swapping the lowest-power and highest-power rules. HCF must always come out smaller than or equal to both numbers, because it uses the lowest power of each common prime. LCM must always come out larger than or equal to both numbers, because it uses the highest power of every prime involved. If your "HCF" is bigger than one of the original numbers, or your "LCM" is smaller than one of them, you have applied the rules backwards. A quick size check like this catches the error before you submit the answer.

Reading word problems: which one do they want?

Most O-Level word problems never say "find the HCF" or "find the LCM" directly. They describe a situation and expect you to recognise which one applies.

Signal
Points to
Example phrase
Splitting/cutting exactly
HCF
"largest tile that divides exactly"
Repeating together
LCM
"next time / smallest common length"

A useful shortcut: if the question is about the largest thing that fits into or divides several quantities, it is HCF. If it is about the smallest shared amount that several repeating quantities can reach together, it is LCM. This is closely related to how a two-number ratio or product breaks down, the same prime factorisation ideas that appear in index laws and in standard form once the numbers get large.


Frequently asked questions

Does HCF × LCM = product of the numbers work for three numbers?

No. The relationship HCF × LCM = product only holds for exactly two numbers. For three or more numbers, find the HCF and LCM directly from the prime factorisations using the same lowest-power and highest-power rules, but do not expect the shortcut check to hold.

What if a number has a prime factor the other number does not have?

That prime is not included in the HCF at all, because HCF only uses primes common to both numbers. It is still included in the LCM, at whatever power it appears, because LCM uses every prime present in either number.

Can HCF and LCM be found without prime factorisation?

Yes, by listing factors or multiples directly, but this becomes slow and error-prone once the numbers are larger than about 50. Prime factorisation with index notation is the reliable method the O-Level syllabus expects, and it scales to any size of number.

What is the HCF or LCM of two numbers that share no common factors?

If two numbers share no prime factors, their HCF is 1 and their LCM is simply their product. For example, HCF(8, 9) = 1 and LCM(8, 9) = 72, since 8 = 2³ and 9 = 3² share no common prime.

— Mr Gan Math Tuition

Still mixing up HCF and LCM?

Mr. Gan works with students who want a reliable, repeatable method for every prime factorisation question, not guesswork under exam pressure.

Chat with Mr. Gan