HCF and LCM: Methods, Remainder Problems and Solved Examples

The HCF (highest common factor) is the largest number that divides all the given numbers, and the LCM (lowest common multiple) is the smallest number that all of them divide. Exam questions rarely ask for them directly; instead they hide them inside bells ringing together, tiles fitting a floor or numbers leaving fixed remainders. Learn to spot whether a question wants the biggest common divider (HCF) or the first common meeting point (LCM) and the rest is routine.

Asked in: GAT, HAT, NTS, ISSB, PPSC, FPSC, SSC CGL, IBPS PO, CAT

Prime factorisation method

Break every number into prime powers. The HCF takes each prime that appears in all the numbers, with its lowest power. The LCM takes every prime that appears anywhere, with its highest power.

Example: 48 = 2⁴ × 3 and 180 = 2² × 3² × 5. HCF = 2² × 3 = 12. LCM = 2⁴ × 3² × 5 = 720.

Division (Euclid) method for HCF

For large numbers, divide the larger by the smaller, then divide the previous divisor by the remainder, and continue until the remainder is 0. The last divisor is the HCF.

HCF(1081, 1457): 1457 = 1 × 1081 + 376; 1081 = 2 × 376 + 329; 376 = 1 × 329 + 47; 329 = 7 × 47 + 0. So the HCF is 47.

A quick shortcut: the HCF of two numbers also divides their difference, so it can never be bigger than the difference.

The product rule

For any two numbers, HCF × LCM = product of the numbers. This lets you find a missing number, the LCM or the HCF when the other three facts are given.

If two numbers are in the ratio a : b (in lowest terms) and their HCF is h, the numbers are ah and bh, and their LCM is abh.

The product rule does not work for three or more numbers.

HCF and LCM of fractions

Write the fractions in lowest terms first. Then work with numerators and denominators separately.

The HCF of fractions must divide every fraction a whole number of times, and the LCM must be a whole-number multiple of every fraction, which is why the rules flip between numerator and denominator.

Remainder problems

Greatest number that divides x, y, z leaving the same remainder: the HCF of the differences (y − x), (z − y), (z − x).

Greatest number that divides x and y leaving remainders r1 and r2: HCF(x − r1, y − r2).

Least number that leaves the same remainder r when divided by a, b, c: LCM(a, b, c) + r.

Least number that leaves remainders a − k, b − k, c − k (each remainder k short of its divisor): LCM(a, b, c) − k.

Word problems: which one to use

Use the LCM for things that repeat and meet again: bells or traffic lights changing together, runners meeting at the start, the smallest box that a set of lengths fits exactly.

Use the HCF for cutting or sharing into the largest equal pieces: the largest tile for a floor, the biggest container that measures several quantities exactly, the most rows with equal students.

Solved examples

  1. Find the HCF and LCM of 84, 120 and 180.
    1. Factorise: 84 = 2² × 3 × 7, 120 = 2³ × 3 × 5, 180 = 2² × 3² × 5.
    2. HCF: primes common to all three are 2 and 3. Lowest powers give 2² × 3 = 12.
    3. LCM: all primes with highest powers give 2³ × 3² × 5 × 7.
    4. LCM = 8 × 9 × 5 × 7 = 2520.
    Answer: HCF = 12, LCM = 2520
  2. The HCF of two numbers is 12 and their LCM is 360. If one number is 72, find the other.
    1. Use HCF × LCM = product of the two numbers.
    2. 12 × 360 = 72 × other number, so 4320 = 72 × other.
    3. Other number = 4320 ÷ 72 = 60.
    4. Check: HCF(72, 60) = 12 and LCM(72, 60) = 360.
    Answer: 60
  3. Four bells ring at intervals of 6, 8, 12 and 15 minutes. They ring together at 9:00 am. When will they next ring together?
    1. They ring together again after LCM(6, 8, 12, 15) minutes.
    2. 6 = 2 × 3, 8 = 2³, 12 = 2² × 3, 15 = 3 × 5, so LCM = 2³ × 3 × 5 = 120 minutes.
    3. 120 minutes = 2 hours.
    4. 9:00 am + 2 hours = 11:00 am.
    Answer: 11:00 am
  4. Find the greatest number that divides 1085 and 1466 leaving remainders 4 and 9 respectively.
    1. Remove the remainders: the number divides 1085 − 4 = 1081 and 1466 − 9 = 1457 exactly.
    2. Find HCF(1081, 1457) by division: 1457 − 1081 = 376; 1081 = 2 × 376 + 329; 376 − 329 = 47; 329 = 7 × 47.
    3. So HCF = 47 (indeed 1081 = 47 × 23 and 1457 = 47 × 31).
    4. It is larger than both remainders, so it is valid.
    Answer: 47
  5. A courtyard 18 m 72 cm long and 13 m 20 cm wide is to be paved with identical square tiles. Find the least number of tiles needed.
    1. Fewest tiles means the largest tile, whose side must divide both lengths: HCF(1872 cm, 1320 cm).
    2. 1872 = 2⁴ × 3² × 13 and 1320 = 2³ × 3 × 5 × 11, so HCF = 2³ × 3 = 24 cm.
    3. Tiles along the length = 1872 ÷ 24 = 78; along the width = 1320 ÷ 24 = 55.
    4. Number of tiles = 78 × 55 = 4290.
    Answer: 4290 tiles of side 24 cm
  6. Find the least number which leaves remainder 7 when divided by 12, 18 or 30, but is exactly divisible by 13.
    1. LCM(12, 18, 30) = 2² × 3² × 5 = 180, so the number is 180k + 7.
    2. 180 leaves remainder 11 on division by 13, so we need 11k + 7 to be a multiple of 13.
    3. Try k = 1, 2, 3, …: the remainders of 11k + 7 are 5, 3, 1, 12, 10, 8, 6, 4, 2, 0. The first zero is at k = 10.
    4. Number = 180 × 10 + 7 = 1807 = 13 × 139.
    Answer: 1807

Exam shortcuts

Common mistakes

Practice MCQs

  1. What is the HCF of 36 and 84?
    A) 6
    B) 12
    C) 18
    D) 252
    Answer: B) 12 — 36 = 2² × 3² and 84 = 2² × 3 × 7. Take the lowest power of each common prime: 2² × 3 = 12.
  2. What is the LCM of 16, 24 and 40?
    A) 120
    B) 480
    C) 960
    D) 240
    Answer: D) 240 — 16 = 2⁴, 24 = 2³ × 3, 40 = 2³ × 5. Take the highest power of every prime: 2⁴ × 3 × 5 = 240.
  3. The product of two numbers is 2160 and their HCF is 12. What is their LCM?
    A) 180
    B) 160
    C) 216
    D) 240
    Answer: A) 180 — For two numbers, HCF × LCM = product. So LCM = 2160 ÷ 12 = 180. (For example, 36 and 60.)
  4. Two numbers are in the ratio 4 : 5 and their HCF is 6. What is their LCM?
    A) 60
    B) 180
    C) 120
    D) 240
    Answer: C) 120 — The numbers are 4 × 6 = 24 and 5 × 6 = 30. Since 4 and 5 are co-prime, LCM = 6 × 4 × 5 = 120.
  5. Three runners complete one round of a circular track in 36, 48 and 54 seconds. They start together from the same point. After how long will they next be together at the starting point?
    A) 6 min 48 s
    B) 7 min 12 s
    C) 9 min
    D) 4 min 32 s
    Answer: B) 7 min 12 s — They meet after LCM(36, 48, 54) seconds. 36 = 2² × 3², 48 = 2⁴ × 3, 54 = 2 × 3³, so LCM = 2⁴ × 3³ = 432 s = 7 minutes 12 seconds.
  6. What is the least number which leaves remainder 5 when divided by 8, 12 or 18?
    A) 77
    B) 72
    C) 67
    D) 149
    Answer: A) 77 — LCM(8, 12, 18) = 72 is divisible by all three, so 72 + 5 = 77 leaves remainder 5 in each case.
  7. What is the HCF of 2/3, 8/9 and 16/81?
    A) 16/3
    B) 2/3
    C) 1/81
    D) 2/81
    Answer: D) 2/81 — HCF of fractions = HCF of numerators ÷ LCM of denominators = HCF(2, 8, 16) ÷ LCM(3, 9, 81) = 2/81.
  8. What is the LCM of 3/4, 5/6 and 9/10?
    A) 45/4
    B) 15/2
    C) 45/2
    D) 9/2
    Answer: C) 45/2 — LCM of fractions = LCM of numerators ÷ HCF of denominators = LCM(3, 5, 9) ÷ HCF(4, 6, 10) = 45 ÷ 2 = 45/2.
  9. What is the greatest number that divides 379, 564 and 823 leaving the same remainder in each case?
    A) 37
    B) 17
    C) 29
    D) 41
    Answer: A) 37 — If the remainders are equal, the number divides the differences: 564 − 379 = 185, 823 − 564 = 259, 823 − 379 = 444. HCF(185, 259, 444) = 37. (The common remainder is 9.)
  10. What is the least number which, when divided by 9, 12 and 15, leaves remainders 5, 8 and 11 respectively?
    A) 184
    B) 175
    C) 356
    D) 176
    Answer: D) 176 — In each case divisor − remainder = 4, so the number is 4 short of a common multiple. Answer = LCM(9, 12, 15) − 4 = 180 − 4 = 176.
  11. What is the greatest 4-digit number exactly divisible by 12, 18, 21 and 28?
    A) 9576
    B) 9828
    C) 9996
    D) 9864
    Answer: B) 9828 — LCM(12, 18, 21, 28) = 2² × 3² × 7 = 252. 9999 ÷ 252 leaves remainder 171, so the answer is 9999 − 171 = 9828 (= 252 × 39).
  12. The HCF of two numbers is 23 and the other two factors of their LCM are 13 and 14. What is the larger number?
    A) 299
    B) 345
    C) 322
    D) 276
    Answer: C) 322 — The numbers are 23 × 13 = 299 and 23 × 14 = 322 (13 and 14 are co-prime, so the HCF stays 23). The larger is 322.
  13. The sum of two numbers is 216 and their HCF is 27. How many such pairs of numbers are possible?
    A) 2
    B) 1
    C) 3
    D) 4
    Answer: A) 2 — Let the numbers be 27a and 27b with a and b co-prime. Then a + b = 8. Co-prime pairs: (1, 7) and (3, 5); (2, 6) and (4, 4) are not co-prime. So there are 2 pairs: 27 and 189, 81 and 135.
  14. What is the least perfect square that is divisible by each of 15, 20 and 24?
    A) 900
    B) 1600
    C) 14400
    D) 3600
    Answer: D) 3600 — LCM(15, 20, 24) = 120 = 2³ × 3 × 5. To make every exponent even, multiply by 2 × 3 × 5 = 30: 2⁴ × 3² × 5² = 3600 = 60².
  15. What is the least number which leaves remainder 3 when divided by 4, 6, 9 or 15, but is exactly divisible by 7?
    A) 543
    B) 903
    C) 723
    D) 363
    Answer: B) 903 — The number has the form 180k + 3, since LCM(4, 6, 9, 15) = 180. Try k = 1, 2, 3, …: 183, 363, 543, 723 are not divisible by 7, but 903 = 7 × 129 is. So the answer is 903.

Questions

What is the difference between HCF and LCM?

The HCF is the largest number that divides all the given numbers exactly. The LCM is the smallest number that all of them divide exactly. For 12 and 18, the HCF is 6 and the LCM is 36.

Is HCF the same as GCD?

Yes. HCF (highest common factor), GCD (greatest common divisor) and GCF (greatest common factor) are three names for the same thing.

When do I use HCF and when LCM in word problems?

Use the LCM when events repeat and you want the next time they coincide, such as bells or runners. Use the HCF when you cut or share things into the largest equal parts, such as tiles, ropes or containers.

Does HCF × LCM equal the product for three numbers?

No. The rule holds only for two numbers. For 2, 4 and 8 the HCF is 2 and the LCM is 8, giving 16, but the product is 64.