LCM, GCD and the least common denominator
How the least common multiple, the greatest common divisor and the least common denominator fit together, with worked steps.
Two sides of the same relationship
The least common multiple and the greatest common divisor are mirror images of the same factor structure. The GCD is the largest number that divides two integers, while the LCM is the smallest number they both divide into. They are linked by a single identity: for any positive integers a and b, lcm(a, b) times gcd(a, b) equals a times b. That is why this calculator finds the GCD first and then divides the product by it, rather than searching through multiples one by one. Knowing one quantity effectively hands you the other for free.
Folding the rule across a list
The identity only describes two numbers, yet the LCM of a whole list is often what you need. The trick is that the operation is associative: lcm(a, b, c) equals lcm(lcm(a, b), c). The calculator uses exactly this, combining the running result with each new value in turn. For 12, 18 and 30 it first finds lcm(12, 18) = 36, then lcm(36, 30) = 180. Because each step reuses the fast pairwise formula, a list of twenty numbers costs no more thought than a single pair.
Finding a least common denominator
The most common everyday use of the LCM is adding fractions. To add 1/4 and 1/6 you need a shared denominator, and the smallest one is lcm(4, 6) = 12. Rewriting gives 3/12 and 2/12, which add to 5/12 without ever changing the original values. Using the least common denominator rather than simply multiplying the denominators keeps the numbers small and the final fraction closer to lowest terms, which means less simplifying at the end.
Where LCMs show up outside the classroom
Least common multiples answer any question about when repeating cycles line up again. If one task runs every 12 minutes and another every 18, both fire together every lcm(12, 18) = 36 minutes. The same logic schedules overlapping shifts, aligns gear teeth, sets the period of combined signals, and works out when two orbiting or blinking things return to the same starting position. Any time two rhythms need to synchronize, the LCM is the beat they share.