GCD & LCM Calculator

Compute the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of multiple numbers.

Calculate GCD & LCM

Enter a list of numbers separated by commas to find their GCD and LCM.

Enter Numbers
About GCD and LCM

The Greatest Common Divisor (GCD) is the largest number that divides all input numbers without a remainder. The Least Common Multiple (LCM) is the smallest number that is a multiple of all input numbers. This calculator uses:

  • GCD via Euclidean algorithm: For two numbers \( a \) and \( b \), \( \text{GCD}(a, b) \) is computed iteratively.
  • LCM via formula: \( \text{LCM}(a, b) = \frac{a \times b}{\text{GCD}(a, b)} \).

For example, for 12 and 18: \( \text{GCD}(12, 18) = 6 \), \( \text{LCM}(12, 18) = 36 \).