GCD and LCM calculator

Find the greatest common divisor and least common multiple of two integers.

Numbers Stateless

Use up to 100 decimal digits per integer, with an optional sign.

How it works and examples

Enter two signed decimal integers, each with at most 100 digits. Results are nonnegative. If either value is zero, the LCM is zero; gcd(0, 0) is also zero. Example: -18 and 24 have GCD 6 and LCM 72.