Skip to content

GCF and LCM: how to find them, with examples

The greatest common factor (GCF) of two numbers is the largest number that divides both; the least common multiple (LCM) is the smallest number they both divide into. For 12 and 18 the GCF is 6 and the LCM is 36, and GCF × LCM always equals the two numbers multiplied: 6 × 36 = 12 × 18 = 216.

By Toolgu · Last updated

Method 1: list the factors or multiples

For small numbers, write them out. 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 one in both lists is 6, so the GCF is 6. For the LCM, list multiples: 12, 24, 36, 48… and 18, 36, 54… The first one in both lists is 36, so the LCM is 36. This is quick for numbers under about 50 and slow after that.

Method 2: prime factorization

Break each number into primes, then compare the powers. A prime number checker helps for the bigger factors.

  • 12 = 2² × 3
  • 18 = 2 × 3²
  • GCF: take each prime they share at its lowest power: 2¹ × 3¹ = 6.
  • LCM: take every prime at its highest power: 2² × 3² = 36.

It works for any amount of numbers. For 60, 84 and 90: 60 = 2² × 3 × 5, 84 = 2² × 3 × 7, 90 = 2 × 3² × 5. The GCF is 2 × 3 = 6 and the LCM is 2² × 3² × 5 × 7 = 1,260.

Method 3: Euclid’s algorithm (fastest for big numbers)

Divide the larger number by the smaller and keep the remainder; repeat with the smaller number and the remainder until the remainder is 0. The last non-zero remainder is the GCF. For 48 and 18:

  • 48 ÷ 18 = 2 remainder 12
  • 18 ÷ 12 = 1 remainder 6
  • 12 ÷ 6 = 2 remainder 0, so the GCF is 6.

Then use GCF × LCM = a × b to get the LCM without listing anything: LCM(48, 18) = 48 × 18 ÷ 6 = 144. The GCF calculator and LCM calculator show these steps for your own numbers.

What they’re used for

  • Simplifying fractions (GCF): divide the top and bottom by their GCF. 18/24 has a GCF of 6, so it simplifies to 3/4.
  • Adding fractions (LCM): the LCM of the denominators is the lowest common denominator. For 1/4 + 1/6, the LCM of 4 and 6 is 12, so 3/12 + 2/12 = 5/12. The fraction calculator does this step by step.
  • Simplifying ratios (GCF): 150:250 divided by 50 is 3:5. Try the ratio calculator, or solve for a missing value with the proportion calculator.
  • Things that repeat (LCM): if one bus comes every 12 minutes and another every 18, they leave together every 36 minutes.

Quick checks

  • The GCF can’t be bigger than the smaller number, and the LCM can’t be smaller than the larger one.
  • If one number divides the other, the GCF is the smaller number and the LCM the larger: GCF(6, 18) = 6, LCM(6, 18) = 18.
  • Two different primes always have a GCF of 1 and an LCM equal to their product.

Check your answers

Frequently asked questions

Is the GCF the same as the HCF or GCD?

Yes. Greatest common factor (GCF), highest common factor (HCF) and greatest common divisor (GCD) are three names for the same number.

How do I find the LCM of three numbers?

Find the LCM of the first two, then the LCM of that result and the third. For 4, 6 and 10: LCM(4, 6) = 12, and LCM(12, 10) = 60.

What is the GCF of two prime numbers?

Always 1, because a prime has no factors other than 1 and itself. Numbers whose GCF is 1 are called coprime, and their LCM is simply their product.

Sources

This guide explains how the rules work in general. It isn’t financial advice; check the figures for your own agreement with your lender.