Math

LCM & GCD Calculator

Find Least Common Multiple & Greatest Common Divisor.

Input Values

Adjust parameters below

RESULT
LCM (Least Common Multiple)
36
NUMBER
GCD (Greatest Common Divisor)
6

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:

\gcd(a, b) = \gcd(b, a \mod b)

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:

\operatorname{lcm}(a, b) = \frac{|a \times b|}{\gcd(a, b)}

Relationship

\gcd(a, b) \times \operatorname{lcm}(a, b) = |a \times b|

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.

LCM & GCD Calculator - EasyCalcHub