HCF / GCD and LCM - Definition, Formula, Full Form, Examples
Last Updated : 23 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report
The full form of HCF/GCD is the Highest Common Factor/Greatest Common Divisor(Both terms mean the same thing), while the full form of LCM is the Least Common Multiple. HCF is the largest number that divides two or more numbers without leaving a remainder, whereas LCM is the smallest multiple that is divisible by two or more numbers.
HCF is the Highest Common Factor, which can be calculated for two or more numbers. It is denoted by HCF(a, b), where "a" and "b" are the numbers for which we want to find the highest common factor.
LCM can be seen in two or more numbers. It is denoted by LCM(a, b), where "a" and "b" are the numbers for which we want to find the least common multiple.
HCF or GCD Definition
The HCF or GCD of two numbers is defined as the largest number that can exactly divide both numbers.
HCF is the Highest Common Factor that divides all the given numbers exactly. Therefore, HCF is also known as the Greatest Common Divisor orGCD.
Divisors of 6 = 1, 2, 3, 6 Divisors of 18 = 1, 2, 3, 6, 9, 18
HCF = greatest common divisor HCF = 6
LCM Definition
The LCM of two or more numbers is defined as the smallest number that can be divided by all of the numbers. LCM is the least number that is a common multiple of all the given numbers.
Multiple of 6 = 6, 12, 18, 24, 30, … Multiple of 18 = 18, 36, 54, … LCM = first common multiple (least common multiple) LCM = 18
HCF / GCD and LCM Formula
To find the HCF and LCM formulas, let's assume that the numbers given are a and b. The relationship between HCF and LCM states that the product of a and b is equal to the product of HCF and LCM.
(LCM of two numbers) × (HCF of two numbers) = Product of two numbers
These are the most famous methods used to calculate HCF and LCM :
Division method
Prime factorization method
Let's learn about all these methods in detail.
HCF by Division Method
The easiest way to understand how to find HCF by the Division Method is by going back to simple division.
The following are the steps for better understanding this method :
Step 1: Take the smaller number as the divisor and the larger number as a dividend. Step 2: Perform division. If you get the remainder as 0, then the divisor is the HCF of the given numbers. Step 3: If you get a remainder other than 0 then take the remainder as the new divisor and the previous divisor as the new dividend. Step 4: Perform steps 2 and step 3 until you get the remainder as 0.
Example: Find out the HCF of 36 and 48.
Solution:
Using the division method for HCF
Hence, HCF = 12
LCM by Division Method
The following steps can be followed to find the Least Common Multiple by the Division Method:
Step 1: Check whether the given numbers are divisible by 2 or not. Step 2: If the number is divisible by 2 then divide and again check for the same. If the numbers are not divisible by 2 then check 3, and so on. Step 3: Perform step 2 until you get 1 in the end.
Example: Find out the LCM of 36 and 48.
Solution:
Using the division method for LCM
LCM of 36and 48
Hence, LCM = 2 × 2 × 2 × 2 × 3 × 3 = 144
HCF by Prime Factorization
Finding HCF by Prime Factorization can be done by following the given steps:
Step 1: Find out the prime factors of the given number. Step 2: Check the occurrence of a particular factor. Find out the common factors and choose them in HCF. Step 3: Multiply the occurrence of common factors. And this will be the HCF Of the given numbers.
Example: Find out the HCF of 18 and 90.
Solution:
Prime factors of 18 = 2 × 3 × 3 Prime factors of 90 = 2 × 3 × 3 × 5
Now, HCF = 2 × 3 × 3 = 18
LCM by Prime Factorization
Finding LCM by Prime Factorization is done by following the given steps:
Step 1: Find out the prime factors of the given number.
Step 2: Check the occurrence of a particular factor. If a particular factor has occurred multiple times in the given number, then choose the maximum occurrence of the factor in LCM. It can also be found out by checking the powers of the factors. The factor having greater power will be chosen between the numbers.
Step 3: Multiply all the maximum occurrences of a particular factor. And this will be the LCM Of the given numbers.
Example: Find out the LCM of 18 and 90.
Solution:
Prime factors of 18 = 2 × 3 × 3 Prime factors of 90 = 2 × 3 × 3 × 5
Now, LCM = 2 × 3 × 3 × 5 = 90
Alternate method:
Prime factors of 18 = 2 × 3 × 3 Prime factors of 18 = 21 × 32
Prime factors of 90 = 2 × 3 × 3 × 5 Prime factors of 90 = 21 × 32 × 51
From above you can see that, LCM (15, 70) × HCF(15, 70) = Product of two numbers
Hence Verified.
Practice Questions on HCF ( or GCD ) and LCM
Question 1: Find the HCF of 36 and 60.
Question 2: What is the LCM of 12, 18, and 24?
Question 3: Two numbers have an HCF of 8 and an LCM of 96. If one of the numbers is 32, find the other number.
Question 4: Calculate the HCF and LCM of 45 and 75.
Question 5: The product of two numbers is 2400, and their HCF is 20. Find their LCM.
Question 6: Find the HCF of 72, 108, and 144.
Question 7: Two cyclists are riding on circular tracks. One completes a round in 12 minutes, and the other in 18 minutes. After how many minutes will both cyclists meet at the starting point if they start together? (Hint: Find the LCM of their times.)
Question 8: Three friends have ropes of lengths 24 meters, 36 meters, and 48 meters. They want to cut their ropes into equally smaller pieces without any leftovers. What is the maximum possible length of each smaller piece they can cut? (Hint: Find the HCF of the rope lengths.)
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.