QiLing Tools

🔗GCD and LCM Calculator - With the Euclidean Algorithm Steps

Find the greatest common divisor and least common multiple of as many integers as you like. Besides the answer you get a coprime check and the prime factorization of each number, and with exactly two inputs every step of the Euclidean algorithm is listed.

Free · No sign-up · Runs in your browserLast updated:

Loading tool...

How to use GCD and LCM

  1. 1Enter two or more integers separated by spaces, commas or line breaks
  2. 2The GCD and LCM update as you type
  3. 3With two numbers, the Euclidean algorithm steps appear below

FAQ

How does the Euclidean algorithm work?
Divide the larger number by the smaller, then divide the previous divisor by the remainder, and repeat until the remainder is 0. The last non-zero divisor is the GCD — every step is listed for you.
How is the LCM computed?
For two numbers, LCM = a × b ÷ GCD(a, b); for more numbers the pairwise LCM is taken in turn.
What does coprime mean?
Two numbers are coprime when their greatest common divisor is 1, for example 8 and 15.
Can I use negative numbers?
Yes — signs are ignored and absolute values are used, as is standard in number theory.