The rule
lcm(a, b) is the smallest positive whole number that both a and b go into exactly. There are three ways to find it.
Count upwards. List the multiples of the larger number until you find one the other goes into. That works for small numbers.
With prime factors. Factorise the numbers into primes and take every prime that appears, each to the highest power it has in any of the numbers.
Via the gcd. For two numbers, lcm(a, b) = a · b / gcd(a, b). With the greatest common divisor it is quick even for large numbers.
Worked examples
lcm(4, 6) by counting upwards. The multiples of 6 are 6, 12, 18, … 4 does not go into 6 but does go into 12. lcm = 12.
lcm(84, 360) with prime factors. 84 = 2² · 3 · 7 and 360 = 2³ · 3² · 5. The highest powers are 2³, 3², 5 and 7. lcm = 8 · 9 · 5 · 7 = 2520.
The same via the gcd. gcd(84, 360) = 12, so lcm = 84 · 360 / 12 = 30,240 / 12 = 2520.
Lowest common denominator. 1/4 + 1/6: lcm(4, 6) = 12, so 1/4 = 3/12 and 1/6 = 2/12, and the sum is 5/12. See adding fractions.
An everyday question. One bus leaves every 12 minutes and another every 18. If they leave together now, when do they next leave together? lcm(12, 18) = 36, so in 36 minutes.
The LCM calculator works it out for several numbers and shows the steps.
Common mistakes
- Just multiplying the numbers. 4 · 6 = 24 is a common multiple but not the least. The product is the lcm only when the numbers share no prime.
- Taking the lowest power. That is the rule for the gcd. With 2² instead of 2³ the answer is 1260, which 360 does not go into.
- Forgetting primes only one number has. 7 is only in 84, but it has to be included for 84 to go into the answer.
Common questions
Why is the lcm used when adding fractions?
Because fractions need the same denominator before their numerators can be added, and the lcm of the
denominators is the smallest denominator every fraction can be expanded to. A larger common denominator
works too, but leaves bigger numbers to simplify afterwards.
How do you find the lcm of three numbers?
Two at a time: lcm(a, b, c) = lcm(lcm(a, b), c). With prime factors, take every prime that appears, to
the highest power. The formula with the gcd only holds for two numbers at a time.
Can the lcm be one of the numbers itself?
Yes, when one number goes into the other. lcm(4, 12) = 12.