GCD, GCF and LCM explained
GCD and GCF name the same value: the largest positive whole number that divides every input without a remainder. For 48 and 180, that number is 12. Use it to simplify fractions or divide items into equal groups.
How the Euclidean algorithm works
Divide the larger number by the smaller one, then repeat with the divisor and the remainder. For 180 and 48, the remainders are 36, 12 and 0. The last nonzero remainder is the GCD, 12.
Finding the least common multiple
The LCM is the smallest positive common multiple for nonzero inputs. Divide one input by the GCD before multiplying: LCM of 48 and 180 = 48 ÷ 12 × 180 = 720. For several inputs, repeat that calculation with each remaining number.
Zero, signs and large integers
Signs do not change the answer. By convention this calculator returns GCD of 0 and 0 = 0, and an LCM of 0 whenever an input is zero. All arithmetic uses exact integers, including inputs larger than JavaScript's usual safe-integer limit.