Mathematics

LCM & GCD Calculator

Find the Least Common Multiple and Greatest Common Divisor of numbers

How to Use
  1. Type a list of integers separated by commas or spaces into the box above.
  2. Results update instantly — no button press needed.
  3. The LCM is the smallest number divisible by all your inputs.
  4. The GCD (also called HCF) is the largest number that divides all your inputs evenly.

Formula

GCD(a, b) Euclidean algorithm: divide repeatedly until remainder = 0
LCM(a, b) = |a × b| / GCD(a, b)
LCM(a,b,c) = LCM(LCM(a,b), c) — applied iteratively