GCD and LCM calculator

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

Let’s run the numbers

USD

Enter your values, then calculate.

THE NUMBERS, MADE CLEARInstant calculation
=

Your answer starts here

Check your inputs and select Calculate.

Inputs must be integers. Results use exact integer arithmetic and are nonnegative. Negative inputs and one zero are allowed; both inputs cannot be zero.

Common uses

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

BEHIND THE NUMBERS

Formula & assumptions

gcd(a,b) = gcd(b,a mod b); lcm(a,b) = |ab| / gcd(a,b)

Inputs must be integers. Results use exact integer arithmetic and are nonnegative. Negative inputs and one zero are allowed; both inputs cannot be zero.