LCM & GCF Calculator


Enter at least two positive integers above

LCM vs. GCF

LCM and GCF are complementary operations. GCF asks "what's the biggest thing that fits into all these numbers?" while LCM asks "what's the smallest number all of these fit into?" They're connected by the identity: LCM(a, b) × GCF(a, b) = a × b for any two positive integers.

How to Find GCF

The Euclidean algorithm is the most efficient method:

GCF(48, 18):
  48 = 2 × 18 + 12 → GCF(48, 18) = GCF(18, 12)
  18 = 1 × 12 + 6 → GCF(18, 12) = GCF(12, 6)
  12 = 2 × 6 + 0 → GCF = 6

Real-World Uses

  • Adding fractions: Use LCM as the common denominator. 1/4 + 1/6 → LCD = LCM(4,6) = 12 → 3/12 + 2/12 = 5/12.
  • Simplifying fractions: Divide numerator and denominator by their GCF. 12/18 → GCF = 6 → 2/3.
  • Scheduling: Two buses depart every 8 and 12 minutes. LCM(8,12) = 24 — they next depart together in 24 minutes.
  • Tiling and cutting: GCF helps find the largest square tile that fits evenly into a rectangular room.

Frequently Asked Questions

What is the LCM (Least Common Multiple)?

The LCM of two or more numbers is the smallest positive integer that is divisible by all of them. For example, LCM(4, 6) = 12 because 12 is the smallest number both 4 and 6 divide evenly into. LCM is used when adding fractions with different denominators (you need the LCD — Least Common Denominator, which is the LCM of the denominators).

What is the GCF (Greatest Common Factor)?

The GCF (also called GCD — Greatest Common Divisor, or HCF — Highest Common Factor) is the largest positive integer that divides all the given numbers without a remainder. GCF(12, 18) = 6. GCF is used to simplify fractions — divide both numerator and denominator by their GCF.

How do you find LCM with prime factorization?

Factor each number into primes. Then take the highest power of each prime that appears in any factorization. Multiply them together. Example: LCM(12, 18): 12 = 2² × 3, 18 = 2 × 3². LCM = 2² × 3² = 4 × 9 = 36.

What is the LCM used for in real life?

LCM appears whenever you need to synchronize repeating events: scheduling (two events that repeat every 4 and 6 days will next align in 12 days), adding fractions (common denominators), and in music theory for rhythmic patterns that align after a certain number of beats.

Browse by Category