How it works
The greatest common divisor (also called the greatest common factor) of two numbers is the largest number that divides both. Two methods:
Prime factorization: take each shared prime to its smallest power. 48 = 2⁴ × 3 and 180 = 2² × 3² × 5 share 2² × 3 = 12.
Euclidean algorithm: gcd(a, b) = gcd(b, remainder of a ÷ b). Repeat until the remainder is 0. It is much faster for big numbers.
For any two positive integers,
gcd(a, b) × lcm(a, b) = a × b
If gcd(a, b) = g, you can write a = gm and b = gn where m and n share no factors. This is the standard setup for "two numbers have GCD 12 and…" problems.
Greatest Common Divisor practice problems with solutions
These problems come from Mathyessy's question bank. Try each one before opening the solution.
What is GCD of 48 and 180?
Show answer and solution
Answer: 12
48 = 2⁴ × 3 and 180 = 2² × 3² × 5. The smallest shared powers are 2² × 3 = 12.
What is the GCD of 108 and 144?
Show answer and solution
Answer: 36
Euclidean algorithm: 144 − 108 = 36, and 108 = 3 × 36 with remainder 0. So the GCD is 36.
Two numbers have GCD 8 and LCM 96. If one number is 24, what is the other number?
Show answer and solution
Answer: 32
GCD × LCM = product, so 8 × 96 = 768 = 24 × (other). The other number is 768 ÷ 24 = 32.
Two numbers sum to 60 and their GCD is 12. Neither number equals 12. What is the product of the two numbers?
Show answer and solution
Answer: 864
Write the numbers as 12m and 12n with m and n sharing no factor. Then m + n = 5. The options are 1 + 4 (gives 12, not allowed) or 2 + 3, so the numbers are 24 and 36 and their product is 864.
Keep going
Related topics
All Number Theory topics · Contest math practice by topic · MATHCOUNTS practice · AMC 8 practice