GCD & LCM Calculator
Find the greatest common divisor and least common multiple of two or more numbers with step-by-step prime factorization.
Enter at least two valid positive integers.
Greatest Common Divisor
—
Coprime
Least Common Multiple
—
Relationship Verification
GCD(0, 0) × LCM(0, 0) = 0
|0 × 0| = 0
Verified: GCD × LCM = |a × b|
Prime Factorizations
How to use
- 1
Enter your numbers
Type two or more positive integers into the input fields. Click '+' to add more fields (up to 10).
- 2
View results
The GCD and LCM are calculated instantly and displayed prominently.
- 3
See the working
Click 'Show steps' to see the prime factorization method and Euclidean algorithm used to find the answer.
Frequently asked questions
What is the difference between GCD and LCM?
What is the Euclidean algorithm?
How are GCD and LCM related?
What does coprime mean?
Calculate the GCD (greatest common divisor) and LCM (least common
multiple) of up to ten numbers simultaneously. See the solution worked
out step by step using both the prime factorization method and the
Euclidean algorithm. The relationship GCD x LCM = |a x b| is verified
live. All processing runs entirely in your browser.