GCF and LCM calculator

For 12, 18 and 30 the GCF is 6 and the LCM is 180. Enter two or more whole numbers.

GCF 6 · LCM 180
for 12, 18, 30
6greatest common factor
180least common multiple
2 × 3GCF factorized
22 × 32 × 5LCM factorized
NumberPrime factorization
1222 × 3
182 × 32
302 × 3 × 5

GCF = product of the lowest power of each shared prime. LCM = product of the highest power of every prime that appears.

Using prime factorization

12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. The GCF takes the lowest power of primes that appear in every number: 2 × 3 = 6. The LCM takes the highest power of every prime: 2² × 3² × 5 = 180.

GCF(a, b) × LCM(a, b) = a × b

GCF and LCM of common pairs

NumbersGCFLCM
4, 6212
6, 8224
8, 12424
9, 12336
12, 15360
12, 16448
15, 20560
16, 24848
18, 24672
24, 361272
7, 9163

Frequently asked questions

What is the GCF used for?
Simplifying fractions and splitting things into equal groups.
What is the LCM used for?
Finding a common denominator and working out when repeating events line up.