Separate the numbers with commas or spaces.
LCM and GCF are the two number facts students mix up most often, and the confusion is understandable: both come from the same prime factors, but they point in opposite directions. This guide shows how to find each one, gives you a reliable method for both, and explains the one relationship that lets you check your work every time.
Quick Answer: The GCF (greatest common factor) is the largest number that divides evenly into two or more numbers. The LCM (least common multiple) is the smallest number that both numbers divide into evenly. For any two positive integers, GCF × LCM equals the product of the two numbers.
Table of Contents
LCM vs GCF: The Core Difference in Plain Terms
Think of the GCF as what two numbers share, and the LCM as the first place two numbers meet.
The greatest common factor of 12 and 18 is 6, because 6 is the biggest number that goes into both without a remainder. The least common multiple of 12 and 18 is 36, because 36 is the smallest number that both 12 and 18 divide into cleanly.
That single example captures the whole idea: the GCF is always smaller than or equal to the numbers themselves, while the LCM is always greater than or equal to them. If your answer breaks that rule, something went wrong.
GCF is sometimes called GCD (greatest common divisor) or HCF (highest common factor). They mean the same thing, which is worth knowing if a textbook or a calculator uses different letters.
The shared-source idea is the key: both values are built from the same prime factors, just assembled differently.

How to Find the GCF
The most reliable method is prime factorization, and it works for any set of numbers, not just pairs.
Step by step with prime factorization
- Break each number into its prime factors.
- List the primes they have in common, matching the smallest power of each.
- Multiply those shared primes together.
For 24 and 36: 24 = 2³ × 3, and 36 = 2² × 3². The shared primes are 2² and 3, so the GCF is 4 × 3 = 12.
A faster method for two numbers: Euclid’s algorithm
Subtract repeatedly (or divide and take remainders) until you hit zero. For 48 and 18: 48 ÷ 18 leaves 12, 18 ÷ 12 leaves 6, 12 ÷ 6 leaves 0. The last nonzero remainder, 6, is the GCF. This method is efficient for large numbers where factoring by hand gets tedious.
When the GCF is just 1
If two numbers share no prime factors, their GCF is 1. Numbers like 9 and 20 are called coprime or relatively prime, and this shows up constantly in fraction simplification and modular arithmetic.
Prime factorization is slower to write but easier to trust; Euclid’s algorithm is faster but only handles two numbers at a time.
How to Find the LCM
There are three common routes to the LCM, and the best one depends on the size of the numbers.
Listing multiples (good for small numbers)
Write out multiples of each number until you find the first match. For 6 and 8: 6, 12, 18, 24 and 8, 16, 24. The LCM is 24. This is intuitive but gets unwieldy fast.
Prime factorization (works for any set)
Take the highest power of every prime that appears in either number. For 12 and 18: 12 = 2² × 3 and 18 = 2 × 3². The highest powers are 2² and 3², so the LCM is 4 × 9 = 36.
Notice how this mirrors the GCF method exactly, except you take the largest powers instead of the smallest. That contrast is the single most useful thing to remember.
The GCF shortcut
For two numbers, multiply them and divide by their GCF:
LCM(a, b) = (a × b) ÷ GCF(a, b)
For 12 and 18: (12 × 18) ÷ 6 = 216 ÷ 6 = 36. This is often the fastest route once you already have the GCF, and it gives you a built-in check.
Pro Tip: This shortcut only holds for two numbers. For three or more, the formula breaks down, so use prime factorization instead.
Side-by-Side Comparison
| Feature | GCF | LCM |
|---|---|---|
| Full name | Greatest common factor | Least common multiple |
| What it finds | Largest shared divisor | Smallest shared multiple |
| Size relative to inputs | Smaller than or equal to | Larger than or equal to |
| Prime factor rule | Lowest powers of shared primes | Highest powers of all primes |
| Typical use | Simplifying fractions | Adding fractions, scheduling |
| For 12 and 18 | 6 | 36 |
The table makes the inverse relationship obvious: same inputs, opposite selection rules.
Where Each One Actually Gets Used
These are not abstract exercises. Each value solves a specific kind of real problem.
GCF for simplifying fractions. Reducing 18/24 means dividing top and bottom by their GCF, 6, which gives 3/4. Without the GCF you might reduce in several steps and still wonder whether you are done.
LCM for adding fractions with different denominators. To add 1/4 and 1/6, you need a common denominator, and the least common denominator is the LCM of 4 and 6, which is 12.
LCM for scheduling and repeating events. If one bus leaves every 12 minutes and another every 18 minutes, they coincide every 36 minutes, the LCM. The same logic handles gear rotations, blinking lights, and recurring maintenance cycles.
GCF for splitting things evenly. Dividing 24 pencils and 36 erasers into identical kits with nothing left over means making 12 kits, the GCF.
If you remember nothing else, remember this: GCF simplifies, LCM combines.
The Relationship That Checks Your Work
For any two positive integers, the GCF times the LCM equals the product of the numbers.
Test it on 12 and 18: 6 × 36 = 216, and 12 × 18 = 216. It holds.
This gives you a free error check. If you calculate either value and the product does not match, one of them is wrong. It also means you never need to compute both from scratch: find one, then divide the product by it to get the other.
The relationship is a standard result covered in elementary number theory, and it follows directly from how the prime factorizations overlap.
Key Takeaways
- The GCF is the largest shared divisor; the LCM is the smallest shared multiple.
- Both come from prime factorizations: GCF uses the lowest powers of shared primes, LCM uses the highest powers of all primes.
- For two numbers, GCF × LCM = a × b, which gives you a built-in accuracy check.
- Use the GCF to simplify fractions and split items evenly; use the LCM to find common denominators and schedule repeating events.
- Euclid’s algorithm finds the GCF of two large numbers faster than factoring by hand.
Frequently Asked Questions
Q: What is the difference between LCM and GCF?
A: The GCF is the biggest number that divides evenly into both numbers, while the LCM is the smallest number both numbers divide into evenly. The GCF is always less than or equal to the inputs; the LCM is always greater than or equal to them.
Q: Can the GCF ever be larger than the LCM?
A: No. For positive integers, the GCF is at most the smaller number and the LCM is at least the larger number, so the GCF can never exceed the LCM. They are equal only when both numbers are the same.
Q: How do I find the LCM of three numbers?
A: Use prime factorization: write each number as a product of primes, then take the highest power of every prime that appears in any of them and multiply. The GCF shortcut does not work for three or more numbers.
Q: What is the GCF of two numbers that share no factors?
A: It is 1. Such numbers are called coprime or relatively prime. For example, 8 and 15 share no prime factors, so their GCF is 1 and their LCM is their product, 120.
Q: Why does GCF × LCM equal the product of the two numbers?
A: Each prime’s exponent in the GCF is the smaller of its two exponents, and in the LCM it is the larger. Adding the smaller and larger exponent gives the sum of the two original exponents, so the two values multiply back to the original product.
Q: Is GCF the same as GCD and HCF?
A: Yes. Greatest common factor, greatest common divisor, and highest common factor all name the same value. Different textbooks and regions favor different terms.
References & Further Reading
Further reading: LCMC Health System on Wikipedia
- Khan Academy: Greatest common factor explained
- Khan Academy: Least common multiple
- Math is Fun: Greatest Common Factor
- Math is Fun: Least Common Multiple
- Wolfram MathWorld: Greatest Common Divisor
How this article was created: Drafted with the help of AI, then fact-checked and edited by Muhammad Zeeshan Malik before publication.