GCD/LCM Calculator

Find Greatest Common Divisor and Least Common Multiple

Browser ProcessingYour data never leaves your browser

GCD (Greatest Common Divisor)

6

LCM (Least Common Multiple)

72

Calculation Steps

GCD using Euclidean algorithm:

gcd(12, 18) = gcd(18, 12) gcd(18, 12) = gcd(12, 6) gcd(12, 6) = gcd(6, 0) = 6 Then: gcd(6, 24) = 6

LCM formula:

LCM(a, b) = (a × b) / GCD(a, b)

Prime Factorization

12 = 2 × 2 × 3
18 = 2 × 3 × 3
24 = 2 × 2 × 2 × 3

Quick GCD/LCM of Two Numbers

and
GCD: 6
LCM: 36