calculate gcd of 84 and 126
To calculate the GCD (greatest common divisor), we first decompose the numbers into prime factors.
84 = 22×3×7
126 = 2×32×7
Keep the common prime factors with their smallest exponent.
gcd(84, 126) = 2×3×7 = 42
▶Result:   42