LCM & GCD Calculator
Find Least Common Multiple & Greatest Common Divisor.
Input Values
Adjust parameters below
How It Works
Guide and Formula
LCM and GCD Calculator
Find the Least Common Multiple and Greatest Common Divisor of two integers.
GCD (Greatest Common Divisor)
The largest number that divides both numbers without remainder.
Euclidean Algorithm:
Repeat until b becomes 0, then a is the GCD.
LCM (Least Common Multiple)
The smallest positive number divisible by both numbers.
Formula using GCD:
Relationship
This useful relationship means knowing GCD gives you LCM instantly!
?FAQs
What is the difference between LCM and GCD?
GCD is the largest number that divides both numbers. LCM is the smallest number that both numbers divide into evenly.
Where are LCM and GCD used?
LCM is used for adding fractions with different denominators. GCD is used for simplifying fractions and solving problems involving periodic events.
Can I use negative numbers?
Yes! GCD and LCM work with negative numbers. The GCD is always positive, and LCM uses absolute values.
What about zero?
GCD(a, 0) = |a|. But LCM(a, 0) is undefined because no positive number is a multiple of zero.