LCM & HCF Calculator

Find

Enter your numbers and press Calculate. The answer and the working behind it will show up here.

LCM — Least Common Multiple—
HCF — Highest Common Factor—
Working out

LCM and HCF in plain words

The HCF (highest common factor, also called GCD) is the biggest number that divides all the numbers you give. The LCM (lowest common multiple) is the smallest number that every one of them divides into.

Take 12, 18 and 24. Written in primes: 12 = 2² × 3, 18 = 2 × 3², 24 = 2³ × 3. For the HCF take the lowest power of each prime they all share: 2 × 3 = 6. For the LCM take the highest power of every prime you see: 2³ × 3² = 72.

Four ways to find them

  • Listing. Write out multiples (for LCM) or factors (for HCF) until they meet. Fine for small numbers.
  • Prime factorisation. The method above. It is what most school books teach.
  • Division ladder. Keep dividing the whole row by a prime until only 1s are left. Multiply every divisor for the LCM, and only the divisors that went into all numbers for the HCF.
  • Euclid’s algorithm. Fast for big numbers. HCF of 48 and 18: 48 = 2 × 18 + 12, then 18 = 1 × 12 + 6, then 12 = 2 × 6 + 0. The last divisor, 6, is the HCF.

Where you actually use them

  • Adding fractions with different bottoms: the LCM of the denominators is the easiest common denominator.
  • Simplifying fractions: divide top and bottom by their HCF.
  • Cutting a 48 cm and an 18 cm rope into equal pieces with no waste: the longest piece is the HCF, 6 cm.
  • Two buses leave together, one every 12 minutes and one every 18. They leave together again after the LCM, 36 minutes.