Number Theory
Basic
LCM from GCD
Least common multiple via the greatest common divisor.
Formula
Variables
a, bIntegers
Example
lcm(12, 18) = 12·18/gcd(12,18) = 216/6 = 36.
Did You Know?
The product of two numbers always equals their GCD times their LCM — a neat, useful identity.