GCD & LCM Calculator
Compute the greatest common divisor and least common multiple of two or more whole numbers — arbitrary precision.
Quick answer: Compute the greatest common divisor and least common multiple of two or more whole numbers — arbitrary precision.
Last updated
Frequently asked questions
- What's the difference between GCD and LCM?
- GCD (greatest common divisor) is the largest number that divides all your inputs evenly. LCM (least common multiple) is the smallest number that all your inputs divide into evenly. GCD(12, 18) = 6, LCM(12, 18) = 36.
- Can I use very large numbers?
- Yes — we use BigInt arithmetic, so 100-digit numbers work fine. The Euclidean algorithm is fast even at that size.
- How many numbers can I enter at once?
- As many as you like, separated by spaces or commas. The tool reduces them pairwise — GCD(a, b, c) = GCD(GCD(a, b), c).
- Does it handle negative numbers?
- Yes — by convention we return the positive GCD/LCM regardless of input signs.
- Is my data uploaded?
- No — calculations run entirely in your browser.