GCD & LCM Calculator
GCD and LCM of any number set.
- 100% free
- No sign-up
- Private — runs in your browser
- Instant results
GCD and LCM explained
The greatest common divisor (GCD) is the largest number that divides every value in your list evenly. The least common multiple (LCM) is the smallest number that all of them divide into. This calculator finds both for any list of whole numbers.
How they're computed
The GCD uses the Euclidean algorithm — repeatedly replacing the larger number with the remainder until one reaches zero. The LCM follows from it: LCM(a, b) = |a × b| ÷ GCD(a, b), applied across the whole list.
Where you'll use them
- GCD — simplifying fractions and ratios to lowest terms.
- LCM — finding a common denominator or when repeating events line up.
FAQ
What if the numbers share no common factor?
Then the GCD is 1 — the numbers are "coprime" — and the LCM is simply their product.
How many numbers can I enter?
You can enter a whole list, not just two values. The tool finds the GCD and LCM across every number by applying the pairwise formulas step by step through the list.
Does it work with negative numbers?
The GCD and LCM are defined using absolute values, so signs are ignored and the results are reported as positive. Enter whole numbers; decimals and fractions are not valid inputs for these operations.
What happens if one of the numbers is zero?
The GCD of a number and zero is that number itself, while the LCM involving zero is zero, since zero is a multiple of everything. The calculator handles these edge cases automatically.
Is it free and private?
Yes, it is free with no sign-up, and all the math runs in your browser, so nothing you enter is uploaded. It works on phones, tablets, and desktops.