UtilityBase logoUtilityBase

3 min read

GCF and LCM Explained With Examples

Understand the greatest common factor and least common multiple, how to find each by prime factorization, and where they show up in real math.

What GCF and LCM Mean

The greatest common factor, or GCF, of two or more numbers is the largest whole number that divides all of them without leaving a remainder. For example, the GCF of 12 and 18 is 6, because 6 divides both evenly and nothing larger does. The GCF is sometimes called the greatest common divisor.

The least common multiple, or LCM, is the smallest positive number that all of them divide into evenly. The LCM of 4 and 6 is 12, because 12 is the first number that appears in both the list of multiples of 4 and the list of multiples of 6. GCF looks downward at what numbers share as factors, while LCM looks upward at where their multiples first meet.

Finding Them With Prime Factorization

Prime factorization is the most dependable method for both. Break each number into a product of primes: 12 becomes two times two times three, and 18 becomes two times three times three. For the GCF, multiply the primes the numbers share, taking the lowest power of each; 12 and 18 share one two and one three, giving a GCF of six.

For the LCM, multiply every prime that appears in any number, taking the highest power of each. For 12 and 18 that is two squared times three squared, which is thirty six. A handy check is that for any two numbers, the GCF multiplied by the LCM equals the product of the two numbers, so you can verify one result using the other.

Where GCF and LCM Are Used

The GCF is what you use to reduce a fraction to lowest terms: dividing the numerator and denominator by their GCF gives the simplest equivalent fraction. It also helps when splitting things into equal groups, such as arranging items into the largest possible identical bundles with none left over.

The LCM shows up whenever you add or subtract fractions with different denominators, because the least common denominator is just the LCM of the denominators. It also answers scheduling questions, such as when two repeating events that occur every few days will next happen on the same day.

Calculating Both in One Step

The calculator runs locally in your browser, so the numbers you enter are not sent anywhere. It shows the prime factorization alongside the answers, which makes it a good tool for checking homework and for seeing the reasoning rather than only the result.

  1. 1Enter two or more whole numbers separated by spaces or commas.
  2. 2Run the calculation to get both the GCF and the LCM at once.
  3. 3Review the prime factorization the tool displays for each number you entered.
  4. 4Confirm the GCF is the product of shared primes and the LCM covers every prime.
  5. 5For two numbers, check that GCF times LCM equals the product of the two numbers.

Common Points of Confusion

It is easy to mix up the two because their names sound similar. Remember that the GCF is never larger than the smallest number you started with, while the LCM is never smaller than the largest number you started with. If your GCF comes out bigger than one of your inputs, you have made an error.

Another subtlety is that when two numbers share no common factor other than one, they are called coprime, and their GCF is one while their LCM is simply their product. This case is common and correct, not a sign that something went wrong.

Frequently asked questions

What is the difference between GCF and LCM?

The GCF is the largest number that divides all your numbers evenly, while the LCM is the smallest number they all divide into evenly. GCF is about shared factors, and LCM is about shared multiples.

How do GCF and LCM relate to each other?

For any two numbers, the GCF multiplied by the LCM equals the product of those two numbers. This lets you find one quickly if you already know the other, and it is a useful way to check your answer.

What if two numbers have no common factor?

If the only factor two numbers share is one, they are coprime. Their GCF is one and their LCM is simply the two numbers multiplied together, which is a normal and correct result.

Tools mentioned in this guide

Keep reading