LCM & GCD Calculator
Find the least common multiple (LCM) and greatest common divisor (GCD) of two numbers, with the method explained.
GCD (Euclidean Algorithm): Repeatedly replace the larger number with the remainder of dividing the larger by the smaller. When the remainder reaches 0, the other number is the GCD.
LCM Formula: LCM(a, b) = (a x b) / GCD(a, b)
Example:
Numbers = 12 and 18
GCD: 18 mod 12 = 6, then 12 mod 6 = 0, so GCD = 6
LCM = (12 x 18) / 6 = 216 / 6 = 36
Check: multiples of 12 are 12, 24, 36; multiples of 18 are 18, 36. The first common one is 36.
Frequently Asked Questions
What is the GCD used for?
The GCD (also called the HCF, highest common factor) simplifies fractions: dividing the top and bottom of 12/18 by their GCD of 6 gives 2/3. It is also used for sharing items into equal groups with nothing left over.
What is the LCM used for?
The LCM finds when repeating cycles line up: two buses leaving every 12 and 18 minutes depart together every 36 minutes. It is also the key step in adding fractions with different denominators.