Compute GCD & LCM

Step through prime factorizations to reveal the greatest common divisor and least common multiple.

  • number-theory
  • visual-models
  • gcd
  • lcm
Subject
Math
Difficulty
Medium
Duration
6 min
Ages
10-14

Select inputs and the algorithm, then press Start to reveal each step.

Show the GCD via

Instructions

  1. Type two positive numbers into the inputs.
  2. Press Start to break each number into prime pieces.
  3. Watch the primes stack in columns. Matching colors show which building blocks both numbers share.
  4. Stage 3 multiplies the shared primes to build the GCD. Stage 4 multiplies all the primes to build the LCM.
  5. Press Start again to try a new pair.

Learning Notes

Greatest common divisors and least common multiples are really just about sharing building blocks.

  • Every whole number can be broken into primes. That’s why we start there.
  • The GCD uses only the primes both numbers have in common.
  • The LCM uses the shared primes plus any leftovers so both numbers can “fit” inside one new number.

Make up stories to match your numbers: “What could two kids be skip-counting if their steps have a GCD of 4?”