GCD/LCM Calculator

Paste lists of integers to get the gcd, lcm, prime factors, divisor counts, and step-by-step Euclidean reductions—ideal for classrooms and number theory work.

We ignore zeros for LCM calculations (since any zero forces the result to zero) but still consider them when reporting issues. Only whole numbers are accepted—decimals are highlighted below.

Greatest common divisor
6

Largest integer dividing every number without a remainder

Least common multiple
72

Smallest positive integer divisible by every input

Numbers analysed
3

Unique values: 3

Sign handling
All positive

GCD and LCM are reported as positive values regardless of sign

Prime factorisation per number

3 values
12
2 factors
2^2
3
18
2 factors
2
3^2
24
2 factors
2^3
3

Euclidean algorithm steps

Each row represents one iteration while collapsing your number list to a single greatest common divisor.

abquotientremainder
1218012
181216
12620
62406
24640

Frequently Asked Questions