How to use the LCM calculator
Type two or more whole numbers separated by commas or spaces — up to 20 numbers, each up to a trillion. The result is the least common multiple, the greatest common factor of the same numbers, the prime factorization of each number and the LCM written as a product of primes. The last row divides the LCM by each number so you can confirm it really is a multiple of all of them.
What the least common multiple is
The LCM of a set of whole numbers is the smallest positive number that every one of them divides into evenly. The multiples of 4 are 4, 8, 12, 16, 20, 24, …; the multiples of 6 are 6, 12, 18, 24, …. Both lists contain 12, 24, 36 and so on — the common multiples — and the least of them is 12. Every other common multiple is a multiple of the LCM.
Method 1: list the multiples
For small numbers, write out multiples of the largest number until you hit one that the others divide. For 6 and 8: 8, 16, 24 — 24 ÷ 6 = 4, so LCM(6, 8) = 24. This is quick by hand but hopeless for numbers like 231 and 455, which is where the other two methods come in.
Method 2: prime factorization (what the calculator does)
- Break each number into primes: 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5.
- Collect every prime that appears anywhere, at the highest power it reaches in any single number: 2², 3², 5.
- Multiply: 2² × 3² × 5 = 4 × 9 × 5 = 180.
Check: 180 ÷ 12 = 15, 180 ÷ 18 = 10, 180 ÷ 30 = 6 — all whole, and nothing smaller works because dropping any prime power would leave one of the numbers out. The factor calculator shows the factor tree for a single number.
Method 3: use the GCF
For exactly two numbers, LCM(a, b) = a × b ÷ GCF(a, b). For 21 and 6 the GCF is 3, so the LCM is 21 × 6 ÷ 3 = 126 ÷ 3 = 42. The identity LCM × GCF = a × b is handy for checking an answer, but it holds only for two numbers; with three or more, fold the pairs: LCM(a, b, c) = LCM(LCM(a, b), c). The GCF calculator walks through Euclid's algorithm for the GCF part.
Adding fractions: the LCM of the denominators
The least common denominator is simply the LCM of the denominators. To add 1/6 + 3/8, LCM(6, 8) = 24, so rewrite both over 24: 4/24 + 9/24 = 13/24. Using the plain product 48 as the denominator also works but leaves you with 26/48 to simplify afterward. The fraction calculator does the whole addition for you.
LCM of common pairs
| Numbers | GCF | LCM |
|---|---|---|
| 2, 3 | 1 | 6 |
| 4, 6 | 2 | 12 |
| 6, 8 | 2 | 24 |
| 8, 12 | 4 | 24 |
| 9, 12 | 3 | 36 |
| 10, 15 | 5 | 30 |
| 12, 18 | 6 | 36 |
| 7, 13 | 1 | 91 |
When two numbers share no factor (their GCF is 1, like 7 and 13), the LCM is just their product. When one number is a multiple of the other (4 and 12), the LCM is the larger number.
Frequently asked questions
What is the LCM of 12 and 18?
36. 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36. As a check, 12 × 18 = 216 = 36 × 6, where 6 is the GCF.
What is the LCM of two prime numbers?
Their product, because two different primes share no factor. LCM(7, 13) = 91 and LCM(11, 17) = 187.
Is the LCM the same as the LCD?
The least common denominator (LCD) is the LCM of the denominators of a set of fractions — the same calculation applied to a specific job. To add 1/4 and 1/6 the LCD is LCM(4, 6) = 12.
Can the LCM be smaller than the largest number?
No. The LCM is always at least as large as the largest number in the set, and equals it exactly when that number is a multiple of all the others — LCM(3, 4, 12) = 12.
How do I find the LCM of three or more numbers?
Factor every number into primes and take each prime at its highest power across all of them. Or work in pairs: find the LCM of the first two, then the LCM of that result and the third, and so on.
Last updated: October 9, 2026