Skip to content
MathAnvil

GCD & LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple of two numbers — with step-by-step solutions.

About this calculator

This calculator finds the Greatest Common Divisor and Least Common Multiple of two positive integers. For three or more numbers, apply GCD/LCM iteratively.

Share:

What are GCD and LCM?

The Greatest Common Divisor (GCD) is the largest number that divides both numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive number that both numbers divide into evenly. GCD is efficiently computed using the Euclidean algorithm, and LCM is found via the formula LCM(a, b) = (a × b) / GCD(a, b). Prime factorization shows the complete breakdown of each number into prime factors.