How the LCM calculator works
Enter two to ten whole numbers, separated by commas or spaces, and the calculator finds their least common multiple (LCM). It shows each number as a product of primes and how the LCM is built from them, and it also gives the greatest common factor (GCF).
What is the least common multiple?
A multiple of a number is that number times a whole number: the multiples of 4 are 4, 8, 12, 16 and so on. The least common multiple of two or more numbers is the smallest number that is a multiple of all of them.
Example: Multiples of 12 are 12, 24, 36, 48…, and multiples of 18 are 18, 36, 54…. The first number on both lists is 36, so the LCM of 12 and 18 is 36.
Finding the LCM with prime factors
Listing multiples gets slow for large numbers. A faster way is to write each number as a product of primes, then multiply every prime that appears, using the highest power it has in any of the numbers.
Example: 12 = 2² × 3 and 18 = 2 × 3². The highest power of 2 is 2² and of 3 is 3², so the LCM is 2² × 3² = 4 × 9 = 36. For 8, 12 and 20: 8 = 2³, 12 = 2² × 3 and 20 = 2² × 5, so the LCM is 2³ × 3 × 5 = 120.
For two numbers there is also a shortcut through the greatest common factor:
LCM(a, b) = a × b ÷ GCF(a, b)
For 12 and 18, the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 216 ÷ 6 = 36.
Where the LCM is used
The most common use is adding fractions: the LCM of the denominators is the lowest common denominator. To add 1/12 + 1/18, convert both to 36ths: 3/36 + 2/36 = 5/36. The LCM also answers timing questions, such as when two repeating events next happen together: buses every 12 and 18 minutes next leave together after 36 minutes.