HCF & LCM Calculator
Find the Highest Common Factor and Lowest Common Multiple of any two numbers — using prime factorisation, step by step.
HCF & LCM Calculator
Step-by-step solution
Enter two numbers and press Calculate
HCF & LCM Calculator Explained
Core concepts, classroom applications, and plain-English explanations for all audiences.
Two problems, two answers
You have 24 apples and 36 oranges — you want to make identical bags with no fruit left over. How many bags? The HCF of 24 and 36 is 12, so 12 bags, each with 2 apples and 3 oranges. Different problem: Bus A runs every 8 minutes, Bus B every 12 minutes — both just left. When will they next leave together? LCM(8,12) = 24 minutes.
Worked example
"Find the HCF and LCM of 12 and 18."
12 = 2² × 3
18 = 2 × 3²
HCF: use minimum powers of shared primes
= 2¹ × 3¹ = 6
LCM: use maximum powers of all primes
= 2² × 3² = 36
Check: 6 × 36 = 216 = 12 × 18 ✓
HCF × LCM always equals the product of the two original numbers.
Common mistake to avoid
- ✗ Mixing up HCF and LCM: HCF is always ≤ the smaller number (it divides into both); LCM is always ≥ the larger number (both divide into it). If your HCF is bigger than both numbers, or your LCM is smaller than both, something's wrong.
What are HCF and LCM?
The **Highest Common Factor (HCF)**, sometimes called the Greatest Common Divisor (GCD), is the largest number that divides exactly into two or more numbers without leaving a remainder. Think of it as the biggest number that is a factor of both.
The **Lowest Common Multiple (LCM)** is the smallest positive number that is a multiple of two or more numbers. In other words, it's the first number that appears in the times tables of both numbers.
How to find HCF and LCM using Prime Factorisation
Prime Factorise Both Numbers
Break down each number into its prime factors. A prime factor is a prime number that divides the original number exactly. Write these as a product of primes, often using powers (e.g., 12 = 2² × 3).
Find the HCF
To find the HCF, identify all the prime factors that are *common* to both numbers. For each common prime factor, choose the one with the *lowest* power. Multiply these chosen prime factors together to get the HCF.
Find the LCM
To find the LCM, identify *all* the prime factors that appear in either number (common and unique). For each prime factor, choose the one with the *highest* power. Multiply these chosen prime factors together to get the LCM. You can also verify your answer using the rule: HCF × LCM = Number 1 × Number 2.
Common mistakes to avoid
- Finding the HCF of 12 and 18 is 36:This is a common mistake where students confuse the HCF with the LCM. 36 is a multiple, not a factor, of 12 and 18. The HCF of 12 and 18 is 6. (Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. The highest common one is 6).
- The prime factors of 24 are 2, 3, 4:4 is not a prime number. Prime factorisation must only use prime numbers. The prime factors of 24 are 2 × 2 × 2 × 3, or 2³ × 3.
- When finding the HCF of 2³ × 3 and 2² × 5, I use 2³:For the HCF, you must use the lowest power of the common prime factors. 2³ is the highest power of 2. For the HCF, you should use 2² (as 2² is common to both and is the lowest power). The HCF would be 2² = 4.
- When finding the LCM of 2³ × 3 and 2² × 5, I use 2² × 3 × 5:For the LCM, you must use the highest power of all prime factors (common and unique). You used the lowest power for 2. For the LCM, you should use 2³ (the highest power of 2), 3 (highest power of 3), and 5 (highest power of 5). The LCM would be 2³ × 3 × 5 = 8 × 3 × 5 = 120.