LCM and HCF (GCD) Calculator with Steps
Find the LCM and HCF of two or more numbers and see how they were worked out.
Loading tool…
How to use the LCM and HCF Calculator
- Enter two or more whole numbers separated by commas or spaces.
- Read the HCF (GCD) and LCM in the highlighted cards.
- Check the prime factorization of each number.
- Follow the Euclid's algorithm steps for the working.
- See the common-division ladder, and for two numbers a check that HCF x LCM equals their product.
About this tool
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 exactly. For two numbers a and b, HCF x LCM = a x b.
With prime factorization, the HCF multiplies the lowest power of each prime shared by all numbers, and the LCM multiplies the highest power of every prime that appears. For 12 = 2² x 3 and 18 = 2 x 3², the HCF is 2 x 3 = 6 and the LCM is 2² x 3² = 36.
For several numbers the tool applies Euclid's algorithm pair by pair, which is fast and works for very large numbers because it uses big-integer arithmetic. LCM questions appear in school maths, in adding fractions with different denominators, and in scheduling problems where events repeat in cycles.
The common division (ladder) method divides the numbers by primes that divide at least two of them until no such prime remains; the LCM is the product of the divisors on the left and the numbers left in the last row. For two numbers the tool also shows the check HCF x LCM = a x b.
Frequently asked questions
What is the difference between LCM and HCF?
HCF is the largest number that divides all the numbers. LCM is the smallest number that is a multiple of all of them.
How do I find the LCM of three numbers?
Find the LCM of the first two, then the LCM of that result with the third. The tool does this automatically.
Is HCF the same as GCD?
Yes. HCF is the term used in Indian schools and GCD is used elsewhere.
Can I use very large numbers?
Yes, up to 30 digits each, using exact big-integer arithmetic.
Need a custom tool or website?
IDM Valley builds web apps, calculators, AI chatbots and automation for businesses. Fixed prices, code in your name.









