The GCF of 18 and 21 is 3. The LCM of 18 and 21 is 126.
Factors of 18: 1, 2, 3, 6, 9, 18.
Factors of 21: 1, 3, 7, 21.
Common factors: 1 and 3. The greatest of these is 3.
18 = 2 × 3 × 3
21 = 3 × 7
GCF: multiply the prime factors both numbers share: 3 = 3.
LCM: multiply every prime the maximum number of times it appears in either number: 2 × 3 × 3 × 7 = 126.
Divide the larger number by the smaller and repeat with the remainder until it is 0. The last non-zero remainder is the GCF.
The last non-zero remainder is 3, so GCF(18, 21) = 3.
Multiples of 18: 18, 36, 54, 72, 90, 108, 126, 144, ...
Multiples of 21: 21, 42, 63, 84, 105, 126, 147, ...
The first number in both lists is 126.
3 × 126 = 378 = 18 × 21. This always holds for two numbers, so you can find the LCM as (18 × 21) ÷ 3 = 126.
Divide the top and bottom by the GCF 3: 18/21 = 6/7.
| Numbers | GCF | LCM |
|---|---|---|
| 2 and 18 | 2 | 18 |
| 3 and 18 | 3 | 18 |
| 4 and 18 | 2 | 36 |
| 5 and 18 | 1 | 90 |
| 6 and 18 | 6 | 18 |
| 7 and 18 | 1 | 126 |
| 2 and 21 | 1 | 42 |
| 3 and 21 | 3 | 21 |
| 4 and 21 | 1 | 84 |
| 5 and 21 | 1 | 105 |
| 6 and 21 | 3 | 42 |
| 7 and 21 | 7 | 21 |
See also: factors of 18 · factors of 21.
Different numbers? Use the GCF and LCM calculator (any amount of numbers) or browse all GCF and LCM pairs.