Two delivery routes leave the depot together, one every 12 minutes and one every 18. When do they next leave at the same time? You need to add 5/12 and 7/18 and want the smallest common denominator. A maintenance plan checks one machine every 8 days and another every 12. All three questions have the same answer pattern: the least common multiple, or LCM.
This guide explains what the LCM is, three ways to find it by hand, when each method is fastest, and how it connects to the greatest common factor. The examples were all checked with our calculator.
What the LCM is
A multiple of a number is that number times a whole number. The multiples of 12 are 12, 24, 36, 48, 60 … and the multiples of 18 are 18, 36, 54, 72 …
A common multiple appears in both lists: 36, 72, 108 and so on. The least common multiple is the smallest positive one. So LCM(12, 18) = 36, and the two routes leave together again after 36 minutes.
The LCM is sometimes called the lowest common multiple; in fraction work it is the lowest common denominator.
Method 1: list the multiples
Write out multiples of each number until one appears in every list.
- 8: 8, 16, 24, 32
- 12: 12, 24, 36
LCM(8, 12) = 24, so the two machines are checked on the same day every 24 days.
Listing is easy to understand and fine for small numbers. It becomes slow when the LCM is large or when there are three or more numbers.
Method 2: prime factorisation
Break each number into primes, then take every prime that appears, with its highest power.
Example: LCM(12, 18, 30)
12 = 2² × 3
18 = 2 × 3²
30 = 2 × 3 × 5
The primes involved are 2, 3 and 5. Their highest powers are 2², 3² and 5. So:
LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180
This method scales well to several numbers and makes it obvious why the answer is what it is: 180 contains just enough of each prime to be divisible by all three numbers. If you need help with the factorising itself, the Prime Factorization Calculator breaks any number down.
Method 3: the GCF shortcut
For two numbers there is a neat formula linking the LCM to the greatest common factor (GCF):
LCM(a, b) = |a × b| ÷ GCF(a, b)
Example: LCM(84, 126). GCF(84, 126) = 42, so LCM = 84 × 126 ÷ 42 = 10,584 ÷ 42 = 252.
The GCF can be found quickly with Euclid's algorithm even for very large numbers, which makes this the method computers use. For three or more numbers, apply it pair by pair: LCM(a, b, c) = LCM(LCM(a, b), c). For 12, 18 and 30 that gives LCM(12, 18) = 36, then LCM(36, 30) = 180.
To find the GCF itself, see the GCF Calculator.
Which method should you use?
| Situation | Best method |
|---|---|
| Small numbers, mental maths | Listing multiples |
| Three or more numbers | Prime factorisation |
| Two large numbers | GCF shortcut |
| Numbers with huge prime factors | GCF shortcut (factoring is slow) |
Where the LCM is used
Adding fractions
To add 5/12 and 7/18, rewrite both over LCM(12, 18) = 36:
5/12 = 15/36 7/18 = 14/36 sum = 29/36
Using 12 × 18 = 216 as the denominator also works, but you then have to simplify a larger fraction. The Fraction Calculator finds the lowest common denominator for you, and the guide on adding and subtracting fractions walks through the full process.
Repeating schedules
Any two events that repeat at fixed intervals line up again after the LCM of the intervals. Buses, shift rotas, recurring reports and maintenance cycles all follow this rule.
Gears and rotating parts
Two meshing gears with 12 and 18 teeth return to their starting alignment after 36 teeth have passed: 3 turns of the small gear and 2 of the large one.
Packaging and batching
If one item comes in packs of 6 and a matching item in packs of 10, the smallest order that leaves nothing over is LCM(6, 10) = 30 of each.
How to use the LCM Calculator
- Open the LCM Calculator.
- Type the numbers into Numbers (2 or more), separated by commas or spaces. You can enter up to 30 whole numbers, each up to 60 digits long.
- Read the Least common multiple (LCM) at the top. The result card also shows the Greatest common factor (GCF) and how many digits the LCM has.
- Check the factor table below the input, which shows each number's prime factorisation.
- Open the steps. You will see the prime factorisation method, with the highest powers picked out, followed by a check using the GCF method pair by pair.
Negative signs are ignored, since the LCM is defined as a positive number. Zero is rejected, because 0 is the only multiple of 0.
Other ways to find it
- Spreadsheets: Excel, Google Sheets and LibreOffice have
=LCM(12,18,30), which returns 180. Spreadsheets work in floating point, so for numbers with many digits the calculator's exact arithmetic is safer. - Programming: Python 3.9 and later has
math.lcm(12, 18, 30). In other languages, compute it from a GCD function with the formula above. - Scientific calculators: some models have an LCM function in a maths menu; many do not.
Common mistakes
Multiplying all the numbers
12 × 18 × 30 = 6,480 is a common multiple, but it is 36 times larger than the LCM. The product only equals the LCM when the numbers share no factors.
Taking the lowest powers
Lowest powers of shared primes give the GCF, not the LCM. For the LCM take the highest power of every prime, even those that appear in only one number.
Confusing LCM and GCF in word problems
If the question asks when things happen together again, or for the smallest amount that several sizes divide into, you want the LCM. If it asks for the largest equal group or tile that fits into several sizes, you want the GCF.
Forgetting the extended formula needs pairs
LCM(a, b, c) is not a × b × c ÷ GCF(a, b, c). Work pair by pair instead.
Frequently asked questions
What is the LCM of 12 and 18?
It is 36. The multiples of 12 are 12, 24, 36 …, the multiples of 18 are 18, 36 …, and 36 is the first one they share.
How do you find the LCM of three numbers?
Factor each number into primes and multiply the highest power of every prime, or find the LCM of the first two and then the LCM of that result with the third. For 12, 18 and 30 both methods give 180.
What is the relationship between LCM and GCF?
For two positive whole numbers, LCM × GCF = the product of the numbers. For 84 and 126, 252 × 42 = 10,584 = 84 × 126.
Can the LCM be smaller than the numbers?
No. The LCM is always at least as large as the biggest number, and it equals that number when the others divide into it, as in LCM(4, 12) = 12.
What is the LCM of two prime numbers?
Their product. Two different primes share no factors, so LCM(7, 11) = 77.