Home / Mathematics Tools / LCM and HCF Calculator

LCM and HCF Calculator

Find the Least Common Multiple and Highest Common Factor of multiple numbers.

LCM (Least Common Multiple)
--
Smallest number divisible by all inputs
HCF / GCD (Highest Common Factor)
--
Largest number dividing all inputs
Prime Factorization
Enter numbers to see steps...
Input
LCM
Magnitude Comparison

What are LCM and HCF?

LCM (Least Common Multiple) is the smallest positive integer that is divisible by two or more numbers. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that both 4 and 6 divide into without a remainder.

HCF (Highest Common Factor), also known as GCD (Greatest Common Divisor), is the largest positive integer that divides two or more numbers without leaving a remainder. For example, the HCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 evenly.

Methods to Calculate LCM and HCF

There are three primary methods used to find these values manually. This calculator uses the Prime Factorization method internally, which is the most robust for multiple numbers.

The Relationship Between LCM and HCF

For any two positive numbers, there is a fundamental relationship between their LCM, HCF, and the numbers themselves.

First Number × Second Number = LCM × HCF

a × b = LCM(a, b) × HCF(a, b)

This formula is very useful. If you know three of the values, you can easily find the fourth. For instance, if the LCM of two numbers is 48 and their HCF is 4, and one of the numbers is 12, you can find the other number:
Other Number = (LCM × HCF) / First Number = (48 × 4) / 12 = 16.

Frequently Asked Questions

Can the LCM be smaller than the numbers?

No, the LCM is always greater than or equal to the largest number in the set. The only exception is if one of the numbers is zero (though LCM is usually defined for positive integers).

What is the HCF of prime numbers?

If you have two distinct prime numbers, their HCF will always be 1, because the only factor they share is 1. For example, the HCF of 7 and 13 is 1.

How is this used in real life?

LCM is used to find when events will happen at the same time (e.g., two buses arriving at the station simultaneously). HCF is used to simplify fractions or divide things into the largest possible equal groups (e.g., cutting a cloth into equal strips).