LCM of Two Numbers Calculator
Enter two whole numbers to find their least common multiple, with the steps shown.

Finding the LCM of two numbers
With two numbers, the quickest route is the formula LCM(a, b) = (a × b) ÷ GCD(a, b). For 8 and 12, the GCD is 4, so the LCM is (8 × 12) ÷ 4 = 96 ÷ 4 = 24.
You can also list multiples. Multiples of 8: 8, 16, 24, 32. Multiples of 12: 12, 24, 36. The first number in both lists is 24.
Good to know
- If the two numbers share no factors, multiply them. LCM(9, 10) = 90.
- If the smaller number divides the larger one, the LCM is the larger number. LCM(5, 15) = 15.
- The LCM is never smaller than the bigger of your two numbers.
Worked examples
Example 1: LCM of 8 and 12
8 = 2³
12 = 2² × 3
LCM = 2³ × 3 = 8 × 3 = 24
Check with multiples: 8, 16, 24 and 12, 24. The first shared multiple is 24.
Example 2: LCM of 9 and 15
9 = 3²
15 = 3 × 5
LCM = 3² × 5 = 9 × 5 = 45
With the formula: GCD(9, 15) = 3, so LCM = (9 × 15) ÷ 3 = 135 ÷ 3 = 45.
Example 3: LCM of 7 and 11
Both numbers are prime, so they share no factors. The LCM is simply 7 × 11 = 77.
Step by step: any two numbers
- Write each number as a product of prime factors.
- For every prime that appears, keep the highest power you see.
- Multiply those powers together. That product is the LCM.
- Sanity check: divide the answer by each of your numbers. Both divisions must come out whole.
The same idea stretches when a third number joins in: you track one more factorization, as the three-numbers method shows, and a longer list is only this same step repeated pair by pair.

Common pairs
| Numbers | LCM | Numbers | LCM |
|---|---|---|---|
| 4, 10 | 20 | 9, 12 | 36 |
| 6, 9 | 18 | 10, 25 | 50 |
| 8, 14 | 56 | 12, 16 | 48 |
| 15, 25 | 75 | 18, 24 | 72 |
When do you need the LCM of two numbers?
The most common job is adding or subtracting fractions whose denominators differ: the LCM of the denominators is the least common denominator. When the fractions themselves are the input rather than their denominators, a different rule applies — the LCM of fractions. The same idea lines up anything that repeats on two different cycles — two buses that leave every 12 and 18 minutes meet again after 36 minutes, and two gears with 8 and 12 teeth return to their starting alignment after 24 tooth-moves. Teachers also use pairs like these to introduce prime factorization, because every method (multiples, factors, the GCD formula) can be checked against the same answer.
Frequently asked questions
Can the LCM be smaller than both numbers?
No. The LCM is a multiple of both numbers, so it is always at least as big as the larger one. It equals the larger number only when the larger number is already a multiple of the smaller one, like LCM(5, 15) = 15.
What is the LCM of two prime numbers?
It is the two primes multiplied together. Prime numbers share no factor except 1, so nothing cancels. For example, LCM(7, 11) = 77 and LCM(13, 17) = 221.
What is the LCM of a number and itself?
The number itself. LCM(9, 9) = 9, because 9 is the smallest multiple of 9 that is also a multiple of 9.
How is LCM used to add fractions?
To add fractions with different denominators, you first rewrite them over a common denominator, and the easiest one to use is the LCM of the denominators, called the least common denominator. For 1/8 + 1/12, the LCM of 8 and 12 is 24, so the fractions become 3/24 + 2/24 = 5/24.