GCD & LCM Calculator
Calculate the Greatest Common Divisor and Least Common Multiple of two or more numbers with step-by-step Euclidean algorithm.
AdSense
Top banner
Enter Numbers
Comma-separated positive integers (at least 2)
3 valid numbers parsed: 48, 36, 60
Results
GCD (Greatest Common Divisor)
12
LCM (Least Common Multiple)
720
Step-by-step (Euclidean Algorithm for first two numbers)
gcd(48, 36)
48 = 1 x 36 + 12
36 = 3 x 12 + 0
GCD = 12
For multiple numbers, GCD and LCM are computed iteratively:
Step 1: gcd(48, 36) = 12, lcm(48, 36) = 144
Step 2: gcd(12, 60) = 12, lcm(144, 60) = 720
Formulas
LCM(a, b) = |a * b| / GCD(a, b)
GCD(a, b): while b != 0: a, b = b, a mod b
Was this page helpful?