HCF and LCM Calculator
By Sagar Kumar · Updated 23 October 2026
Find the HCF (GCD) and LCM of two or more numbers, with prime factorisation steps you can copy into your notebook.
How to find HCF and LCM
Step 1: write each number as a product of prime factors.
Step 2 (HCF): multiply the common primes, each with its smallest power.
Step 3 (LCM): multiply all primes, each with its highest power.
36 = 2² × 3²
60 = 2² × 3 × 5
HCF = 2² × 3 = 12
LCM = 2³ × 3² × 5 = 360
For two numbers you can also use HCF × LCM = product of the numbers.
Common examples
| Numbers | HCF | LCM |
|---|---|---|
| 12, 18 | 6 | 36 |
| 8, 12 | 4 | 24 |
| 15, 25 | 5 | 75 |
| 24, 36, 60 | 12 | 360 |
| 7, 13 | 1 | 91 |
हिंदी में समझें
HCF को हिंदी में महत्तम समापवर्तक (म.स.) और LCM को लघुत्तम समापवर्त्य (ल.स.) कहते हैं। 12 और 18 का म.स. = 6 और ल.स. = 36। दो संख्याओं के लिए म.स. × ल.स. = दोनों संख्याओं का गुणनफल।
Frequently asked questions
What is the HCF of 12 and 18?
The HCF (highest common factor) of 12 and 18 is 6, and the LCM (lowest common multiple) is 36.
How do I find HCF by prime factorisation?
Write each number as a product of primes and multiply the primes they share, using the smallest power of each. 24 = 2³ × 3 and 36 = 2² × 3², so HCF = 2² × 3 = 12.
How do I find LCM by prime factorisation?
Take every prime that appears in any number, using its highest power. For 24 and 36: 2³ × 3² = 72.
What is the relation between HCF and LCM?
For two numbers, HCF × LCM = product of the numbers. For 12 and 18: 6 × 36 = 216 = 12 × 18. This rule works only for two numbers, not three or more.
Are HCF and GCD the same?
Yes. HCF (highest common factor), GCD (greatest common divisor) and GCF (greatest common factor) all mean the same thing. LCM is also called the least common multiple.