LCM and GCF: How to Find Both (and Tell Them Apart)

LCM and GCF are the two number relationships that show up in almost every fraction, factoring, and scheduling problem, and they are easy to mix up because they ask opposite questions. The least common multiple finds the smallest number two values both divide into evenly. The greatest common factor finds the largest number that divides evenly into both. Same numbers, opposite direction.

This guide shows you how to compute each one, why the methods differ, and the shortcut that ties them together.

⚡Quick Answer: The GCF is the largest number that divides evenly into two or more numbers. The LCM is the smallest number that both numbers divide into evenly. For any two positive integers, GCF times LCM equals the product of the two numbers, so you can always find one from the other.

Table of Contents

What LCM and GCF Actually Mean

Before the methods, pin down the definitions, because the wording is where most mistakes start.

The greatest common factor (also called GCD, greatest common divisor, or HCF, highest common factor) is the biggest whole number that divides both numbers with no remainder. For 12 and 18, the factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18. The largest shared value is 6, so GCF(12, 18) = 6.

The least common multiple is the smallest number that is a multiple of both. Multiples of 12 run 12, 24, 36, 48 and multiples of 18 run 18, 36, 54. The first overlap is 36, so LCM(12, 18) = 36.

Notice the direction of each question. GCF looks down into the numbers to their shared building blocks. LCM looks up and out to the first place their multiples meet.

A quick sanity check: the GCF is always less than or equal to the smaller number, and the LCM is always greater than or equal to the larger number. If your answer breaks either rule, you have made an arithmetic slip.

lcm gcf illustration

How to Find the GCF

There are three reliable routes, and the right one depends on how big the numbers are.

Method 1: List the factors

Write out every factor of each number and circle the largest shared one. This works well for numbers under about 50 because the lists stay short. It is the method most people meet first in school, and it builds intuition for what a factor actually is.

Method 2: Prime factorization

Break each number into primes, then take the primes that appear in both factorizations, each raised to the lowest power it appears. For 24 and 36:

  • 24 = 2³ × 3
  • 36 = 2² × 3²

The shared primes are 2 and 3. Take the lower power of each: 2² × 3 = 12. So GCF(24, 36) = 12. This method scales to three or more numbers, which the listing approach does not.

Method 3: The Euclidean algorithm

For large numbers, repeated division beats factoring every time. Divide the larger number by the smaller, then replace the pair with the divisor and the remainder, and repeat until the remainder is zero. The last nonzero remainder is the GCF.

For 252 and 105: 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The GCF is 21. This is the standard algorithm in computer science because it stays fast even for enormous inputs, and it is described in detail on Wikipedia’s Euclidean algorithm page.

The Euclidean algorithm is the most efficient of the three, but prime factorization is easier to check by hand. Pick whichever matches the size of your numbers.

How to Find the LCM

The LCM has its own set of methods, and the prime factorization version is the mirror image of the GCF one.

Method 1: List the multiples

Write the multiples of each number until you hit the first shared value. Fast for small numbers, tedious for anything large, and prone to skipped terms if you rush.

Method 2: Prime factorization

This time, take every prime that appears in either factorization, each raised to the highest power it appears. For 24 and 36:

  • 24 = 2³ × 3
  • 36 = 2² × 3²

Take the highest power of each prime: 2³ × 3² = 8 × 9 = 72. So LCM(24, 36) = 72.

The contrast is the whole lesson. GCF takes shared primes at their lowest power. LCM takes all primes at their highest power. Same factorization, opposite selection rule.

Method 3: Use the GCF shortcut

Because GCF × LCM equals the product of the two numbers, you can compute one from the other:

LCM(a, b) = (a × b) ÷ GCF(a, b)

For 24 and 36: (24 × 36) ÷ 12 = 864 ÷ 12 = 72, which matches the factorization result. This shortcut only holds for two numbers. For three or more, you have to chain it pairwise or fall back to prime factorization.

Pro Tip: If you can already find the GCF quickly with the Euclidean algorithm, the shortcut gives you the LCM in one extra multiplication and division. That combination is usually faster than factoring both numbers from scratch.

LCM vs GCF: Side-by-Side Comparison

Here is the difference laid out in one place.

FeatureGCF (Greatest Common Factor)LCM (Least Common Multiple)
Question it answersLargest number dividing both evenlySmallest number both divide into evenly
DirectionDown into shared factorsUp to the first shared multiple
Prime ruleShared primes, lowest powerAll primes, highest power
Size relative to inputs≤ the smaller number≥ the larger number
Typical useSimplifying fractions, factoringCommon denominators, repeating events
Two-number shortcutGCF = (a × b) ÷ LCMLCM = (a × b) ÷ GCF
Edge caseGCF of coprime numbers is 1LCM of coprime numbers is a × b

The table also reveals a useful pattern. When two numbers share no factors (they are coprime), the GCF is 1 and the LCM is simply their product. For example, GCF(7, 9) = 1 and LCM(7, 9) = 63.

That side-by-side view makes the choice obvious once you know what the problem is asking.

When to Use Each One

The two tools solve different real problems, and picking the wrong one is the most common error.

Use the GCF when you are reducing or splitting. Simplifying 18/24 means dividing top and bottom by GCF(18, 24) = 6, giving 3/4. Cutting a 24-inch by 36-inch board into the largest identical square tiles means each tile is 12 inches, the GCF. Any time the question is “what is the biggest equal piece,” reach for the GCF.

Use the LCM when you are combining or aligning. Adding 1/6 + 1/8 needs a common denominator of LCM(6, 8) = 24, giving 4/24 + 3/24 = 7/24. Two buses that leave every 12 and 18 minutes will next depart together after LCM(12, 18) = 36 minutes. Any time the question is “when do these line up again” or “what is the smallest shared unit,” reach for the LCM.

A simple heuristic: splitting into pieces means GCF, combining into a shared unit means LCM.

Key Takeaways

  • The GCF is the largest shared divisor; the LCM is the smallest shared multiple. They answer opposite questions about the same numbers.
  • Prime factorization unifies both: use shared primes at their lowest power for GCF, all primes at their highest power for LCM.
  • For two numbers, GCF × LCM = a × b, so you can always derive one from the other.
  • The Euclidean algorithm finds the GCF of large numbers quickly without factoring.
  • Choose GCF for simplifying and splitting, LCM for common denominators and repeating events.

Frequently Asked Questions

Q: What is the difference between LCM and GCF?
A: The GCF is the largest number that divides two numbers evenly, while the LCM is the smallest number that both divide into evenly. GCF moves down into shared factors; LCM moves up to the first shared multiple.

Q: Can the LCM and GCF be the same number?
A: Only when the two numbers are equal. For 8 and 8, both the GCF and the LCM are 8. For any two different numbers, the LCM is larger than the GCF.

Q: How do you find the GCF of three numbers?
A: Use prime factorization. List all three factorizations, then take only the primes common to all three, each at its lowest power. The listing method gets unwieldy past two numbers, so factorization is the practical choice.

Q: Is the GCF always 1 for prime numbers?
A: Yes, for two different primes. The only factors of a prime are 1 and itself, so two distinct primes share only the factor 1. Their LCM is then the product of the two primes.

Q: What is the LCM of 0 and another number?
A: The LCM involving 0 is defined as 0, because every multiple of 0 is 0. The GCF of 0 and any positive number is that number, since every positive integer divides 0 evenly. Most textbook problems avoid 0 for this reason.

Q: How is the Euclidean algorithm used to find the GCF?
A: Divide the larger number by the smaller, then repeatedly divide the divisor by the remainder until the remainder is zero. The last nonzero remainder is the GCF. It works without factoring, which makes it fast for large numbers.

References & Further Reading

How this article was created: Drafted with the assistance of AI tools to provide a clear, structured overview of this topic.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top