GCD & LCM Calculator
Enter whole numbers to get their greatest common divisor and least common multiple.
Greatest common divisor and least common multiple
The GCD (the biggest number that divides them all) and the LCM (the smallest number they all divide into) come up constantly — reducing fractions, syncing repeating schedules, or finding a common denominator. This tool computes both for any list of whole numbers at once.
For 12, 18, and 24 the GCD is 6 and the LCM is 72. It works across the whole list, not just two numbers, so you can drop in an entire set and read off both results.
Fast and private
The GCD uses the Euclidean algorithm and the LCM is derived from it pairwise, which stays fast and accurate even for large numbers. Everything runs in your browser.
Frequently Asked Questions
How does it find the GCD?
It applies the Euclidean algorithm across your numbers — repeatedly replacing the pair with the remainder — which is fast even for very large values.
How is the LCM computed?
From the GCD: for each pair, LCM = |a × b| / GCD(a, b). Doing it pairwise keeps the intermediate numbers small.
What input does it accept?
Two or more whole numbers separated by commas, spaces, or new lines. Decimals and negatives are ignored or treated by absolute value.
Browse the full set of free, private, in-browser tools.