HCF and LCM: Prime Factors, the Product Rule and Lining Numbers Up
Learn to find the HCF and LCM of numbers by prime factorisation, use the rule that HCF times LCM equals the product of two numbers, count how many pairs share a given HCF and product, handle numbers given as a ratio, find the smallest number that leaves a fixed remainder, and work out when repeating events next happen together, through six worked examples and a revision table.
By the end of this lesson you will be able to find the HCF and LCM of numbers by breaking them into primes, use the rule that links the HCF, the LCM and the product of two numbers, count how many pairs of numbers share a given HCF and product, work with numbers given as a ratio, find the smallest number that leaves a fixed remainder, and work out when bells, lights or trains next meet again.

Already confident? Skip to practice: LCM and HCF quiz
Before this: you should be comfortable multiplying and dividing whole numbers and splitting a number into its factors (12 = 2 × 2 × 3). If factors and multiples feel shaky, read the Number System lesson first.
The two ideas behind the whole topic
Every question in this topic rests on two words.
- The HCF (Highest Common Factor, also called the GCD) of some numbers is the biggest number that divides all of them exactly. It can never be larger than the smallest number in the set.
- The LCM (Lowest Common Multiple) of some numbers is the smallest number that all of them divide into exactly. It can never be smaller than the largest number in the set.
So HCF is the small one and LCM is the big one: HCF ≤ every number ≤ LCM. If your "HCF" comes out bigger than one of the numbers, you have found the LCM by mistake, and the other way round.
The one tool that finds both is prime factorisation — writing each number as a product of primes:
- for the HCF, multiply the lowest power of each prime the numbers share;
- for the LCM, multiply the highest power of every prime that appears in any of them.
Everything below is built on those two rules and one more fact that holds for two numbers only: HCF × LCM = the two numbers multiplied together.
Worked examples
Read each example slowly. The first two show every step. In the later ones, some steps are left for you, with the answer just below.
Example 1: HCF and LCM by prime factorisation
Question: Find the HCF and the LCM of 90 and 150.
- Break each number into primes. 90 = 2 × 3 × 3 × 5, which is . And 150 = 2 × 3 × 5 × 5, which is .
- For the HCF, take the lowest power of each prime they both have. Both have one 2, both have at least one 3, both have at least one 5: so HCF = 2 × 3 × 5 = 30.
- For the LCM, take the highest power of every prime that appears: the 2, the bigger power of 3 (which is ), and the bigger power of 5 (which is ): so LCM = 2 × 9 × 25 = 450.
- Check both ways round. The HCF should divide each number: 90 ÷ 30 = 3 and 150 ÷ 30 = 5, both whole. The LCM should be divisible by each number: 450 ÷ 90 = 5 and 450 ÷ 150 = 3, both whole. Good.
Your turn: find the HCF and the LCM of 42 and 70. (Hint: 42 = 2 × 3 × 7 and 70 = 2 × 5 × 7.)
Check: the shared primes are 2 and 7, so HCF = 2 × 7 = 14. Every prime that appears is 2, 3, 5 and 7, so LCM = 2 × 3 × 5 × 7 = 210.
The principle: split every number into primes. The HCF multiplies the lowest power of each shared prime; the LCM multiplies the highest power of every prime. This one method works for two numbers or ten.
Example 2: The product rule for two numbers
For two numbers there is a shortcut that saves all the factorising:
HCF × LCM = the first number × the second number.
Question: The HCF of two numbers is 14 and their LCM is 84. One of the numbers is 28. What is the other?
- Multiply the HCF and the LCM to get the product of the two numbers: 14 × 84 = 1,176.
- That 1,176 is the two numbers multiplied together. You already know one of them is 28, so divide it out: other number = 1,176 ÷ 28 = 42.
- Check: HCF of 28 and 42 is 14 (both are 14 × something, 14 × 2 and 14 × 3), and their LCM is 84 — exactly what the question gave.
Warning: this rule is true for two numbers only. For three or more numbers, HCF × LCM is not their product, so go back to prime factorisation.
Your turn: the product of two numbers is 3,024 and one of them is 56. What is the other?
Check: the product is the two numbers multiplied, so the other number is 3,024 ÷ 56 = 54.
The principle: for exactly two numbers, HCF × LCM equals their product. Knowing any three of {HCF, LCM, one number, other number} lets you find the fourth.
Example 3: How many pairs share a given HCF and product
This is the hardest type, so take it one line at a time.
Question: The HCF of two numbers is 4 and their product is 1,920. How many different pairs of such numbers are possible?
- If the HCF is 4, every common factor is already inside that 4. So write the two numbers as 4a and 4b, where a and b are coprime — they share no factor except 1.
- Their product is 4a × 4b = 16 × a × b. Set that equal to 1,920: 16 × a × b = 1,920, so a × b = 1,920 ÷ 16 = 120.
- Now count the coprime pairs (a, b) whose product is 120. Break 120 into prime blocks: 120 = . There are three blocks — the 8 (that is ), the 3 and the 5. A whole block cannot be split between a and b without the two sharing a factor, so each block goes entirely to one side or the other.
- Three blocks, each choosing a side, gives arrangements; but (a, b) and (b, a) are the same pair, so halve it: 8 ÷ 2 = 4 pairs.
- There they are: a × b = 120 splits as 1 × 120, 3 × 40, 5 × 24 and 8 × 15. Multiply each part by 4 to get the real numbers — (4, 480), (12, 160), (20, 96) and (32, 60). Four pairs.
Your turn: the HCF of two numbers is 6 and their product is 7,560. How many pairs are possible? (Hint: 7,560 ÷ 36 = 210, and 210 = 2 × 3 × 5 × 7.)
Check: write the numbers as 6a and 6b; then 36 × a × b = 7,560, so a × b = 210 = 2 × 3 × 5 × 7 — four prime blocks. That gives arrangements, halved to 8 pairs.
The principle: write the numbers as d × a and d × b with a and b coprime, so a × b = product ÷ d². Count the distinct prime blocks of that value: k blocks give pairs.
Example 4: Numbers given as a ratio
Question: Two numbers are in the ratio 3 : 4 and their LCM is 84. Find the two numbers and their sum.
- The ratio 3 : 4 is already in lowest terms (3 and 4 share no factor), so the numbers are 3x and 4x for some whole number x. That x is their HCF.
- For 3x and 4x the LCM is 3 × 4 × x = 12x, because 3 and 4 bring no shared prime. Set 12x = 84, so x = 84 ÷ 12 = 7.
- The numbers are 3 × 7 = 21 and 4 × 7 = 28. Their sum is 21 + 28 = 49.
- Check: the LCM of 21 and 28 is 84 (21 = 3 × 7, 28 = , highest powers give = 84). Good.
Your turn: two numbers are in the ratio 4 : 5 and their LCM is 100. Find the two numbers and their sum.
Check: the numbers are 4x and 5x, and their LCM is 4 × 5 × x = 20x. So 20x = 100, x = 5, and the numbers are 20 and 25. Their sum is 45.
The principle: for a ratio a : b already in lowest terms, the numbers are ax and bx. Then x is the HCF and a × b × x is the LCM, so one given value fixes x and the rest follow.
Example 5: The smallest number that leaves a fixed remainder
Question: Find the smallest number that leaves a remainder of 5 when divided by 8, 10 and 12.
- A number that leaves remainder 5 by every divisor is exactly 5 more than a number that divides by all of them with nothing left over.
- The smallest number that 8, 10 and 12 all divide exactly is their LCM. In primes, 8 = , 10 = 2 × 5, 12 = , so the LCM takes the highest powers: = 120.
- Add the remainder: smallest number = 120 + 5 = 125.
- Check: 125 ÷ 8 = 15 remainder 5; 125 ÷ 10 = 12 remainder 5; 125 ÷ 12 = 10 remainder 5. The same 5 every time.
Your turn: find the smallest number that leaves a remainder of 4 when divided by 5, 6 and 9.
Check: the LCM of 5, 6 and 9 is 90 (5, 2 × 3 and give ). Add the remainder: 90 + 4 = 94.
The principle: the smallest number that leaves the same remainder r by several divisors is (LCM of the divisors) + r. With r = 0 it is just the LCM — the smallest number they all divide exactly.
Example 6: When do repeating events happen together again?
Question: Three bells ring at intervals of 10, 16 and 24 minutes. They ring together at 7 am. When will they next ring together?
- Each bell rings at multiples of its own interval. They all sound together only at a time that is a multiple of 10, of 16 and of 24 at once — and the next such time is the smallest one, the LCM.
- In primes, 10 = 2 × 5, 16 = , 24 = . The LCM takes the highest power of each: = 240 minutes.
- 240 minutes is 240 ÷ 60 = 4 hours. So the next time together is 7 am + 4 hours = 11 am.
- Check: 240 ÷ 10 = 24, 240 ÷ 16 = 15, 240 ÷ 24 = 10 — all whole, so every bell completes a whole number of rings in those 240 minutes.
Your turn: two lights flash every 10 seconds and every 15 seconds. They flash together now. After how many seconds will they next flash together?
Check: they meet again after the LCM of 10 and 15. Since 10 = 2 × 5 and 15 = 3 × 5, the LCM is 2 × 3 × 5 = 30 seconds.
The principle: things that repeat every a, b, c units all line up again after the LCM of a, b and c. Turn that gap into hours or minutes, then add it to the starting time.
Common mistakes
- Swapping HCF and LCM. The HCF is never bigger than the smallest number; the LCM is never smaller than the largest. If your answer breaks that, you have the two the wrong way round.
- Using the product rule for three numbers. HCF × LCM = the product only for two numbers. For three or more, factorise instead.
- Adding the remainder to the HCF. The smallest number that divides by all of them is the LCM, not the HCF. The remainder is added to the LCM.
- Forgetting the numbers must be coprime. In the ratio method and the pair-counting method, the leftover parts (the a and b) must share no factor; otherwise some common factor still belongs in the HCF.
- Mixing up lowest and highest powers. For the HCF take the lowest power of each shared prime; for the LCM take the highest power of every prime. Writing them down in two columns keeps them apart.
- Counting ordered pairs. In the "how many pairs" question, (a, b) and (b, a) are the same pair — halve the number of arrangements, and divide the product by the HCF squared, not by the HCF.
HCF and LCM: the rules in one place
In this table "the numbers" are the whole numbers in the question, and a "prime block" is one prime raised to its power, like (which is 8).
| To find | Rule | Worked numbers |
|---|---|---|
| HCF by primes | multiply the lowest power of each shared prime | 90, 150: 2 × 3 × 5 = 30 |
| LCM by primes | multiply the highest power of every prime that appears | 90, 150: = 450 |
| HCF vs LCM size | HCF ≤ every number ≤ LCM | HCF 30 and LCM 450 straddle 90 and 150 |
| Product rule (two numbers) | HCF × LCM = the two numbers multiplied | 14 × 84 = 1,176, and 28 × 42 = 1,176 |
| The other number | (HCF × LCM) ÷ one number | 1,176 ÷ 28 = 42 |
| Numbers in a ratio a : b | numbers are ax and bx; HCF = x, LCM = a × b × x | 3 : 4, LCM 84: 12x = 84, x = 7 → 21, 28 |
| How many pairs (HCF d, product P) | ab = P ÷ d²; k prime blocks give pairs | d = 4, P = 1,920: ab = 120, 3 blocks → 4 pairs |
| Smallest number exactly divisible | the LCM itself | 8, 10, 12 → LCM 120 |
| Smallest number leaving remainder r | (LCM of the divisors) + r | 8, 10, 12, remainder 5: 120 + 5 = 125 |
| When repeating events coincide again | LCM of the intervals | 10, 16, 24 min → 240 min = 4 hours |
Next
HCF and LCM feed straight into the rest of arithmetic. Adding or comparing fractions needs the LCM of the denominators, and reducing a fraction to its simplest form needs the HCF of the top and bottom; reducing a ratio to lowest terms uses the HCF in the same way, which you will meet again in Ratio and Proportion. For your next full topic with practice ready, go on to Fractions, Decimals and Percentages, which puts the LCM and HCF to work on fractions: try the Fractions and Decimals quiz.
Ready to test this lesson? Take the LCM and HCF quiz
How this was made: Drafted with AI assistance; every formula and worked figure recomputed independently; spot-checked by the editor on 26 October 2026.