LCM & GCD Calculator
Find the greatest common divisor and least common multiple of numbers.
Works on positive whole numbers. Zeros and non-numbers are ignored.
Two sides of the same idea
The greatest common divisor is the biggest number that fits evenly into all your values; the least common multiple is the smallest number they all fit into. They are closely linked and often used together.
LCM(a, b) = a × b ÷ GCD(a, b)
For a longer list, the calculator combines the numbers in pairs — carrying the running GCD or LCM forward — so the final answer reflects every value you entered.
For 12, 18 and 24 the greatest common divisor is 6 — the largest number dividing all three — and the least common multiple is 72, the smallest number they all divide into.
Everyday uses
GCD quietly powers fraction simplification and dividing things into equal groups. LCM is the trick behind finding common denominators and working out when repeating schedules coincide — buses that come every 12 and 18 minutes next meet after the LCM, 36 minutes.
Quick checks
- GCD ≤ smallest value. It cannot exceed any number in the list.
- LCM ≥ largest value. It is a multiple of every number.
- Coprime? If the GCD is 1, the LCM is simply the product.