Find the least common multiple of two positive whole numbers.
How to use the LCM calculator
- Enter two positive whole numbers in the same units.
- Select Find LCM to see the smallest positive multiple shared by both numbers.
- Check the GCD and division shown with the result. Reset restores 12 and 18 and clears the output.
Formula and worked example
LCM(a, b) = (a ÷ GCD(a, b)) × b. Dividing before multiplying avoids an unnecessarily large intermediate product.
For 12 and 18, the GCD is 6. The LCM is (12 ÷ 6) × 18 = 36. The first multiples of 12 are 12, 24, 36; those of 18 are 18, 36. Their first shared positive multiple is 36.
Using the result
If two repeating events start together and repeat every 12 and 18 minutes, they next coincide 36 minutes later, assuming both intervals stay constant. Different starting times require an additional offset calculation; the LCM alone does not solve that problem.
The LCM also gives the least common denominator for fractions. To add 1/12 and 1/18, use denominator 36: 3/36 + 2/36 = 5/36.
Limits and common questions
How is LCM different from GCD?
The GCD is the largest integer that divides both numbers. The LCM is the smallest positive integer divisible by both. For 12 and 18, they are 6 and 36 respectively.
Can I enter decimals or zero?
This tool accepts positive integers only, from 1 to 9,007,199,254,740,991. Its result must also fit within that limit. For intervals such as 1.5 minutes and 2 minutes, use whole seconds (90 and 120) consistently; the result is 360 seconds, or 6 minutes.
What if the numbers are equal or coprime?
Equal numbers have that same number as their LCM. If their GCD is 1, their LCM is their product, provided it fits the supported range.
How do I handle three numbers?
Find the LCM of the first two, then calculate the LCM of that result and the third. For 4, 6 and 10: LCM(4, 6) = 12, then LCM(12, 10) = 60.