GCD & LCM calculator

Find the greatest common divisor (GCD) and least common multiple (LCM) of two or more numbers.

GCD & LCM calculator

Results
GCD = 6
LCM = 72
Product of numbers
5,184
GCD × LCM (for 2 numbers)
432

Formulas

GCD — Euclidean algorithm: gcd(a, b) = gcd(b, a mod b), until b = 0
LCM = |a × b| / gcd(a, b)

For multiple numbers, apply iteratively: gcd(a, b, c) = gcd(gcd(a, b), c).

FAQ

What is GCD used for?

GCD is used to simplify fractions (divide numerator and denominator by their GCD), solve problems in number theory, and in algorithms like RSA encryption.

What is LCM used for?

LCM is used to find a common denominator for fractions, solve scheduling problems (when events with different periods coincide), and in gear-ratio calculations.

Related calculators