GCD & LCM Calculator

Find the greatest common divisor (GCD) and least common multiple (LCM) of two whole numbers.

Result

GCD (greatest common divisor)

6

LCM (least common multiple)

36

How it works

LCM = (a × b) ÷ GCD

The GCD is the largest number that divides both; the LCM is the smallest number both divide into. Example: 12 and 18 → GCD 6, LCM 36.

Advertisement

Frequently asked questions

How is the GCD found?

By Euclid's algorithm: repeatedly replace the larger number by the remainder of the division until one is zero.

How are GCD and LCM related?

For any two numbers, GCD × LCM = a × b.

Advertisement

Related calculators