GCF vs LCM: What They Mean and How to Find Them
The GCF is the largest number that divides into two or more numbers exactly, and the LCM is the smallest number they all divide into. For 12 and 18, the GCF is 6 and the LCM is 36 — this guide shows how to find both, and when each one is the right tool.
By Jacob Levy, Founder of FigureQuick.com · Last reviewed 2026-11-19
What the GCF is
The greatest common factor (GCF), also called the highest common factor (HCF) — the two names mean exactly the same thing — is the largest number that divides into each of a set of numbers with no remainder. The factors of 12 are 1, 2, 3, 4, 6, and 12. The factors of 18 are 1, 2, 3, 6, 9, and 18. The factors they share are 1, 2, 3, and 6, and the greatest of those is 6, so the GCF of 12 and 18 is 6. The GCF is the tool for simplifying and for splitting: it reduces a fraction to lowest terms, and it finds the largest equal groups a set of items can be divided into.
There are two reliable ways to find it. Listing the factors works well for small numbers, as above. For larger numbers, prime factorisation is faster: break each number into primes, take the primes they share with the lowest power that appears in both, and multiply. The GCF Calculator does either method for any numbers, and the Common Factor Calculator lists every factor the numbers share, not just the largest.
What the LCM is
The least common multiple (LCM), also called the lowest common multiple, is the smallest number that each of a set of numbers divides into exactly. The multiples of 12 are 12, 24, 36, 48, and so on; the multiples of 18 are 18, 36, 54, and so on. The first multiple they share is 36, so the LCM of 12 and 18 is 36. The LCM is the tool for combining: it gives fractions a common denominator so they can be added or subtracted, and it finds when repeating events line up again.
Prime factorisation finds it too: take each prime that appears in either number, at the highest power it appears in either, and multiply. For 12 = 2² × 3 and 18 = 2 × 3², that gives 2² × 3² = 4 × 9 = 36. The LCM Calculator finds the least common multiple of any numbers.
Worked example: 12 and 18, side by side
Worked example: the GCF and LCM of 12 and 18. The factors of 12 are 1, 2, 3, 4, 6, 12; the factors of 18 are 1, 2, 3, 6, 9, 18. Their shared factors are 1, 2, 3, and 6, so the GCF is 6. Their multiples start 12, 24, 36… and 18, 36…, so the LCM is 36. Notice the relationship: 12 × 18 = 216, and GCF × LCM = 6 × 36 = 216 — for any two numbers, the product of the numbers equals the product of their GCF and LCM. The GCF Calculator and LCM Calculator both reproduce this example.
Worked example: 24 and 36. The factors of 24 are 1, 2, 3, 4, 6, 8, 12, 24; the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36. Their shared factors are 1, 2, 3, 4, 6, and 12, so the GCF is 12. By prime factorisation, 24 = 2³ × 3 and 36 = 2² × 3², so the LCM is 2³ × 3² = 8 × 9 = 72. Check the relationship: 24 × 36 = 864, and 12 × 72 = 864.
When to use the GCF
Use the GCF when something needs to be simplified or split into the largest equal parts. Simplifying a fraction means dividing the top and bottom by their GCF: 18/24 simplifies by dividing both by 6 to 3/4. Splitting 12 apples and 18 oranges into identical bags with nothing left over means bags of 6 — 2 bags of apples and 3 bags of oranges, the most bags possible with equal contents. Reducing a ratio works the same way: 12:18 simplifies by dividing both sides by 6 to 2:3.
Use this calculator with clients → White-label.
When to use the LCM
Use the LCM when things need to be combined or lined up. Adding fractions needs a common denominator, and the LCM is the smallest one that works: 1/6 + 1/8 becomes 4/24 + 3/24 = 7/24, because 24 is the LCM of 6 and 8. Repeating events line up at the LCM too: if one bus comes every 12 minutes and another every 18 minutes, and they leave together now, they leave together again in 36 minutes — the LCM of 12 and 18.
How to remember which is which
The names say it: "greatest common factor" is the greatest of the factors the numbers share, and "least common multiple" is the least of the multiples they share. Two facts keep them straight. First, the GCF is never larger than the smallest number in the set, and the LCM is never smaller than the largest number in the set. Second, for any two numbers, GCF × LCM equals the product of the numbers — a useful check that catches a wrong answer in either one. If your LCM comes out smaller than one of the numbers, or your GCF comes out larger than one of them, the answer is wrong.
Common mistakes
The most common mistake is using one where the other belongs: adding fractions with the GCF as the denominator, or simplifying a fraction with the LCM. The second is stopping at a common factor that is not the greatest — 2 divides into both 12 and 18, but 6 is the greatest, and a fraction divided by 2 alone is not fully simplified. The third is forgetting that the GCF and LCM of a number with itself are just the number, and that the LCM of numbers where one divides the other is the larger one: the LCM of 6 and 12 is 12. Running the numbers through the GCF Calculator or LCM Calculator confirms any answer in seconds.
More help with factors and multiples
The GCF and LCM sit inside the wider toolkit of factors, fractions, and ratios. The Common Factor Calculator lists every shared factor, the Factor Calculator breaks a number into its factors, the Fraction Calculator adds and simplifies fractions, and the Complete Guide to Everyday Math covers the rest of the cluster.
Frequently asked questions
Is the HCF the same as the GCF?
Yes. HCF (highest common factor) and GCF (greatest common factor) are two names for the same thing: the largest number that divides into each of a set of numbers exactly. HCF is the name more often used in the UK and India; GCF is more common in the US.
Can the LCM be smaller than the numbers themselves?
No. The LCM is never smaller than the largest number in the set, because that number must divide into it. The LCM of 12 and 18 is 36, which is larger than both. If your LCM comes out smaller than one of the numbers, the answer is wrong.
What is the GCF of 12 and 18?
6. The factors of 12 are 1, 2, 3, 4, 6, and 12; the factors of 18 are 1, 2, 3, 6, 9, and 18. The factors they share are 1, 2, 3, and 6, and the greatest of those is 6. Their LCM is 36.
How do you find the LCM of three numbers?
Use prime factorisation: take each prime that appears in any of the numbers, at the highest power it appears in any of them, and multiply. For 4, 6, and 8: 4 = 2², 6 = 2 × 3, 8 = 2³, so the LCM is 2³ × 3 = 24. The LCM Calculator finds it for any set of numbers.
