LCM & HCF / GCD Calculator
Find the lowest common multiple (LCM) and highest common factor (HCF/GCD) of multiple numbers with prime factorisation shown.
lcm-hcf-calculator.tool
Examples
LCM vs HCF — What Is the Difference
The LCM (Lowest Common Multiple) is the smallest number that all the given numbers divide into exactly. The HCF (Highest Common Factor, also called GCD — Greatest Common Divisor) is the largest number that divides all the given numbers exactly. LCM is used when adding fractions (to find a common denominator). HCF is used when simplifying fractions or distributing items into equal groups.
Finding LCM and HCF Using Prime Factorisation
Break each number into its prime factors. For the HCF, take the lowest power of each common prime factor. For the LCM, take the highest power of every prime factor that appears in any of the numbers.
Frequently Asked Questions
Prime factors: 4 = 2², 6 = 2 × 3, 8 = 2³. LCM takes the highest power of each prime: 2³ × 3 = 24. The LCM of 4, 6 and 8 is 24. You can verify: 24/4 = 6, 24/6 = 4, 24/8 = 3 — all exact divisions.
Prime factors: 12 = 2² × 3, 18 = 2 × 3². HCF takes the lowest power of each common prime: 2¹ × 3¹ = 6. The HCF of 12 and 18 is 6. Verify: 12/6 = 2, 18/6 = 3 — both exact.
Two numbers are coprime (or relatively prime) when their HCF is 1 — they share no common factors other than 1. For example, 8 and 9 are coprime (8 = 2³, 9 = 3² — no shared primes). Coprime numbers are important in cryptography and modular arithmetic.
Common practical uses: scheduling (two buses depart every 6 and 8 minutes — they will next be together at the LCM of 6 and 8 = 24 minutes). Adding fractions (you need the LCM of the denominators as your common denominator). Arranging items into equal rows where multiple groupings must work simultaneously.
Yes — GCD (Greatest Common Divisor) and HCF (Highest Common Factor) are exactly the same concept with different names. GCD is more common in computer science and mathematical literature. HCF is more common in British school mathematics. Both describe the largest number that divides all the given numbers without a remainder.