FertiJourney Dev Tools 🏠← All tools

GCD & LCM Calculator

Greatest common divisor and least common multiple of several integers, with prime factorization.

GCD
LCM
Enter integers separated by commas, spaces or new lines. GCD is the largest integer dividing every input; LCM is the smallest integer divisible by every input. Negative signs are ignored, zeros are skipped, and decimals / scientific notation are ignored. Results use BigInt, so very large numbers are fine. Each input plus the GCD and LCM is shown as a prime-factor product (e.g. 12 = 2^2 × 3). Factorization is bounded for very large composites — if a number resists full factoring the remaining cofactor is shown as-is.