LCM Calculator (Least Common Multiple)
Find the least common multiple (LCM) of two or more numbers, explained three ways: prime factorization, the GCF formula, and listing multiples.
What is the LCM?
The least common multiple (LCM) of a set of integers is the smallest positive integer that all of them divide into with no remainder.
because 12 is a multiple of both 4 and 6, and no smaller positive number is.
Three ways to find the LCM
1. Prime factorization (highest power)
Break each number into prime factors, then multiply the primes that appear in any number, using the highest power each prime appears with.
Example — LCM(12, 18): , . The primes involved are 2 and 3; take the highest power of each: , so LCM = 36.
Example — LCM(12, 18, 30): , , . Highest powers: , so LCM = 180.
2. The GCF formula
For exactly two numbers, the fastest route skips factoring altogether:
Example — LCM(6, 10): GCF(6, 10) = 2, so — LCM = 30.
This is also how this calculator finds the LCM of very large numbers where factoring would be too slow: the Euclidean algorithm finds the GCF quickly at any size, and the formula above finishes the job.
3. Listing multiples
List the multiples of each number until the smallest one they share appears.
Example — LCM(4, 6): multiples of 4: 4, 8, 12…; multiples of 6: 6, 12… → LCM = 12.
Simple to follow, but the lists get long fast for bigger numbers — this calculator only shows this method when the lists stay short.
LCM vs. GCF
LCM and GCF (greatest common factor) are opposite extremes of the same prime-factor comparison: LCM keeps the largest power of every prime that appears anywhere, GCF keeps the smallest shared power. For two numbers they're linked by:
So if you already know one of them, the other is a single division or multiplication away.
Why the LCM matters for fractions
The most common use of the LCM is finding a common denominator before adding or subtracting fractions. To add , rewrite both fractions over their LCM: , so and , giving . This smallest shared denominator is exactly what "LCD" (least common denominator) means.
Worked examples
Example 1 — LCM(4, 6)
Prime factors: , . Highest powers: . The GCF formula agrees: GCF(4, 6) = 2, so . LCM = 12.
Example 2 — LCM(12, 18, 24)
Fold pairwise: LCM(12, 18) = 36, then LCM(36, 24) = 72. LCM = 72. (The GCF-formula shortcut only applies to two numbers at a time — with three or more inputs this calculator shows the prime-factorization method instead.)
Example 3 — LCM(5, 7)
5 and 7 are both prime and different from each other, so they share no common factor above 1. Their LCM is simply the product: LCM = 35.
Frequently confused terms
| Term | Means | Example |
|---|---|---|
| LCM / BCNN | Smallest shared multiple | LCM(12, 18) = 36 |
| GCF / GCD | Largest shared factor | GCF(12, 18) = 6 |
| LCD | LCM applied to fraction denominators | LCD(1/4, 1/6) = 12 |
| Coprime | GCF = 1, so LCM = a × b | 5 and 7 |
Frequently asked questions
- What is the LCM of two numbers?
- The LCM (least common multiple) is the smallest positive integer that every number in the set divides into evenly. LCM(4, 6) = 12 because 12 is the smallest number that both 4 and 6 divide into with no remainder.
- How do you find the LCM using prime factorization?
- Break each number into prime factors, then for every prime that appears anywhere, take the highest power it appears with, and multiply those together. For LCM(12, 18) that's 2² × 3² = 36.
- How is the LCM related to the GCF?
- For two numbers, LCM(a, b) × GCF(a, b) = a × b. So once you know the GCF, the LCM is just (a × b) divided by the GCF — no extra factoring needed.
- What is the LCM of two coprime numbers?
- When two numbers share no common factor other than 1 (they're coprime), their LCM is simply their product. LCM(5, 7) = 35 because 5 and 7 have no prime factors in common.
- Can I find the LCM of more than two numbers?
- Yes. Fold the pairs with the identity LCM(a, b, c) = LCM(LCM(a, b), c). This calculator accepts 2 to 10 numbers at once, though the GCF-formula method only applies to exactly two.
- Why do I need the LCM when adding fractions?
- To add or subtract fractions with different denominators, you first rewrite them over a common denominator — and the smallest one that works is the LCM of the original denominators (also called the LCD).
- Is LCM the same thing as LCD?
- Yes, when the numbers being combined are denominators. LCD (least common denominator) is just the LCM applied specifically to the bottom numbers of two or more fractions.