Find the least common multiple of two or more numbers instantly.
LCM is the smallest number divisible by all inputs.
The Least Common Multiple, or LCM, is one of the first tools students learn in school, and it keeps showing up long after: in adding fractions, scheduling repeating events, and simplifying ratios in engineering and everyday planning. Despite being simple in concept, working it out by hand for three or more numbers can get tedious and error-prone.
Our LCM Calculator finds the least common multiple of two or more numbers instantly. Enter any list of whole numbers separated by commas, and you get the LCM along with the greatest common divisor (GCD) and a full step-by-step prime factorization, so you can see exactly how the answer was reached. It is free, works on any device and needs no sign-up.
The Least Common Multiple of a set of numbers is the smallest positive number that all of them divide into evenly, with no remainder. For example, the multiples of 4 are 4, 8, 12, 16, 20, 24... and the multiples of 6 are 6, 12, 18, 24, 30... The smallest number appearing in both lists is 12, so the LCM of 4 and 6 is 12.
Write out multiples of each number until you find the smallest one shared by all of them. This works well for small numbers but becomes slow for large ones or more than two numbers.
Break each number down into its prime factors, then multiply together the highest power of every prime that appears in any of the numbers. This is the method our calculator shows in its step-by-step working, because it scales well to any number of inputs.
Example: LCM of 12 and 18.
12 = 22 × 3
18 = 2 × 32
LCM = 22 × 32 = 4 × 9 = 36
For two numbers, LCM(a, b) = (a × b) ÷ GCD(a, b), where GCD is the greatest common divisor. This is often the fastest method by hand once you know the GCD.
Example: LCM of 8 and 12. GCD(8, 12) = 4, so LCM = (8 × 12) ÷ 4 = 96 ÷ 4 = 24.
| Numbers | GCD | LCM |
|---|---|---|
| 4, 6 | 2 | 12 |
| 6, 8 | 2 | 24 |
| 5, 10 | 5 | 10 |
| 7, 9 | 1 | 63 |
| 12, 15, 20 | 1 | 60 |
| 2, 3, 4, 5 | 1 | 60 |
Notice that when two numbers share no common factors other than 1, meaning their GCD is 1, they are called coprime, and their LCM is simply the product of the two numbers, as seen with 7 and 9 above.
| Method | Best For | Drawback |
|---|---|---|
| Listing Multiples | Small numbers, quick mental checks | Slow for large or multiple numbers |
| Prime Factorization | Any size, any count of numbers | Requires factoring each number first |
| GCD Formula | Exactly two numbers | Does not extend directly to three or more numbers |
For three or more numbers, prime factorization is generally the most reliable method, which is why our calculator's step-by-step working uses it by default, regardless of how many numbers you enter.
LCM and GCD are opposite but related ideas. The GCD (greatest common divisor, also called HCF) is the largest number that divides all the given numbers without a remainder. The LCM is the smallest number that all the given numbers divide into without a remainder. GCD shrinks toward the smallest shared factor, while LCM grows toward the smallest shared multiple, and for two numbers they are linked by the formula shown above.
Suppose Bus A arrives every 12 minutes and Bus B arrives every 18 minutes, and both just left the station together. The next time they will both be at the station at the same moment is the LCM of 12 and 18, which is 36 minutes later. This exact type of reasoning applies to shift rotations, traffic light cycles, and any situation where two or more repeating events need to be synchronized.
Add 1/4 and 1/6. The denominators are 4 and 6, and their LCM is 12. Convert both fractions to have denominator 12: 1/4 = 3/12 and 1/6 = 2/12. Adding gives 3/12 + 2/12 = 5/12, which is already in lowest terms.
If one number is a multiple of another, the LCM is simply the larger number. For example, the LCM of 5 and 20 is 20, since 20 is already a multiple of 5. This shortcut is worth remembering, since it lets you skip the full factorization process whenever one number divides evenly into another.
Find the LCM of 6, 10 and 15.
6 = 2 × 3
10 = 2 × 5
15 = 3 × 5
Take the highest power of every prime that appears: 2, 3 and 5.
LCM = 2 × 3 × 5 = 30
LCM is the smallest shared multiple, while GCD is the largest shared factor. Mixing them up is one of the most frequent errors in this topic.
When using prime factorization, make sure every prime that appears in any number is included in the final product, using its highest power across all the numbers.
For three or more numbers, the shared multiple may not appear until much further down the list than expected, especially if the numbers do not share many factors.
LCM is only defined for positive whole numbers. Zero and negative inputs do not have a meaningful least common multiple in the usual sense.
LCM is a small but genuinely useful concept that connects arithmetic to fractions, scheduling and many practical problems. Use the calculator above to get instant, accurate results for any list of numbers, and follow the prime factorization steps to understand and practice the method by hand.