GCF Calculator · Practical guide
GCF and LCM Relationship
For any two numbers, the GCF multiplied by the LCM equals the product of the two numbers.
At a glance
The Key Identity
For any two positive integers, GCF × LCM = a × b. The greatest common factor and the least common multiple always multiply to give the product of the original numbers. Find the GCF with the calculator above, and the LCM falls out for free: LCM = (a × b) ÷ GCF.
Interactive tool
GCF Calculator
Enter your own values, then compare the result with the examples below.
Results
Worked Example: 12 and 18
The GCF of 12 and 18 is 6. Applying the identity: LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36. Check by listing: multiples of 12 are 12, 24, 36, 48..., and multiples of 18 are 18, 36, 54... — the first shared multiple is indeed 36.
Why the Identity Holds
Every prime factor appears in each number with some exponent. The GCF takes the minimum exponent of each prime, and the LCM takes the maximum. Since min + max accounts for all the exponents across both numbers, multiplying GCF and LCM recombines exactly the primes in a × b.
More Examples
| Numbers | GCF | Product | LCM |
|---|---|---|---|
| 12, 18 | 6 | 216 | 36 |
| 8, 14 | 2 | 112 | 56 |
| 15, 25 | 5 | 375 | 75 |
| 7, 9 | 1 | 63 | 63 |
A Warning About Three Numbers
The identity GCF × LCM = product holds exactly for two numbers only. For three or more numbers the relationship breaks down, so compute the LCM of larger sets separately rather than relying on the shortcut.
Frequently Asked Questions
What is the LCM if the GCF is 1?
When two numbers are coprime, their LCM is simply their product. For example, 7 and 9 share no factors, so their LCM is 63.
Can two numbers have the same GCF and LCM?
Only if the two numbers are equal. Identical numbers share all factors, so both the GCF and the LCM equal the number itself.
Which is bigger, the GCF or the LCM?
The LCM is always at least as large as the biggest number, while the GCF is at most as large as the smallest number. So the LCM is greater unless the numbers are identical.
Why is the GCF useful for simplifying fractions?
Dividing the numerator and denominator by their GCF reduces a fraction to lowest terms in one step. For example, 18/24 divided by GCF 6 becomes 3/4.