← All Calculators

GCF & LCM Calculator

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two or more integers.

GCF & LCM formulas

GCF (prime factors)Multiply the common primes, each to its lowest power
LCM (prime factors)Multiply every prime, each to its highest power
ShortcutLCM(a, b) = a × bGCF(a, b)
Euclidean algorithmGCF(a, b) = GCF(b, a mod b), until the remainder is 0

Worked examples

  1. Find the GCF and LCM of 48 and 180.

    1. 48 = 24 × 3, 180 = 22 × 32 × 5
    2. GCF = 22 × 3 = 12
    3. LCM = 24 × 32 × 5 = 720 (check: 48 × 180 ÷ 12 = 720)

    Answer: GCF = 12, LCM = 720

  2. Euclidean algorithm for GCF(180, 48).

    1. 180 = 3 × 48 + 36
    2. 48 = 1 × 36 + 12
    3. 36 = 3 × 12 + 0 → stop

    Answer: GCF = 12

  3. Buses leave every 12 and 18 minutes. When do they next leave together?

    1. LCM(12, 18) = 36

    Answer: In 36 minutes

Tips & common mistakes

  • GCF simplifies fractions; LCM finds common denominators.