HCF & LCM Calculator
Find the Highest Common Factor and Least Common Multiple of any numbers, with steps. Free, no sign-up.
How it works
- HCF is found with the Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until the remainder is 0.
- LCM uses the identity LCM(a, b) = (a × b) ÷ HCF(a, b), extended pairwise for more numbers.
- Example: HCF(12, 18) = 6, so LCM(12, 18) = (12 × 18) ÷ 6 = 36.