gcd of 48, 180, 210
- Numbers
- 48, 180, 210
Greatest common divisor6
independently verified by prime factorisation
Open this exampleGreatest common divisor and lowest common multiple of any list of integers, by the Euclidean algorithm.
Also called: hcf calculator, greatest common factor, highest common factor.
The GCD of 3 numbers is 6, and their LCM is 5,040.
Euclid's algorithm replaces the larger number with the remainder of dividing it by the smaller, repeatedly, until one is zero. Extending to a list is just applying it pairwise. The LCM follows from the identity that the product of two numbers equals their GCD times their LCM.
euclidean algorithm, applied pairwiseEach of these is asserted on every build. If a change to the engine ever moved one of these answers, the build would fail before the page could print it.
Greatest common divisor6
independently verified by prime factorisation
Open this exampleGreatest common divisor1
boundary
Open this exampleGreatest common divisor17
degenerate case
Open this example