How to use this tool
- Enter first number, second number.
- Select Calculate to view the result.
- Check the method and assumptions below before using the result.
The method, explained
The Euclidean algorithm repeatedly replaces (a, b) with (b, a mod b) until the remainder is zero. LCM = a ÷ GCD × b. Integer arithmetic keeps both results exact.
For 18 and 24, the greatest common divisor is 6 and the least common multiple is 72.
What to keep in mind
Inputs must be nonnegative whole numbers. At least one must be positive. For a positive number paired with zero, the GCD is the positive number and the LCM is zero.
Common questions
Is GCD the same as HCF?
Yes. Highest common factor and greatest common divisor refer to the same positive common factor.
How does LCM help with fractions?
The least common multiple of denominators gives the smallest shared denominator for combining fractions.
Methodology maintained by ClarityKit. How these tools are built and checked.