Math

LCM & GCD Calculator

Greatest common divisor and least common multiple.

Result
GCD 12 · LCM 72
gcd(24, 36) and lcm(24, 36)
GCD (HCF)
12
LCM
72

Compute both the Greatest Common Divisor (GCD/HCF) and Least Common Multiple (LCM) of two integers.

How it works

GCD uses the Euclidean algorithm: gcd(a, b) = gcd(b, a mod b). LCM = |a × b| / gcd(a, b).

Example

gcd(24, 36) = 12, lcm(24, 36) = 72.

Popular calculators

The most-used tools on Calcly.

Related calculators