Interactive GCF & LCM Calculator
Calculate Greatest Common Factor (GCD) and Least Common Multiple (LCM) of two numbers.
The fascinating world of numbers
Calculate Greatest Common Factor (GCD) and Least Common Multiple (LCM) of two numbers.
Calculate Greatest Common Factor (GCD) and Least Common Multiple (LCM) of two numbers.
The Greatest Common Factor (GCF or GCD) is the largest positive integer that divides two numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive integer that is a multiple of both numbers.
LCM(a, b) = (|a × b|) / GCF(a, b)
The Euclidean algorithm repeatedly replaces (a, b) with (b, a mod b) until the remainder is zero. The last non-zero remainder is the GCF.
1. Euclidean division: 180 = 48 × 3 + 36
2. 48 = 36 × 1 + 12
3. 36 = 12 × 3 + 0.
The last non-zero remainder is GCF = 12.
LCM = (48 × 180) / 12 = 720.
GCF is the largest factor shared between two numbers (it divides both), while LCM is the smallest common multiple that both numbers divide into.
If two numbers have a GCF of 1, they are called relatively prime (or coprime). Their LCM is simply their direct product a × b.