← Back to Blog

LCM and GCD Calculator: Lowest Common Multiple and Greatest Common Divisor

Calculate the LCM and GCD of any set of numbers — understand the prime factorisation method, the Euclidean algorithm, and their uses in fractions and scheduling.

LCM and GCD Calculator: Lowest Common Multiple and Greatest Common Divisor

LCM and GCD: Essential Number Theory

The Greatest Common Divisor (GCD), also called Highest Common Factor (HCF), is the largest number that divides two or more integers without remainder. The Lowest Common Multiple (LCM) is the smallest positive integer divisible by all given numbers. Both are fundamental to fraction arithmetic and real-world scheduling.

Finding GCD: Euclidean Algorithm

GCD(a, b) = GCD(b, a mod b), until remainder = 0
Example: GCD(48, 18)
→ GCD(18, 12) → GCD(12, 6) → GCD(6, 0) = 6

Finding LCM

LCM(a, b) = (a × b) ÷ GCD(a, b)
Example: LCM(12, 18) = (12×18) ÷ 6 = 216 ÷ 6 = 36

Prime Factorisation Method

12 = 2² × 3 | 18 = 2 × 3²
GCD = 2¹ × 3¹ = 6   (lowest power of each shared prime)
LCM = 2² × 3² = 36  (highest power of each prime)

Practical Uses

  • Adding fractions: LCM gives the common denominator (1/4 + 1/6: LCM=12)
  • Simplifying fractions: GCD divides numerator and denominator (18/24 → ÷6 → 3/4)
  • Scheduling: Two events repeat every 8 and 12 days — LCM(8,12)=24, they coincide every 24 days

Calculate LCM and GCD: Free LCM Calculator | Free GCD Calculator