Skip to content
General

LCM and HCF Calculator

Find the Least Common Multiple and Highest Common Factor (GCD) of up to 6 numbers. Step-by-step prime factorization and division methods shown.

Enter 2–6 positive integers

Enter numbers and click Calculate

How is this calculated?
HCF (Euclidean algorithm):
  gcd(a, b) = gcd(b, a mod b) until b = 0
LCM:
  lcm(a, b) = |a × b| / gcd(a, b)
For multiple numbers:
  lcm(a, b, c) = lcm(lcm(a, b), c)
  gcd(a, b, c) = gcd(gcd(a, b), c)
Relationship: LCM(a,b) × HCF(a,b) = a × b

FAQ

Frequently asked questions about LCM and HCF

What is the difference between LCM and HCF?
LCM (Least Common Multiple) is the smallest number that all given numbers divide into evenly. HCF/GCD (Highest Common Factor / Greatest Common Divisor) is the largest number that divides all given numbers evenly.
How do I find LCM using prime factorization?
Find the prime factorization of each number, then take the highest power of each prime that appears. Multiply these together. For 12=2²×3 and 18=2×3², LCM = 2²×3² = 36.
How do I find HCF using the division method?
Divide the larger number by the smaller, then divide the divisor by the remainder. Repeat until remainder is 0. The last non-zero remainder is the HCF. This is the Euclidean algorithm.
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 HCF, you can find LCM and vice versa.
How do I use LCM to find common denominators?
The LCD (Least Common Denominator) of fractions is the LCM of their denominators. For 1/4 + 1/6, LCM(4,6)=12, so convert to 3/12 + 2/12 = 5/12.
Is this LCM and HCF calculator free?
Yes, completely free with no sign-up required. All calculations run in your browser — your data stays on your device and is never sent to any server.

Related calculators