Enter two to four whole numbers to find the highest common factor (HCF) and lowest common multiple (LCM), with a prime factor tree for each number, index form, a Venn diagram and the full method.
For more on primes, factor trees and worked examples, read the prime numbers guide.
The HCF helps you simplify fractions and ratios, and solve sharing problems such as cutting ribbons into the longest equal pieces. The LCM helps you find a common denominator and solve “when will they next happen together?” problems, such as two buses leaving every 12 and 18 minutes, which next leave together after 36 minutes.
The prime numbers guide ends with five questions, including finding an HCF from prime factors, with worked answers.
Try the prime numbers questions →Write each number as a product of prime factors. The HCF is made of the primes the numbers share, each to the lowest power. For 60 = 2² × 3 × 5 and 72 = 2³ × 3², the HCF is 2² × 3 = 12.
Use every prime that appears in any of the numbers, each to the highest power. For 60 and 72 the LCM is 2³ × 3² × 5 = 360.
Put the prime factors both numbers share in the overlap, and the rest in each circle. Multiply the overlap to get the HCF, and multiply everything in the diagram to get the LCM.
A factor tree splits a number into a factor pair, then keeps splitting until every branch ends in a prime number. Any factor pair works: you always end up with the same primes.
Then the numbers share no prime factors. They are called co-prime, and their LCM is just the numbers multiplied together.
Yes. The highest common factor (HCF) is also called the greatest common divisor (GCD) or greatest common factor (GCF). The LCM is the lowest common multiple, sometimes called the least common multiple.