GCF AND LCM

Number sense guide

GCF and LCM

Four ways to find the greatest common factor and the least common multiple, the shortcut that connects them, and a simple test for which one a word problem is asking for.

Updated

11 min read

Quick answer

The GCF (greatest common factor) is the largest number that divides two numbers evenly, and the LCM (least common multiple) is the smallest number both divide into. For 12 and 18, the GCF is 6 and the LCM is 36. The fastest reliable method is prime factorization: multiply the shared primes at their lowest powers for the GCF, and every prime at its highest power for the LCM.

What Are the GCF and LCM?

A factor of a number divides it with no remainder: the factors of 12 are 1, 2, 3, 4, 6 and 12. A multiple is what you get when you multiply the number by 1, 2, 3 and so on: the multiples of 12 are 12, 24, 36, 48 and onward. Factors are never bigger than the number; multiples are never smaller.

  • Greatest common factor (GCF): the largest factor two or more numbers share. It is also called the greatest common divisor (GCD) or highest common factor (HCF).
  • Least common multiple (LCM): the smallest positive number that is a multiple of every number in the set. It is also called the lowest common multiple.

A quick sanity check: the GCF can never be bigger than the smallest number, and the LCM can never be smaller than the biggest number. For 12 and 18, the GCF of 6 is at most 12, and the LCM of 36 is at least 18.

GCFLCM
Built fromFactors (numbers that divide in)Multiples (numbers they divide into)
SizeAt most the smallest numberAt least the largest number
12 and 18636
Main useSimplifying fractions, splitting into equal groupsCommon denominators, finding when events line up

Method 1: List the Factors and Multiples

Listing is the easiest method to understand and works well for numbers up to about 50.

GCF of 12 and 18 by listing. The factors of 12 are 1, 2, 3, 4, 6, 12. The factors of 18 are 1, 2, 3, 6, 9, 18. The common factors are 1, 2, 3 and 6, and the greatest is 6. Write factors in pairs (1 × 12, 2 × 6, 3 × 4) so you do not miss any.

LCM of 12 and 18 by listing. The multiples of 12 are 12, 24, 36, 48. The multiples of 18 are 18, 36, 54. The first number on both lists is 36. A shortcut: list multiples of the larger number only (18, 36, 54) and stop at the first one the smaller number divides.

Method 2: Prime Factorization

For bigger numbers, break each one into primes first. Then one rule gives both answers:

  • GCF: multiply the primes the numbers share, each at its lowest power.
  • LCM: multiply every prime that appears, each at its highest power.

Example: 48 and 180. 48 = 24 × 3, and 180 = 22 × 32 × 5. The shared primes are 2 and 3, at lowest powers 22 and 31, so the GCF is 4 × 3 = 12. Every prime at its highest power is 24 × 32 × 5, so the LCM is 16 × 9 × 5 = 720.

To find the primes, use a factor tree: split the number into any two factors, then keep splitting until every branch ends in a prime. 48 splits into 6 × 8, then 2 × 3 and 2 × 4, then 2 × 2, leaving 2 × 2 × 2 × 2 × 3.

NumbersPrime factorsGCFLCM
12 and 1822 × 3 and 2 × 322 × 3 = 622 × 32 = 36
24 and 3623 × 3 and 22 × 3222 × 3 = 1223 × 32 = 72
48 and 18024 × 3 and 22 × 32 × 522 × 3 = 1224 × 32 × 5 = 720
84 and 12622 × 3 × 7 and 2 × 32 × 72 × 3 × 7 = 4222 × 32 × 7 = 252

Method 3: The Ladder (Cake) Method

The ladder method finds both answers at once and is popular in middle school. Write the numbers side by side, and keep dividing both by a prime that goes into both of them.

Example: 24 and 36. Both divide by 2, giving 12 and 18. Both divide by 2 again, giving 6 and 9. Both divide by 3, giving 2 and 3. Now nothing divides both, so stop. The primes down the left side are 2, 2 and 3.

  • GCF = the numbers down the left side multiplied: 2 × 2 × 3 = 12.
  • LCM = the left side times the numbers left at the bottom: 2 × 2 × 3 × 2 × 3 = 72. The shape of the multiplication looks like an L, which is an easy way to remember it.

Method 4: Euclid’s Algorithm for Big Numbers

For large numbers, factoring is slow. Euclid’s algorithm, more than 2,000 years old, finds the GCF with nothing but division. Divide the larger number by the smaller, keep the remainder, then divide the previous divisor by that remainder. Repeat until the remainder is 0. The last non-zero remainder is the GCF.

Example: GCF of 1071 and 462.

  1. 1071 ÷ 462 = 2 remainder 147.
  2. 462 ÷ 147 = 3 remainder 21.
  3. 147 ÷ 21 = 7 remainder 0. The last non-zero remainder is 21, so the GCF is 21.

Three divisions instead of factoring two four-digit numbers. Spreadsheets use the same idea: in Excel and Google Sheets, =GCD(1071, 462) returns 21 and =LCM(1071, 462) returns 23562.

The GCF × LCM Shortcut

For any two positive numbers a and b, the GCF times the LCM equals the product of the numbers: GCF × LCM = a × b. So once you know the GCF, the LCM is one division away: LCM = (a × b) ÷ GCF.

For 12 and 18, the GCF is 6, so the LCM is (12 × 18) ÷ 6 = 216 ÷ 6 = 36. For 1071 and 462, Euclid gave a GCF of 21, so the LCM is (1071 × 462) ÷ 21 = 23,562. This shortcut works for two numbers only. For three or more, use prime factorization or the ladder.

Two special cases are worth remembering. If one number divides the other, the smaller number is the GCF and the larger is the LCM: for 7 and 56, the GCF is 7 and the LCM is 56. If the numbers share no factor except 1, they are called co-prime, the GCF is 1, and the LCM is simply their product: for 8 and 15, the LCM is 120.

GCF and LCM of Three or More Numbers

The prime factorization rule works for any number of values. For 24, 36 and 60: 24 = 23 × 3, 36 = 22 × 32, and 60 = 22 × 3 × 5. Only 2 and 3 appear in all three, at lowest powers 22 and 31, so the GCF is 12. Every prime at its highest power is 23 × 32 × 5, so the LCM is 360.

You can also work in pairs: the LCM of 4, 6 and 10 is the LCM of 4 and 6, which is 12, then the LCM of 12 and 10, which is 60. The same pairing works for the GCF.

Using GCF and LCM With Fractions

Fractions are where most people meet GCF and LCM, and each one has its own job.

The GCF simplifies a fraction. Divide the top and bottom by their GCF and the fraction is in lowest terms in one step. For 84/126, the GCF is 42, so 84/126 = 2/3.

The LCM gives the lowest common denominator. To add 5/12 + 7/18, the LCM of 12 and 18 is 36, so 5/12 = 15/36 and 7/18 = 14/36, and the sum is 29/36. Using the LCM keeps the numbers small; multiplying the denominators (216) also works but leaves more simplifying. The fraction calculator shows the LCD and the GCF in its steps.

The GCF also appears in algebra: factoring 6x + 9 starts by taking out the GCF of 3, giving 3(2x + 3). The guide on how to factor polynomials builds on exactly this step.

GCF or LCM? How to Tell in Word Problems

Word problems never say “find the GCF”. Ask yourself one question: am I splitting things into groups, or waiting for things to line up? Splitting means GCF. Lining up, or repeating until something matches, means LCM.

Clue in the problemUseExample
Largest, greatest, most groups, split equally, no leftoversGCFMost identical kits from 24 pencils and 36 erasers
Largest square tile, longest equal piecesGCFBiggest square tile for a 48 by 180 inch floor
Smallest, least, next time together, at the same timeLCMWhen two buses that leave every 12 and 18 minutes meet again
Buy the same number, packs that matchLCMHot dogs in packs of 10 and buns in packs of 8

Kits: the GCF of 24 and 36 is 12, so you can make 12 identical kits, each with 2 pencils and 3 erasers. Tiles: the GCF of 48 and 180 is 12, so the biggest square tile is 12 inches, and the floor takes 4 × 15 = 60 tiles. Buses: the LCM of 12 and 18 is 36, so buses leaving together at 8:00 meet again at 8:36. Hot dogs: the LCM of 10 and 8 is 40, so buy 4 packs of hot dogs and 5 packs of buns for exactly 40 of each.

Common Mistakes

MistakeWhat goes wrongDo this instead
Mixing up the power rulesUsing the highest powers for the GCF of 48 and 180 gives 720GCF: shared primes, lowest powers. LCM: all primes, highest powers
Multiplying the numbers for the LCM12 × 18 = 216, not the least common multipleDivide by the GCF: 216 ÷ 6 = 36
Using the shortcut for three numbersGCF × LCM = a × b only holds for two numbersUse prime factorization or work in pairs
Picking the wrong one in a word problemUsing the LCM to split 24 pencils into kitsSplitting into groups means GCF; lining up means LCM
Stopping a factor list too earlyMissing 9 as a factor of 18List factors in pairs until the pairs meet

Practice Problems With Answers

Try each one with any method, then check the answer.

  1. Find the GCF of 28 and 42. Answer: 14.
  2. Find the LCM of 9 and 12. Answer: 36.
  3. Find the GCF and LCM of 20 and 30. Answer: GCF 10, LCM 60.
  4. Find the GCF of 24, 36 and 60. Answer: 12.
  5. Find the LCM of 4, 6 and 10. Answer: 60.
  6. The GCF of 16 and 40 is 8. Use the shortcut to find their LCM. Answer: (16 × 40) ÷ 8 = 80.
  7. A florist has 45 roses and 75 tulips and wants identical bouquets with nothing left over. What is the most bouquets she can make? Answer: 15 bouquets, each with 3 roses and 5 tulips.
  8. Two lights blink every 9 and 12 seconds. They blink together now. How many seconds until they blink together again? Answer: 36 seconds.

Frequently Asked Questions

What is the difference between GCF and LCM?

The GCF is the largest number that divides into all the given numbers, while the LCM is the smallest number they all divide into. For 12 and 18, the GCF is 6 and the LCM is 36. The GCF is never larger than the smallest number, and the LCM is never smaller than the largest.

What is the fastest way to find the GCF?

For small numbers, list the factors. For larger ones, use prime factorization or Euclid’s algorithm: divide, keep the remainder, and repeat until the remainder is 0. For 1071 and 462, three divisions give a GCF of 21.

How do you find the LCM using the GCF?

Multiply the two numbers and divide by their GCF: LCM = (a × b) ÷ GCF. For 12 and 18, that is 216 ÷ 6 = 36. This only works for two numbers at a time.

Is GCF the same as GCD and HCF?

Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number. GCD is common in the US and in programming; HCF is common in the UK, India and Pakistan.

What is the GCF of two prime numbers?

It is 1, because two different primes share no factor except 1. Their LCM is their product: for 7 and 13, the GCF is 1 and the LCM is 91.

When do I use GCF instead of LCM in a word problem?

Use the GCF when you are splitting things into the largest equal groups with nothing left over. Use the LCM when you need the first time two repeating things line up, or the smallest amount that matches two pack sizes.

Can the LCM be equal to one of the numbers?

Yes, when the larger number is a multiple of the smaller one. For 7 and 56, the LCM is 56 and the GCF is 7.

Key Takeaways

  • The GCF is the largest shared factor; the LCM is the smallest shared multiple.
  • With prime factors: GCF uses shared primes at their lowest powers, LCM uses all primes at their highest powers.
  • Euclid’s algorithm finds the GCF of big numbers with a few divisions.
  • For two numbers, GCF × LCM = a × b, so LCM = (a × b) ÷ GCF.
  • Splitting into groups means GCF; waiting for things to line up means LCM.

Further reading: Minnesota State University Moorhead: GCF and LCM and Hunter College (CUNY): Prime Factorization, GCF and LCM.

About the author