Home/Math Tools/LCM & GCD Calculator

LCM & GCD Calculator

Find the Least Common Multiple and Greatest Common Divisor of up to 5 numbers with step-by-step working.

GCD
Greatest Common Divisor
6
Largest number that divides all inputs
LCM
Least Common Multiple
72
Smallest number divisible by all inputs
Prime Factorizations
12=22 × 3
18=2 × 32
24=23 × 3
Step-by-step: GCD (Euclidean method)
Step 1Start with 12
Step 2GCD(12, 18) = 6
Step 3GCD(6, 24) = 6
GCD = 6
Step-by-step: LCM
Step 1Start with 12
Step 2LCM(12, 18) = 36
Step 3LCM(36, 24) = 72
Formula: LCM(a, b) = |a × b| / GCD(a, b)
LCM = 72