LCM and GCF in one sentence each
The least common multiple (LCM) is the smallest positive number that all of your numbers divide into exactly. The greatest common factor (GCF) is the largest number that divides exactly into all of them. The GCF is also called the highest common factor (HCF) or the greatest common divisor (GCD).
For 12 and 18: the LCM is 36 (the smallest number in both times tables) and the GCF is 6 (the biggest number that goes into both).
Three ways to find the LCM
1. List the multiples
Write out the multiples of each number until one appears on every list.
- Multiples of 4: 4, 8, 12, 16, 20, 24…
- Multiples of 6: 6, 12, 18, 24…
The first shared multiple is 12, so LCM(4, 6) = 12. This is the method most people learn first. It is quick for small numbers but slow for big ones.
2. Prime factorization
Break each number into primes. The LCM uses every prime that appears, each at its highest power. The GCF uses only the primes that appear in every number, each at its lowest power.
Example: 12, 18 and 30.
| Number | Prime factors | Power form |
|---|---|---|
| 12 | 2 × 2 × 3 | 2² × 3 |
| 18 | 2 × 3 × 3 | 2 × 3² |
| 30 | 2 × 3 × 5 | 2 × 3 × 5 |
- LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180
- GCF = 2 × 3 = 6 (5 is not in every number, and the lowest powers of 2 and 3 are both 1)
3. The division (ladder) method
Write the numbers in a row. Divide by a prime that goes into at least one of them, bring down any number it does not divide, and repeat until every number is 1. The LCM is the product of the primes you divided by.
| Divide by | 12 | 18 | 30 |
|---|---|---|---|
| 2 | 12 | 18 | 30 |
| 2 | 6 | 9 | 15 |
| 3 | 3 | 9 | 15 |
| 3 | 1 | 3 | 5 |
| 5 | 1 | 1 | 5 |
| 1 | 1 | 1 |
LCM = 2 × 2 × 3 × 3 × 5 = 180. The calculator draws this ladder for your numbers.
Euclid’s algorithm and the LCM formula
For two numbers there is a fast shortcut that needs no factors at all. Euclid’s algorithm finds the GCF by repeated division: divide the larger number by the smaller, keep the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF.
Example: GCF(84, 126).
- 126 = 1 × 84 + 42
- 84 = 2 × 42 + 0, so the GCF is 42.
Then use the link between the two:
LCM(84, 126) = 84 × 126 ÷ 42 = 10,584 ÷ 42 = 252.
For three or more numbers, work in pairs: LCM(a, b, c) = LCM(LCM(a, b), c), and the same for the GCF. This is how the calculator handles numbers with up to 60 digits exactly, even when their prime factors are too large to find.
LCM and GCF table
| Numbers | LCM | GCF |
|---|---|---|
| 2 and 3 | 6 | 1 |
| 4 and 6 | 12 | 2 |
| 6 and 8 | 24 | 2 |
| 8 and 12 | 24 | 4 |
| 9 and 12 | 36 | 3 |
| 10 and 15 | 30 | 5 |
| 12 and 15 | 60 | 3 |
| 12 and 18 | 36 | 6 |
| 15 and 20 | 60 | 5 |
| 3, 4 and 5 | 60 | 1 |
| 2 to 10 | 2,520 | 1 |
Where you use them
- Adding fractions. The least common denominator is the LCM of the denominators. To add 5/12 + 7/18, use LCM(12, 18) = 36: 15/36 + 14/36 = 29/36.
- Things that repeat. One bus leaves every 12 minutes and another every 18 minutes. If both leave at 9:00, they next leave together after LCM(12, 18) = 36 minutes, at 9:36.
- Sharing into equal groups. You want to cut ribbons of 24 cm and 36 cm into equal pieces, as long as possible, with nothing left over. The longest piece is GCF(24, 36) = 12 cm.
- Simplifying. Dividing the top and bottom of a fraction, or both sides of a ratio, by their GCF puts it in lowest terms in one step.
Common mistakes
- Multiplying the numbers together. 4 × 6 = 24 is a common multiple, but not the least one. Multiplying only gives the LCM when the numbers share no factor (their GCF is 1).
- Mixing up highest and lowest powers. Highest powers of all primes for the LCM; lowest powers of shared primes for the GCF.
- Using LCM × GCF = product with three numbers. It only holds for two. For 2, 4 and 6 the LCM is 12 and the GCF is 2, so LCM × GCF = 24, but 2 × 4 × 6 = 48.
- Including 0. Every number divides 0, so 0 has no least common multiple with other numbers. Leave it out.
Working with fractions? The fraction calculator finds the common denominator for you. To simplify a ratio such as 12:18, use the ratio calculator, and for division with remainders step by step, try the long division calculator. Everything is calculated in your browser and nothing is uploaded.