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.
Input reference and sample values
Use the units and choices shown for each field. Sample values are provided for practice, not as recommendations.
| Input | Format and units | Sample |
|---|---|---|
| First number | Numeric value. Zero or positive. | 18 |
| Second number | Numeric value. Zero or positive. | 24 |
Result for these sample inputs
6
- Least common multiple (LCM)
- 72
Select Try the example in the form to load these values and calculate them again. This replaces the current form inputs. Compare the result with the method and worked explanation below.
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.