WIN-J NUMBER TOOLS

GCD and LCM calculator

Calculate the GCD and LCM of multiple integers at once. Supports negatives, zero and large integers with exact integer results.

Free to useCalculated in your browser

How to use

  1. Separate integers with commas, spaces or line breaks.
  2. Do not use thousands separators. The text 1,000 is read as two values, 1 and 0.
  3. Calculate to see the count, GCD and LCM, then copy or save the results.

Worked example

For 12, 18, 30, the GCD is 6 and the LCM is 180.

Method and limits

Enter up to 100 integers, each at most 200 digits excluding the sign. The Euclidean algorithm operates on absolute values. LCM is defined as 0 when any value is 0; GCD is defined as 0 when all values are 0.

Questions and answers

Can I enter just one integer?

Yes. Both GCD and LCM equal its absolute value; for a single zero, both are zero.

Are large integers converted or rounded?

BigInt calculations are displayed as strings, retaining integer digits beyond the safe-integer range of Number.

Related tools

References