Skip to content

GCF and LCM Explained: How to Find Each and When to Use Them

By Sprout Calculator Editorial Team Bylines · Published November 5, 2026 · Updated November 6, 2026

GCF and LCM answer opposite questions. The greatest common factor (GCF) is the largest number that divides all your numbers; the least common multiple (LCM) is the smallest number they all divide into. Find either with prime factorization: for the GCF keep shared primes at the lowest power, and for the LCM keep every prime at the highest power.

What are the GCF and the LCM?

The GCF and the LCM are two ways to describe what a group of whole numbers have in common. The greatest common factor is the biggest number that divides all of them with no remainder. The least common multiple is the smallest number that all of them divide into evenly.

Take 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. The biggest shared factor is 6. The multiples of 12 are 12, 24, 36. The multiples of 18 are 18, 36, 54. The first shared multiple is 36. So GCF(12, 18) = 6 and LCM(12, 18) = 36.

You can check any result with the GCF calculator or the LCM calculator.

How do you find the GCF?

You can find the GCF by listing factors, by prime factorization, or with Euclid's method. Listing works for small numbers. Prime factorization works for any size and shows why the answer is right. Euclid's method is the fastest by hand when numbers are large.

Method 1: list the factors. Write all factors of each number and pick the biggest one they share. For 48 and 36, the common factors are 1, 2, 3, 4, 6 and 12, so the GCF is 12.

Method 2: prime factorization. Write each number as a product of primes. Keep the primes both numbers share, each at its lowest power, and multiply. Here 48 = 2⁴ × 3 and 36 = 2² × 3². The shared part is 2² × 3 = 12.

Method 3: Euclid's method. Divide the larger number by the smaller, keep the remainder, and repeat with the smaller number and the remainder until the remainder is zero. The last non-zero remainder is the GCF.

For 252 and 105:

  1. 252 = 2 × 105 + 42
  2. 105 = 2 × 42 + 21
  3. 42 = 2 × 21 + 0

The last non-zero remainder is 21, so the GCF is 21. If you check with primes, 252 = 2² × 3² × 7 and 105 = 3 × 5 × 7, which share 3 × 7 = 21.

How do you find the LCM?

You can find the LCM by listing multiples, by prime factorization, or by using the GCF. Listing is simplest for small numbers. Prime factorization scales to any set. The GCF shortcut is quick for two numbers.

Method 1: list the multiples. Write multiples of each number until one appears in every list. For 4 and 6, the multiples of 4 are 4, 8, 12 and of 6 are 6, 12. The LCM is 12.

Method 2: prime factorization. Write each number as primes. Keep every prime that appears, at its highest power, and multiply. For 6, 8 and 15, we have 2 × 3, 2³ and 3 × 5. The highest powers are 2³, 3 and 5, so the LCM is 8 × 3 × 5 = 120.

Method 3: use the GCF. For two numbers:

lcm⁡(a,b)=a×bgcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{a \times b}{\gcd(a, b)}

For 12 and 18, the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 36. This only works for two numbers at a time. For three numbers, apply it twice.

For any two positive whole numbers, the GCF times the LCM equals the product of the numbers. This gives you a quick check and a way to find one value from the other.

gcd⁡(a,b)×lcm⁡(a,b)=a×b\gcd(a, b) \times \operatorname{lcm}(a, b) = a \times b

Test it on 12 and 18: 6 × 36 = 216, and 12 × 18 = 216. If you know the GCF is 4 and the numbers are 20 and 28, the LCM must be 20 × 28 ÷ 4 = 140.

The relationship is not true for three or more numbers. Use prime factorization there.

When should you use the GCF and when the LCM?

Use the GCF when you break things down into equal groups or reduce something. Use the LCM when you build up to a common size or wait for repeating events to line up. Reading the problem for these clues saves a lot of guessing.

GCF clues: "greatest number of equal groups," "largest piece that fits evenly," "simplify the fraction," "no leftovers."

LCM clues: "when will they meet again," "smallest number that both divide into," "common denominator," "repeats every."

A florist has 24 roses and 36 tulips. She wants identical bouquets with no flowers left over. The most bouquets is the GCF of 24 and 36, which is 12. Each bouquet has 2 roses and 3 tulips.

Two lights blink, one every 8 seconds and one every 12 seconds. They blink together now. They will blink together again after the LCM of 8 and 12, which is 24 seconds.

How do the GCF and LCM help with fractions?

The GCF simplifies a fraction in one step, and the LCM gives the least common denominator for adding or subtracting. These two uses are the reason most students meet these ideas.

Simplify with the GCF. To reduce 42/56, find the GCF of 42 and 56, which is 14. Divide both by 14 to get 3/4.

Add with the LCM. To add 5/12 and 7/18, find the LCM of 12 and 18, which is 36. Rewrite 5/12 as 15/36 and 7/18 as 14/36. The sum is 29/36. Since 29 is prime and does not divide 36, no further simplifying is possible.

For more on ratios and scaling, see our guide to converting units with ratios.

How do word problems use the GCF and LCM?

Use the GCF when you split things into equal groups, and use the LCM when you wait for events to line up.

GCF example. A baker has 48 cookies and 36 brownies. She wants identical packs with nothing left over. The GCF of 48 and 36 is 12, so she can make 12 packs. Each pack has 4 cookies and 3 brownies.

LCM example. One bus leaves a stop every 12 minutes, and another leaves every 18 minutes. They leave together at noon. The LCM of 12 and 18 is 36, so they leave together again at 12:36.

How do you find them for three numbers?

Use prime factorization. For the GCF, keep primes common to all three numbers with the smallest exponents. For the LCM, keep every prime with the largest exponent.

For 12, 18 and 30:

  • 12 = 2² × 3
  • 18 = 2 × 3²
  • 30 = 2 × 3 × 5

The GCF is 2 × 3 = 6. The LCM is 2² × 3² × 5 = 180. You can check both with the GCF calculator and the LCM calculator. For the factoring method, see prime factorization made simple.

What are the most common mistakes?

Most errors come from mixing the two ideas up or from stopping too early.

  • Using the lowest power for the LCM. The LCM takes the highest power of each prime. The GCF takes the lowest power of the shared primes.
  • Including primes that are not shared in the GCF. A prime must divide every number to count.
  • Multiplying the numbers together and calling it the LCM. That gives a common multiple, but usually not the least.
  • Stopping at a common factor that is not the greatest. Check that nothing larger divides both.
  • Forgetting that the GCF can be 1. When numbers share no primes, they are coprime and the LCM equals the product.

If you want to see every factor and prime, try the factor calculator. Working through your own examples by hand and then checking them is the fastest way to build the habit.

FAQ

Frequently asked questions

01Is the GCF always smaller than the LCM?

The GCF is less than or equal to every number in the list, and the LCM is greater than or equal to every number. So the GCF is always less than or equal to the LCM. They are equal only when all the numbers in the list are identical.

02How do I know whether a word problem needs the GCF or the LCM?

If you are splitting things into equal groups or cutting something into equal pieces, think GCF. If you are waiting for repeating events to line up, or looking for a common size to build up to, think LCM. Splitting goes down, lining up goes up.

03Can the GCF of two numbers be one of the numbers?

Yes. If one number divides the other, the smaller number is the GCF. For 6 and 18, the GCF is 6. In the same case, the LCM is the larger number, which is 18 here.

04How do I know whether a word problem wants the GCF or the LCM?

Ask if the problem is about splitting things up or waiting for things to line up. Splitting items into the largest equal groups, or cutting into the largest equal pieces, needs the GCF. Finding when two schedules next match, or the smallest amount both packs fit, needs the LCM.

05How are the GCF and LCM related?

For two numbers, GCF × LCM equals the product of the numbers. For 12 and 18, the GCF is 6 and the LCM is 36, and 6 × 36 = 216 = 12 × 18. So once you know one, you can find the other by division.