LCM & HCF Calculator

Find the Least Common Multiple and Highest Common Factor with step-by-step prime factorization.

Quick presets:
HCF (GCD)
6
Highest Common Factor
LCM
36
Least Common Multiple

Prime Factorization of Each Number

12 = 2² × 3
18 = 2 × 3²
Prime factor powers for each number
Number23
12 3
18 2

Understanding LCM & HCF

What is HCF (GCD)?

The Highest Common Factor is the largest number that divides all given numbers exactly. Use it to simplify fractions or split items into the largest equal groups.

What is LCM?

The Least Common Multiple is the smallest number that is a multiple of all given numbers. Essential for adding fractions with different denominators.

When events repeat together

If a bus arrives every 12 minutes and another every 18 minutes, LCM(12, 18) = 36 means they arrive together every 36 minutes.

Key identity (two numbers)

For any two numbers a and b:

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