GCD calculator
The GCD is the greatest positive integer that divides every given number without a remainder.
GCD(a,b) = GCD(b, a mod b)
Calculate the GCD and LCM of 2–10 numbers with Euclidean steps and prime factorizations.
Version 1.0 · Last Updated: August 11, 2026 · Maintained by ToolLarder
Find the greatest common divisor and least common multiple of 2–10 positive integers with exact arithmetic, Euclidean steps, and prime factors.
The GCD is the greatest positive integer that divides every given number without a remainder.
GCD(a,b) = GCD(b, a mod b)
The LCM is the smallest positive integer divisible by every given number.
LCM(a,b) = |a×b| / GCD(a,b)
Divide the larger number by the smaller and continue with divisor and remainder until the remainder is zero.
a = b×q + r
Use minimum shared exponents for GCD and maximum exponents across all factors for LCM.
GCD: min exponents · LCM: max exponents
Continue sequentially with pairwise results to support up to ten numbers.
GCD(a,b,c)=GCD(GCD(a,b),c)