ExamSaathi learning library · Government exams · SSC CGL quantitative foundations; published syllabus labelled 2024 · Quantitative aptitude
HCF and LCM: common factors and common multiples
Find the HCF and LCM of numbers from their prime factors, use HCF x LCM = product for two numbers, and decide which of the two a word problem on tiles, signals or remainders needs.
Status: original pilot lesson. Teacher review is pending. It is not a complete course or official exam material.
You will learn to
- Find the HCF and LCM of two or three numbers by prime factorisation.
- Use HCF x LCM = product of the two numbers to find a missing number.
- Decide whether a word problem about equal pieces, repeating events or remainders needs the HCF or the LCM.
Before you start
A factor of a number divides it exactly, and a multiple of a number is that number times a whole number. The factors of 18 are 1, 2, 3, 6, 9 and 18, while its multiples are 18, 36, 54 and so on. The HCF (highest common factor, also called the GCD) of two numbers is the largest number that divides both. The LCM (least common multiple) is the smallest positive number that is a multiple of both. So the HCF can never be larger than the smaller number, and the LCM can never be smaller than the larger number. Keep the first few primes handy: 2, 3, 5, 7, 11, 13, 17 and 19.
Build the HCF and LCM from prime factors
Write each number as a product of prime powers and line the primes up. For 72 = 2^3 x 3^2 and 120 = 2^3 x 3 x 5, the HCF uses only the primes found in both numbers, each with its smaller power: 2^3 x 3 = 24. The LCM uses every prime found in either number, each with its larger power: 2^3 x 3^2 x 5 = 360. Two quick checks catch most slips. The HCF must divide each number, and 72 / 24 = 3 and 120 / 24 = 5. The LCM must be a multiple of each, and 360 / 72 = 5 and 360 / 120 = 3.
HCF x LCM = product, for two numbers
For any two numbers, HCF x LCM = first number x second number. With 72 and 120: 24 x 360 = 8,640 and 72 x 120 = 8,640. The reason is that, prime by prime, the smaller power goes into the HCF and the larger power into the LCM, so HCF x LCM contains exactly the same prime powers as the product of the two numbers. The rule gives a missing number: other number = HCF x LCM / known number. It also settles ratio questions. If two numbers have HCF h, they can be written as h x a and h x b, where a and b have no common factor, and then their LCM is h x a x b. Two co-prime numbers such as 8 and 15 have HCF 1, so their LCM is their product, 120.
Word problems: HCF or LCM?
Ask whether the answer must divide the given quantities or be a multiple of them. Cutting, packing or measuring into the largest equal parts needs the HCF: the largest square tiles that cover a floor 360 cm by 480 cm without any cutting have side HCF(360, 480) = 120 cm. Events that repeat and line up again, such as bells, buses or signals, need the LCM. Remainder questions need care. A remainder is always less than its divisor, so a common remainder r must be smaller than every divisor. A number that leaves remainder r on division by each divisor is r more than a common multiple, so apart from r itself such numbers are LCM + r, 2 x LCM + r, and so on. The number r on its own always works trivially, so these questions really ask for a number larger than the divisors, and the least one is LCM + r. For the greatest number that divides several numbers and leaves the same remainder r each time, work the other way: subtract r from each number first and take the HCF of the results; the answer must be larger than r.
Common mistakes
Taking the larger powers for the HCF, or only the shared primes for the LCM, swaps the two rules. The product rule is for two numbers only: for 4, 6 and 10 the HCF is 2 and the LCM is 60, so HCF x LCM = 120, while 4 x 6 x 10 = 240. Put lengths in one unit before finding an HCF, so 1.2 m and 90 cm become 120 cm and 90 cm. Remainder questions come in two kinds, so handle r the right way: for the least number larger than the divisors that leaves remainder r, add r to the LCM (r itself is a trivial answer that questions exclude); for the greatest divisor that leaves remainder r, subtract r from each given number before taking the HCF. Finally, test the size of each answer: an HCF above the smaller number, or an LCM below the larger number, means something went wrong.
A short HCF and LCM routine
First, split every number into prime powers. Second, for the HCF, multiply the primes common to all the numbers, each with its smallest power. Third, for the LCM, multiply every prime that appears, each with its largest power. Fourth, when there are just two numbers, confirm that HCF x LCM equals their product. Last, in a word problem, decide whether the answer should divide the quantities (HCF) or be a multiple of them (LCM), and deal with any remainder r: add it after finding the LCM when the question wants a number larger than the divisors, or take it away from each number before finding the HCF.
Worked examples
Find the HCF and LCM of 84 and 126 by prime factorisation, and check them with the product rule.
- 84 = 2^2 x 3 x 7 and 126 = 2 x 3^2 x 7.
- HCF: the shared primes are 2, 3 and 7. With their smaller powers, HCF = 2 x 3 x 7 = 42.
- LCM: take each prime with its larger power: LCM = 2^2 x 3^2 x 7 = 252.
- Check: 42 x 252 = 10,584 and 84 x 126 = 10,584.
Answer: The HCF is 42 and the LCM is 252.
The HCF of two numbers is 12 and their LCM is 360. One of the numbers is 72. Find the other number.
- For two numbers, HCF x LCM = product of the numbers, so 12 x 360 = 72 x (other number).
- 12 x 360 = 4,320, so the other number is 4,320 / 72 = 60.
- Check: 72 = 2^3 x 3^2 and 60 = 2^2 x 3 x 5, so the HCF is 2^2 x 3 = 12 and the LCM is 2^3 x 3^2 x 5 = 360.
Answer: The other number is 60.
Two ribbons are 1.44 m and 2.16 m long. They are to be cut into pieces of equal length with nothing left over. Find the greatest possible length of each piece and the total number of pieces.
- Use one unit: the ribbons are 144 cm and 216 cm long.
- 144 = 2^4 x 3^2 and 216 = 2^3 x 3^3, so the HCF is 2^3 x 3^2 = 72 cm.
- Pieces: 144 / 72 = 2 and 216 / 72 = 3, so there are 2 + 3 = 5 pieces in all.
Answer: Each piece is 72 cm long, and there are 5 pieces.
Practice checks
- The HCF of 2^3 x 3^2 x 5 and 2^2 x 3^3 x 7 is:
- Two numbers have HCF 16 and LCM 480. One of them is 96. The other number is:
- Three traffic signals turn green every 40, 60 and 90 seconds. They turn green together at 9:00 a.m. After how long do they next turn green together?
- The smallest three-digit number that leaves remainder 3 when divided by each of 8, 12 and 20 is:
- Two numbers are in the ratio 3 : 5 and their HCF is 14. Their LCM is:
Sources checked
- SSC CGL Scheme and Syllabus, labelled 2024 — Tier-I Quantitative Aptitude and Tier-II Mathematical Abilities (Computation of whole numbers; relationships between numbers); not verified as the full 2026-cycle syllabus
- OpenStax, Contemporary Mathematics — Section 3.1, the greatest common divisor from the smallest powers of the shared primes and the least common multiple from the largest powers of all the primes; mathematical relationships only