LCM calculator
Find the least common multiple of any set of whole numbers, with the working shown.
Two or more whole numbers, separated by commas or spaces.
LCM of 12, 18
36
- Greatest common factor
- 6
- Coprime?
- No
| Number | Prime factorization |
|---|---|
| 12 | 2^2 × 3 |
| 18 | 2 × 3^2 |
How to use the lcm calculator
- Enter two or more whole numbers separated by commas or spaces.
- Read the LCM and the prime factorization of each number.
About this calculator
The least common multiple is the smallest positive number that every number in a set divides into evenly. It is how you find a common denominator when adding fractions.
It also solves scheduling questions: if one bus comes every 12 minutes and another every 18, they meet again after LCM(12, 18) = 36 minutes.
LCM from the GCF
lcm(a, b) = |a × b| ÷ gcf(a, b)
For more numbers, apply it pairwise. Via prime factors, the LCM is the product of every prime at its highest power.
Example
12 = 2² × 3 and 18 = 2 × 3². Taking each prime at its highest power gives 2² × 3² = 36.
Frequently asked questions
How do I find the least common denominator?
The least common denominator of fractions is the LCM of their denominators. For 1/4 + 1/6, LCM(4, 6) = 12, so rewrite as 3/12 + 2/12.
What is the LCM of two prime numbers?
Their product, because they share no factors. LCM(5, 7) = 35.
Can the LCM be smaller than the numbers?
No. The LCM is always at least as large as the largest number in the set.
What is the difference between LCM and GCF?
The GCF is the largest number that divides all of them; the LCM is the smallest number all of them divide into.