Education Tools
LCM and HCF Calculator
LCM and HCF Calculator is part of Toolspire and is ready as soon as this page loads. Type two whole numbers. Zero is rejected because every integer divides zero and the LCM would be undefined in ordinary school use.
On this page
What you can do here
Remainder loop, not a factor list
Euclid does not list every divisor. It only keeps replacing a with b and b with a mod b.
LCM from the HCF
Once the HCF is known, the LCM is fixed. The page does not search multiples.
Signs ignored for the size
The factors use absolute values. −12 and 18 still report HCF 6 and LCM 36.
The sequence
How to use the LCM and HCF Calculator
- 1
Type whole numbers
12.5 is not accepted. If a textbook problem has decimals, scale both numbers to integers first and say so in your working.
- 2
Read HCF as the headline
The large result is the highest common factor. The LCM is the sentence underneath.
- 3
Check with the product
For positive integers, HCF × LCM equals the product of the two numbers. 6 × 36 = 12 × 18.
Worth knowing
- LCM and HCF Calculator on Toolspire: HCF is the Euclidean algorithm: replace the larger number by the remainder until the remainder is 0.
- LCM is |a| ÷ HCF × |b|, which avoids multiplying the two numbers first and overflowing the school-sized product.
- 12 and 18 give HCF 6 and LCM 36. That pair is the check on the page.
- Decimals and zero are rejected. HCF and LCM in this school sense are for non-zero integers.
Why the LCM uses the HCF
Searching multiples is slow and easy to stop too early. Euclid’s loop finds the greatest common divisor with remainders, and the identity LCM(a, b) = |a × b| / HCF(a, b) then gives the least common multiple. Dividing before multiplying keeps the intermediate value smaller. The page stops at two numbers; three numbers need a second pass of the same idea.
FAQ
Questions about LCM and HCF Calculator
Where does LCM and HCF Calculator run?
What is the difference between HCF and GCD?
Can I enter three numbers?
Why is zero rejected?
Does order matter?
Keep going
Related tools
Last updated Report a problem or suggest a feature