← Back to all activities한국어 → 📖 Read the article
🔗 GCD & LCM Lab

Divisors and multiples of two numbers —
let's find where they overlap

Change the two numbers with the sliders (1–50). The largest number that appears in both numbers' divisor lists is called the greatest common divisor (GCD). The smallest number that appears in both numbers' multiple lists is called the least common multiple (LCM). Try finding both, two different ways, below.

How it works
  1. Write out every divisor (a number that divides evenly) of A and B. The largest number that appears in both lists is the GCD.
  2. Write out the multiples of A and B (1×, 2×, 3×…) in increasing order. The smallest number that appears in both lists is the LCM.
  3. There's a faster way too. Prime factorization means writing a number as a product of primes (e.g. 12 = 2×2×3). The small number written above and to the right showing how many times the same prime is multiplied is called the exponent (2×2 = 2², "2 has exponent 2"). Multiply the primes common to both numbers using the smaller exponent to get the GCD; multiply every prime that appears in either number using the larger exponent to get the LCM.
  4. Interestingly, GCD × LCM always equals A × B. Both methods give the same answer, so try changing the sliders and comparing them.
Number A12
Number B18
Method 1 — listing divisors (purple = divisor of both numbers)
Method 1 — listing multiples (purple = multiple of both numbers)
GCD
6
LCM
36
Method 2 — via prime factorization
💡 What's an exponent? The small number written up top shows how many times the same number is multiplied. 2² = 2×2 = 4.
A = 2² × 3
B = 2 × 3²
Common primes (smaller exponent) → GCD2 × 3 = 6
All primes (larger exponent) → LCM2² × 3² = 36