Find the GCD and LCM of any set of numbers instantly
Enter Numbers
Greatest Common Divisor
The largest integer that divides every number in the set without a remainder.
Least Common Multiple
The smallest positive integer that is divisible by every number in the set.
Prime Factorisation
Key Relationship
GCD(12, 18) × LCM(12, 18) = 12 × 18
6 × 36 = 216
Use this free LCM and GCD calculator to find the Least Common Multiple and Greatest Common Divisor of two or more integers in one click. Whether you are simplifying fractions, solving number-theory problems, or scheduling repeating events, knowing the LCM and GCD is essential. Enter your numbers, get instant results, and explore the step-by-step Euclidean algorithm breakdown.
The GCD (Greatest Common Divisor) is the largest integer that divides all given numbers without a remainder. The LCM (Least Common Multiple) is the smallest positive integer that is divisible by all given numbers. For any two numbers a and b, GCD(a, b) × LCM(a, b) = a × b.
The Euclidean algorithm repeatedly replaces the larger number with the remainder of dividing the larger by the smaller, until the remainder is zero. The last non-zero remainder is the GCD. For example, GCD(48, 18): 48 = 2×18 + 12, then 18 = 1×12 + 6, then 12 = 2×6 + 0, so GCD = 6.
Yes. For a set of numbers, the GCD is computed by applying GCD pairwise: GCD(a, b, c) = GCD(GCD(a, b), c). The same applies to LCM. This calculator supports any quantity of numbers separated by commas or spaces.
LCM is used whenever you need to synchronise repeating cycles — for example, finding when two events that repeat every 4 and 6 days will coincide (LCM = 12 days). It is also used when adding or subtracting fractions, since you need the LCM of the denominators as the common denominator.