GCD and LCM Calculator

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

Calculations happen locally. We do not send your values to our server.

Example

For 12 and 18, the greatest common divisor is 6 and the least common multiple is 36.

Calculation method

The Euclidean algorithm repeatedly takes remainders to find the GCD. The LCM is built from each value using |a ÷ gcd(a,b) × b|.

Important notes

Enter at least two non-zero safe integers. Extremely large least common multiples are rejected to avoid unreliable precision.

Frequently asked questions

Can I enter more than two integers?

Yes. The calculation is reduced across every entered integer.

Are negative integers allowed?

Yes. Signs are ignored for the non-negative GCD and LCM results.

Why is zero not accepted?

This tool requires non-zero values to keep its multi-value LCM behavior unambiguous.

Related tools