Math Fundamentals18 sections · 814 units
Open in Course

Computing LCM from GCD

The formula

There is a direct relationship: gcd(a, b) × lcm(a, b) = a × b. Rearrange to get lcm(a, b) = (a × b) / gcd(a, b).

Example: gcd(12, 18) = 6. Then lcm(12, 18) = (12 × 18) / 6 = 216 / 6 = 36.

Never compute LCM by listing multiples. Always use this formula after computing GCD with Euclidean algorithm.