Article
LCM: How to Find the Least Common Multiple (Formula and Examples)
The LCM of two whole numbers is the smallest positive number that both of them divide without a remainder. The shortest formula is LCM(a, b) = |a · b| ÷ GCF(a, b). This article shows three methods, the LCM of three numbers, the link to the GCF and four worked examples. You can check your own pair in the LCM calculator. For 12 and 18 the result is 36.
Last updated:
Find the LCM of two numbers in the LCM calculator. Find the greatest common factor in the GCD calculator.
The LCM formula and the link to the GCF
The least common multiple (LCM) of two positive whole numbers is the smallest number that is a multiple of each of them. The fastest way to find it is to use the greatest common factor (GCF).
LCM(a, b) = |a · b| ÷ GCF(a, b)
example: LCM(12, 18) = 12 · 18 ÷ 6 = 36
GCF(a, b) · LCM(a, b) = |a · b|
| a | b | GCF | LCM |
|---|---|---|---|
| 6 | 8 | 2 | 24 |
| 4 | 6 | 2 | 12 |
| 7 | 5 | 1 | 35 |
| 12 | 18 | 6 | 36 |
| 24 | 36 | 12 | 72 |
| 84 | 36 | 12 | 252 |
| 144 | 96 | 48 | 288 |
When the numbers are coprime, which means GCF = 1, the LCM equals their product. For 7 and 5 it is 35.
Try it with an example
Example: the numbers 12 and 18. Both values are already stored in the link to the calculator.
- First number
- 12
- Second number
- 18
- Result
- LCM = 36, GCF = 6
Open the calculator with these numbers
The calculator reads the values from the page address and shows the result right away. You can change them freely.
How the calculator works
The calculator finds the greatest common factor with the Euclidean algorithm and then the LCM as the absolute value of the product divided by the GCF. It also shows the intermediate steps, the GCF and the product. It works for whole numbers, including negative ones, because it uses absolute values. For a pair in which one number is zero it gives an LCM of 0, and it rejects the pair 0 and 0. The calculator takes two numbers at a time, so for three numbers you have to find the LCM twice.
Three methods to find the LCM
Listing multiples means writing the successive multiples of both numbers and finding the first common one. For 6 and 8 you have 6, 12, 18, 24 and 8, 16, 24, so the LCM is 24. The method suits small numbers.
Prime factorization: break both numbers into primes and take each prime to its highest power. The number 12 is 2² · 3 and 18 is 2 · 3². The highest powers are 2² and 3², so the LCM is 2² · 3² = 36.
The GCF method is the fastest for larger numbers. For 84 and 36 the GCF is 12 and the product is 3024, so the LCM is 3024 ÷ 12 = 252. You can find the GCF itself in the GCD calculator.
The LCM of three or more numbers
You find the LCM of three numbers in steps: first the LCM of two of them, then the LCM of that result and the third number. For 4, 6 and 10 you have LCM(4, 6) = 12, and then LCM(12, 10) = 60. The order does not matter.
The calculator takes two numbers, so for three numbers run the calculation twice. With prime factorization you take each prime to its highest power across all the numbers: 2², 2 · 3 and 2 · 5 give 2² · 3 · 5 = 60.
What the LCM is used for
The LCM is used to add and subtract fractions, because the least common denominator of fractions with denominators 6 and 8 is 24. You can run such an example in the fraction calculator, and turn a decimal into a fraction in the decimal to fraction calculator.
The LCM also helps with problems about cycles. If buses leave every 12 and every 18 minutes, both leave together every 36 minutes. Related topics are covered in GCD: Greatest Common Divisor and Fraction Calculator.
Four worked examples
You can repeat each example in the LCM calculator.
1. LCM of 6 and 8
Listing multiples.
- List the multiples of 6: 6, 12, 18, 24.
- List the multiples of 8: 8, 16, 24.
- The first common one is 24.
- LCM(6, 8) = 24.
2. LCM of 12 and 18
The GCF formula.
- Find GCF(12, 18) = 6.
- Multiply 12 · 18 = 216.
- Divide 216 ÷ 6.
- LCM(12, 18) = 36.
3. LCM of 84 and 36
Larger numbers.
- Find GCF(84, 36) = 12.
- Multiply 84 · 36 = 3024.
- Divide 3024 ÷ 12.
- LCM(84, 36) = 252.
4. LCM of 4, 6 and 10
Three numbers in two steps.
- Find LCM(4, 6) = 12.
- Find LCM(12, 10): GCF = 2, so 12 · 10 ÷ 2.
- The intermediate result is 60.
- LCM(4, 6, 10) = 60.
Common mistakes when finding the LCM
- Confusing the LCM with the GCF — the LCM is always at least the larger number, and the GCF is at most the smaller one.
- Multiplying the numbers without dividing by the GCF — the product 12 · 18 = 216 is a common multiple, but not the least one.
- Stopping at a common number from a random list — you have to list the multiples from the start to find the smallest.
- Taking primes to their lowest power — for the LCM you choose the highest powers, and for the GCF the lowest.
- Taking the LCM of three numbers as a product of pairwise LCMs — compute it step by step or from the factorization.
- Entering non-integers — the LCM is defined for whole numbers.
- Using zero — the LCM with zero is taken as 0, and the pair 0 and 0 has no defined LCM.
Frequently asked questions
How do you find the LCM?
Find the GCF of the two numbers and divide the absolute value of their product by it. For 12 and 18 that is 216 ÷ 6 = 36.
What is the LCM?
The LCM is the least common multiple, the smallest positive number that each of the given numbers divides without a remainder.
How are the LCM and the GCF related?
The product of the LCM and the GCF of two numbers equals the product of the numbers: GCF(a, b) · LCM(a, b) = |a · b|.
What is the LCM of 24 and 36?
The GCF of 24 and 36 is 12, so the LCM is 24 · 36 ÷ 12 = 72.
How do you find the LCM of 3 numbers?
Find the LCM of two of them, then the LCM of that result and the third number. For 4, 6 and 10 you get 12 and then 60.
What is the fastest way to find the LCM?
For small numbers listing the multiples is fastest. For larger numbers the GCF formula is fastest, and the GCF comes from the Euclidean algorithm.
What is the LCM of coprime numbers?
For coprime numbers, whose GCF is 1, the LCM equals their product. For 7 and 5 it is 35.
Does the calculator find the LCM of three numbers?
No. The calculator takes two whole numbers. For three numbers find the LCM twice: first for the first pair, then for that result and the third number.
Find the LCM of your own numbers
Enter two whole numbers in the LCM calculator and read the LCM, the GCF and the intermediate steps.
Find a common denominator in the fraction calculator and the divisors in the GCD calculator.