Number Theory 8 min read

GCF vs LCM: What Is the Difference and How to Calculate Both

Confused about the difference between the Greatest Common Factor (GCF) and the Least Common Multiple (LCM)? This guide explains both concepts clearly, with multiple methods and real-world examples.

Basic Math Tools Editorial Team
Published June 22, 2026
Updated July 1, 2026
Reviewed for Accuracy

What Is the Greatest Common Factor (GCF)?

The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest positive integer that divides evenly into two or more numbers without leaving a remainder.

Example: The GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 exactly.

What Is the Least Common Multiple (LCM)?

The Least Common Multiple (LCM) is the smallest positive integer that is divisible by all the given numbers — in other words, the smallest number that all given numbers divide into evenly.

Example: The LCM of 4 and 6 is 12, because 12 is the smallest number that both 4 and 6 divide into evenly.

Method 1: Prime Factorization

This is the most reliable method for both GCF and LCM.

Step-by-Step: GCF of 36 and 60

  1. Find the prime factorization of each number:
    • 36 = 2² × 3²
    • 60 = 2² × 3 × 5
  2. For GCF, take the lowest power of each prime factor that appears in all numbers:
    • Both have 2² → take 2²
    • Both have 3 (36 has 3², 60 has 3¹) → take 3¹
    • 5 only appears in 60 → do NOT include it
  3. GCF = 2² × 3 = 4 × 3 = 12

Step-by-Step: LCM of 36 and 60

  1. Use the same prime factorizations: 36 = 2² × 3², and 60 = 2² × 3 × 5
  2. For LCM, take the highest power of each prime factor that appears in any of the numbers:
    • 2² (appears in both)
    • 3² (highest power of 3, from 36)
    • 5¹ (from 60)
  3. LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180

Method 2: The Euclidean Algorithm (for GCF)

The Euclidean Algorithm is a fast, efficient method for finding the GCF of two numbers. It is based on the principle that GCF(a, b) = GCF(b, a mod b).

Example: GCF of 48 and 18

  1. 48 ÷ 18 = 2 remainder 12 → GCF(48, 18) = GCF(18, 12)
  2. 18 ÷ 12 = 1 remainder 6 → GCF(18, 12) = GCF(12, 6)
  3. 12 ÷ 6 = 2 remainder 0 → GCF(12, 6) = GCF(6, 0) = 6

The GCF of 48 and 18 is 6.

The Key Relationship Between GCF and LCM

For any two positive integers a and b:

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

This means once you know the GCF, you can always find the LCM without prime factorization:

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

Example: GCF(12, 18) = 6, so LCM(12, 18) = (12 × 18) ÷ 6 = 216 ÷ 6 = 36.

Real-World Applications

GCF: Simplifying Fractions

To reduce a fraction to its simplest form, divide both numerator and denominator by their GCF.

Simplify 24/36: GCF(24, 36) = 12, so 24/36 = (24÷12)/(36÷12) = 2/3.

LCM: Adding Fractions with Different Denominators

To add 1/4 + 1/6, find the LCM of 4 and 6. LCM(4, 6) = 12.

1/4 + 1/6 = 3/12 + 2/12 = 5/12

LCM: Scheduling Problems

Bus A departs every 8 minutes. Bus B departs every 12 minutes. If both buses leave at 9:00 AM, when will they next depart at the same time?

LCM(8, 12) = 24 minutes. They will next depart together at 9:24 AM.