The Greatest Common Divisor (GCD) of two numbers is the largest integer that divides both without a remainder. The Least Common Multiple (LCM) is the smallest positive integer divisible by both. These are fundamental in fraction reduction, cryptography (RSA key generation uses GCD), scheduling problems, and signal processing.
The relationship between GCD and LCM is: GCD(a,b) × LCM(a,b) = a × b. This means once you have one, computing the other is trivial. GCD is computed using the Euclidean algorithm: GCD(a,b) = GCD(b, a mod b), terminating when the remainder is 0. This is one of the oldest known algorithms — attributed to Euclid around 300 BC. LCM(a,b) = a × b / GCD(a,b). For more than two numbers, apply pairwise repeatedly.
To reduce 12/18 to lowest terms, compute GCD(12,18) = 6, then divide both by 6: 12/6 = 2, 18/6 = 3. Result: 2/3. GCD-based reduction always gives the fully reduced fraction in one step.
GCD(a,b): divide a by b, get remainder r. Then GCD(b,r). Repeat until remainder is 0; the last non-zero remainder is the GCD. Example: GCD(48,18) → GCD(18,12) → GCD(12,6) → GCD(6,0) = 6.
Two numbers with GCD = 1 are coprime (or relatively prime) — they share no common factors other than 1. This is important in RSA cryptography, Chinese Remainder Theorem applications, and fraction representation.
Yes — apply LCM pairwise: LCM(a,b,c) = LCM(LCM(a,b),c). The tool handles this automatically for up to 10 inputs.
See also the Fraction Calculator, Factorial Calculator, and the Average Calculator.