LCM and HCF Calculator
Prime factorisation
- 12 = 2^2 × 3
- 18 = 2 × 3^2
Check: 12 × 18 = 216 = HCF × LCM = 6 × 36
What are LCM and HCF?
The HCF (highest common factor, also called GCD) is the largest number that divides all the given numbers exactly. The LCM (least common multiple) is the smallest number that all of them divide into. This calculator finds both for two or more numbers and shows each number's prime factorisation, as you'd write it in an exam.
Prime factorisation method
Write each number as a product of primes. For the HCF, take only the primes that appear in every number, each with its smallest power. For the LCM, take every prime that appears, each with its largest power. For two numbers, HCF × LCM = the product of the numbers.
Tips for exams
- The HCF can never be larger than the smallest number, and the LCM can never be smaller than the largest.
- If two numbers are co-prime (HCF = 1), their LCM is simply their product.
- The HCF × LCM shortcut works for two numbers only, not for three or more.
- Use the HCF to simplify fractions (divide top and bottom by it), and the LCM to add fractions with different denominators.
Worked example
- Find the HCF and LCM of 12 and 18
- 12 = 2² × 3 and 18 = 2 × 3²
- HCF = 2 × 3 = 6 (lowest powers of the common primes)
- LCM = 2² × 3² = 36 (highest powers of all primes)
- Check: 12 × 18 = 216 = 6 × 36
HCF and LCM of common pairs
Quick reference for numbers that often come up in exercises.
| Numbers | HCF | LCM |
|---|---|---|
| 12, 18 | 6 | 36 |
| 8, 12 | 4 | 24 |
| 9, 12 | 3 | 36 |
| 14, 21 | 7 | 42 |
| 15, 25 | 5 | 75 |
| 16, 24 | 8 | 48 |
| 24, 36 | 12 | 72 |
For each pair, HCF × LCM equals the product of the two numbers.