LCM and GCD Calculator
Find the least common multiple and greatest common divisor of two or more numbers.
This calculator finds the greatest common divisor (GCD) and least common multiple (LCM) of a whole list of positive integers at once. The GCD is the largest number that divides every value evenly, while the LCM is the smallest number that all of them divide into evenly.
It uses the Euclidean algorithm to compute the GCD of each pair, then reduces across the whole list; the LCM is derived from the identity LCM(a, b) = a ÷ GCD(a, b) × b applied the same way. Enter at least two positive whole numbers and the results update as you type — non-integer or negative entries are simply ignored.
How to use it
- 1Type two or more positive whole numbers into the box.
- 2Separate them with commas, spaces, or new lines.
- 3Read the GCD and LCM, along with how many numbers were used.
- 4Edit the list at any time to recalculate instantly.
Frequently asked questions
What is the difference between GCD and LCM?+
The GCD (greatest common divisor) is the largest number that divides all your values without a remainder. The LCM (least common multiple) is the smallest number that every value divides into evenly.
How is the GCD calculated?+
The calculator uses the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of dividing it by the smaller one until the remainder is zero. It then applies this across the whole list.
Can I enter more than two numbers?+
Yes. Enter as many positive whole numbers as you like — the GCD and LCM are computed across the entire list. You need at least two valid integers for a result.
Related calculators
Find a percentage of a number, percentage change, and what percent one number is of another.
Calculate your grade point average from course grades and credit hours.
Add, subtract, multiply and divide fractions with simplified results and decimals.
Calculate mean, variance and standard deviation for a data set (sample or population).