The Relationship Between GCD and LCM
There is one relationship between the GCD and the LCM that is worth memorising, and it is not true for any other pair of quantities you are likely to meet. Their product always equals the product of the original numbers.
Skip the manual math. Enter your numbers and get the answer instantly.
Try the GCD and LCM CalculatorThe Identity
GCD times LCM equals the product of the two numbers. For 12 and 18 the GCD of 6 and the LCM of 36 multiply to 216, and 12 times 18 is 216.
Using It as a Check
Once you have both answers, multiply them and compare with the product of your inputs. If they agree, both are almost certainly correct. This is a free check requiring no extra working.
Why It Holds
The GCD holds the shared prime powers at their minimum and the LCM holds them at their maximum. In each prime, the minimum plus the maximum equals the sum of the original exponents, so the products match term by term.
It Gives the LCM for Free
Rearranged, the LCM is the product divided by the GCD. That is exactly the formula used to compute it, and the identity explains why the formula is correct rather than merely convenient.
It Does Not Extend to Three Numbers
For a list, the GCD and LCM folded together do not simply multiply back to the total product. Fold pairwise and check each step with the two number identity instead.
The Relatively Prime Case
When the GCD is 1 the identity collapses to LCM equals the product, which is the definition of relatively prime numbers: they share nothing, so the smallest common multiple is simply everything multiplied together.
Worked Example
For 9 and 12, GCD 3 times LCM 36 equals 108, and 9 times 12 is also 108. When the numbers are relatively prime the GCD is 1 and the LCM is just the product.
More GCD and LCM Calculator Guides
Last updated: · by CalculatorPro Tools