GCD and LCM Calculator

Find the greatest common divisor (GCD/HCF) and least common multiple (LCM) of two or more integers of any size.

Results

GCD (HCF)β€”
LCMβ€”

How to use the GCD and LCM Calculator

  1. Enter or select: Integers.
  2. The results (GCD (HCF), LCM) are calculated instantly as you type.
  3. Use β€œCopy link” to share the calculation with the same input values.

Formula

  • gcd(a, b) = gcd(b, a mod b)
  • lcm(a, b) = |aΒ·b| / gcd(a, b)

About this tool

Uses the Euclidean algorithm with arbitrary-precision integers.