LCM & HCF Calculator

Find the LCM and HCF of 2 to 5 numbers. Shows step-by-step working using prime factorization.

Enter at least 2 numbers and click Calculate.

LCM and HCF explained

LCM (Least Common Multiple) is the smallest number divisible by all given numbers. HCF (Highest Common Factor), also called GCD, is the largest number that divides all given numbers evenly.

LCM Formula
LCM(a,b) = a × b ÷ GCD(a,b)
For multiple numbers: chain the formula. LCM(a,b,c) = LCM(LCM(a,b), c).
HCF / GCD Formula
Euclidean: GCD(a,b) = GCD(b, a mod b)
Repeat until remainder is 0. The last non-zero remainder is the GCD. Then chain for multiple numbers.

Frequently asked questions

What is the difference between LCM and HCF?

LCM (Least Common Multiple) is the smallest number that is a multiple of all given numbers. HCF (Highest Common Factor) is the largest number that divides all given numbers without a remainder. LCM ≥ the largest number; HCF ≤ the smallest number.

When do we use LCM in real life?

LCM is used to find common denominators when adding fractions, scheduling repeating events (e.g., two buses that depart every 12 and 18 minutes will next meet at LCM(12,18)=36 minutes), and synchronizing cycles in engineering.

When do we use HCF in real life?

HCF is used to simplify fractions (divide numerator and denominator by HCF), to find the largest tile that can cover a floor without cutting, and to split items into equal groups.

Is HCF the same as GCD?

Yes. HCF (Highest Common Factor) and GCD (Greatest Common Divisor) are two names for the same concept — the largest positive integer that divides all given numbers exactly.

What is the relationship between LCM and HCF?

For two numbers a and b: LCM(a,b) × HCF(a,b) = a × b. This means if you know three of these four values, you can find the fourth. This relationship holds only for two numbers.