GCD & LCM Calculator

Greatest common divisor and least common multiple of any list of whole numbers.

Frequently asked questions

What is the difference between GCD and LCM?

The GCD (greatest common divisor, also called HCF) is the largest number that divides all your numbers evenly. The LCM (least common multiple) is the smallest number that all of them divide into.

Can it handle more than two numbers?

Yes. Enter any list separated by spaces, commas or new lines and it computes the GCD and LCM across the whole set.

How is it computed?

GCD uses the Euclidean algorithm pairwise across the list; LCM uses the identity lcm(a,b) = a*b/gcd(a,b), folded across all numbers.