HCF and LCM Calculator
Works out the HCF and LCM of several numbers at once, with the prime factor working shown for every value.
Working
Euclidean algorithm:
HCF(24, 36) = 12
Prime factorisation:
24 = 2^3 × 3
36 = 2^2 × 3^2
Check: HCF × LCM = 12 × 72 = 864 = 24 × 36
HCF and LCM Calculator: how it works
Euclid’s method finds the highest common factor in just a few steps, and the lowest common multiple follows straight from it.
The Euclidean algorithm
Keep replacing the bigger number with the remainder you get when you divide it by the smaller one. When the remainder becomes zero, the last non-zero number is the HCF.
Worked example · HCF of 24 and 36
Given
- a = 36, b = 24
Working
- 136 ÷ 24 = 1 remainder 12
- 224 ÷ 12 = 2 remainder 0
- 3Last non-zero remainder is 12
HCF(24, 36) = 12
LCM from HCF
LCM(a, b) = (a × b) ÷ HCF(a, b)
- Valid for two numbers only
Worked example · LCM of 24 and 36
Given
- HCF = 12
Working
- 1LCM = (24 × 36) ÷ 12
- 2= 864 ÷ 12
LCM(24, 36) = 72
Prime factorisation
Another way: write each number as a product of primes. For the HCF take the lowest power of each prime they share, and for the LCM take the highest power of every prime that appears.
Worked example · Same numbers by factorisation
Given
- 24 = 2³ × 3
- 36 = 2² × 3²
Working
- 1HCF = 2² × 3¹ = 12 (lowest powers)
- 2LCM = 2³ × 3² = 72 (highest powers)
Same answers, different route
Where these appear
- HCF: splitting things into the biggest equal groups, and simplifying fractions.
- LCM: working out when repeating events happen together, and adding fractions with different denominators.
- Both come up all the time in SSC, banking and railway aptitude tests.
Frequently asked questions
More in Academics & Competitive Exams
KIIT CGPA & Percentage Calculator
For KIIT students: combine semester SGPAs into a CGPA and convert it into a percentage the way KIIT does.
Saveetha CGPA & Percentage Calculator
Work out SGPA, CGPA and the matching percentage on the grading scale used by Saveetha (SIMATS / SEC).
Anna University CGPA & Percentage Calculator
For Anna University students on Regulation 2017 or 2021: get SGPA, CGPA and percentage from your grades and credits.
VIT CGPA & GPA Calculator
Add your VIT courses with grades and credits to see a semester GPA or a running CGPA, plus total credits earned.
Attendance Percentage & Bunk Calculator
See your current attendance, the classes needed to reach 75%, 80% or 85%, and the number you can still miss.
UPSC Mark & CSAT Calculator
Get your UPSC Prelims GS and CSAT scores with the one-third negative marking applied to every wrong answer.