LCM & HCF Step-by-Step
Enter 2 to 5 numbers and see factor trees, prime powers, the division (ladder) method, Euclid’s algorithm and a Venn diagram — every step of the working.
Your numbers
2 to 5 whole numbers, each from 2 to 10,00,000. Results update as you type.
Factor trees & prime factorisation
Keep splitting until every branch ends in a prime (the coloured circles).
Exponent form
Step-by-step methods
Four ways to reach the same answer — use the one your textbook teaches.
Check the answer
Quick ways to be sure the LCM and HCF are right.
Word problems: LCM or HCF?
Read the question for clue words, then decide which one you need.
Use HCF when you split or share
You are breaking things into the largest equal groups or pieces with nothing left over. The answer is smaller than or equal to the numbers.
Use LCM when things repeat and meet
Events repeat on different cycles and you want the first time they happen together. The answer is bigger than or equal to the numbers.
Solved examples — tap “Load numbers” to see the full working above
LCM and HCF, explained simply
Both come from the same prime building blocks — the only difference is whether you take the lowest or the highest power.
Enter your numbers
Type 2 to 5 whole numbers, or tap an example to fill them in.
Read the factor trees
Each tree breaks a number into primes. The exponent form is written below the trees.
Pick a method
Switch between prime powers, the ladder (division) method, Euclid’s algorithm and the Venn diagram.
Check and print
Verify with LCM × HCF, then copy or print the full working for your notebook.
HCF — Highest Common Factor
The biggest number that divides every given number exactly. Also called GCD (Greatest Common Divisor).
HCF = product of common primes, lowest powers
12 = 2² × 3 and 18 = 2 × 3² → HCF = 2 × 3 = 6.
LCM — Lowest Common Multiple
The smallest number that every given number divides into exactly.
LCM = product of all primes, highest powers
12 = 2² × 3 and 18 = 2 × 3² → LCM = 2² × 3² = 36.
Euclid’s division algorithm
Divide the larger number by the smaller: a = b × q + r. Replace (a, b) with (b, r) and repeat. When the remainder becomes 0, the last divisor is the HCF.
126 = 84 × 1 + 42 → 84 = 42 × 2 + 0 → HCF = 42.
A handy relationship
For any two numbers a and b:
LCM(a, b) × HCF(a, b) = a × b
So if you know one, you can find the other: LCM(84, 126) = 84 × 126 ÷ 42 = 252. This does not work for three or more numbers.