How to use the LCM calculator
- Type the numbers separated by commas or spaces, such as 15, 18 or 4 6 10. Up to twenty whole numbers above 0 are accepted.
- Read the LCM: the smallest positive number that every one of your numbers divides into evenly.
- Check the working. The panel shows each number as a product of primes, the first six multiples of each, and how many times each number goes into the LCM. That last line tells you what to multiply each fraction by when you rewrite it over the least common denominator.
The least common multiple is also called the lowest common multiple, and when it is used for fractions, the least common denominator (LCD).
Method 1: list multiples
Write out multiples of each number until one shows up in every list. The open textbook Prealgebra 2e from OpenStax (section 2.5, Example 2.52) does this for 15 and 20:
20: 20, 40, 60, 80, 100, …
LCM(15, 20) = 60
Listing is quick for small numbers and makes the idea concrete. It gets tedious when the LCM is large, which is when the prime factor method pays off.
Method 2: prime factors
Factor each number into primes. The LCM uses every prime that appears in any of the numbers, each to the highest power that appears.
18 = 2 × 3²
LCM = 2 × 3² × 5 = 90
That is Example 2.53 in the same textbook. Example 2.54 finds the LCM of 50 and 100: 50 = 2 × 5² and 100 = 2² × 5², so the LCM is 2² × 5² = 100. When one number is a multiple of the other, the LCM is simply the larger number.
Compare this with the greatest common factor, which takes only the primes that every number shares, each at its lowest power. Same factorizations, opposite rule.
With three numbers, 4, 6 and 10: 4 = 2², 6 = 2 × 3, 10 = 2 × 5. Take 2², 3 and 5 to get an LCM of 60.
Method 3: use the GCF
For two numbers, the LCM equals their product divided by their greatest common factor:
For 15 and 18, the GCF is 3, so the LCM is 15 × 18 ÷ 3 = 90. This is how the calculator works internally, because the GCF comes from Euclid’s fast division algorithm and needs no factoring. For more than two numbers, apply it in pairs: LCM(4, 6) = 12, then LCM(12, 10) = 120 ÷ 2 = 60.
Least common denominators for fractions
The most common reason to need an LCM is adding or subtracting fractions with different denominators. Using the least common denominator keeps the numbers small and leaves less simplifying at the end.
For 5/12 + 7/18: LCM(12, 18) = 36. The multipliers are 36 ÷ 12 = 3 and 36 ÷ 18 = 2, so the sum becomes 15/36 + 14/36 = 29/36. Multiplying the denominators instead, 12 × 18 = 216, also gives the right answer eventually, but you would have to simplify 174/216 back down to 29/36.
The mixed fraction calculator handles the whole sum if you only want the result.
Everyday problems that are LCM problems
Packs that don’t match. Hot dogs come 10 to a pack and buns 8 to a pack. To end up with the same number of each, buy LCM(10, 8) = 40 of each: 4 packs of hot dogs and 5 packs of buns.
Repeating schedules. One bus leaves every 12 minutes and another every 18. If they leave together now, they next leave together in LCM(12, 18) = 36 minutes.
Rotations and cycles. If one task runs every 4 days and another every 6, they coincide every 12 days. Gears and repeating patterns line up on the same rule.
A quick sense check: the LCM is at least as big as the largest number and no bigger than the product of all of them. If your answer falls outside that range, recheck it.
Worked examples to practice on
- LCM(8, 12): 8 = 2³ and 12 = 2² × 3. Highest powers: 2³ and 3, so 24.
- LCM(9, 12, 15): 9 = 3², 12 = 2² × 3, 15 = 3 × 5. Highest powers: 2², 3² and 5, so 180.
- LCM(7, 11): no common factor, so the LCM is the product, 77.
- LCM(6, 8, 10): 6 = 2 × 3, 8 = 2³, 10 = 2 × 5. Highest powers: 2³, 3 and 5, so 120.
Notice that the LCM of numbers with no common factor is their product, while numbers that share a lot of factors have an LCM much smaller than the product.
Which method should you use?
Listing multiples is quickest when the numbers are small and the LCM is likely to be one of the first few multiples of the larger number. Prime factors are better when there are three or more numbers or the numbers are large, and they show you why the answer is what it is. The GCF shortcut is the fastest by hand when you already know the GCF, and it is what software uses. All three give the same result.
The LCM grows quickly as you add numbers. The LCM of 1 through 10 is 2,520, but the LCM of 1 through 20 is 232,792,560. Each new prime, and each higher power of a prime, multiplies the total.
LCMs of times and other measurements
The LCM is defined for whole numbers, so convert decimals or mixed units to a common whole unit first. Two machines that cycle every 1.5 hours and every 2.5 hours line up every LCM(90, 150) = 450 minutes, which is 7.5 hours. Working in hours would mean finding the LCM of 1.5 and 2.5, which doesn’t exist in whole numbers until you rescale.
Gears follow the same rule. On a 12-tooth gear meshed with an 18-tooth gear, a marked pair of teeth meets again after LCM(12, 18) = 36 teeth have passed: 3 turns of the small gear and 2 of the large one. Designers pick tooth counts with a small GCF so the same teeth don’t meet too often and wear evenly.
Sources & assumptions
How this calculator gets its numbers. Full method: our methodology.
- Inputs are whole numbers from 1 to one billion.
- LCM(a, b) = a × b ÷ GCF(a, b), applied pairwise for more than two numbers.
- Results beyond about 9 quadrillion can’t be represented exactly and are flagged as too large.
Sources
- OpenStax (Rice University), Prealgebra 2e, 2.5 Prime Factorization and the Least Common Multiple. Prime factorizations of 48, 84 and 120 (Examples 2.48–2.50) and the LCM by listing multiples (15 and 20 → 60) and by prime factors (15 and 18 → 90; 50 and 100 → 100), Examples 2.52–2.54.
Last reviewed . The least common denominator of a set of fractions is the LCM of their denominators.
Frequently asked questions
What is the least common multiple?
It is the smallest positive number that each of the given numbers divides into with no remainder. The LCM of 15 and 20 is 60.
How do you find the LCM of two numbers?
List multiples of each until they meet, or factor both into primes and multiply every prime at its highest power. A shortcut is a × b ÷ GCF: for 15 and 18, 270 ÷ 3 = 90.
What is the LCM of 4 and 6?
Multiples of 4 are 4, 8, 12, 16 and so on; multiples of 6 are 6, 12, 18 and so on. The first one they share is 12.
What is the difference between LCM and GCF?
The GCF is the largest number that divides into each number; the LCM is the smallest number each one divides into. For 12 and 18, the GCF is 6 and the LCM is 36.
Is the least common denominator the same as the LCM?
Yes. The least common denominator of some fractions is the LCM of their denominators. For 1/4 and 1/6, it is 12.
What is the LCM of three numbers?
Find the LCM of two, then the LCM of that result and the third. For 4, 6 and 10: LCM(4, 6) = 12, and LCM(12, 10) = 60.