Least Common Multiple Calculator
Find the Least Common Multiple (LCM) of two integers — the smallest number both divide into evenly. Essential for adding fractions or scheduling repeating events.
About this calculator
The Least Common Multiple of two integers a and b is the smallest positive integer divisible by both. The most efficient method uses the relationship between LCM and GCD: LCM(a, b) = (a × b) / GCD(a, b). The GCD is found with the Euclidean algorithm — repeatedly take the remainder of dividing the larger number by the smaller until the remainder reaches zero. Because division is faster than listing multiples, this approach works even for large numbers. For example, LCM(12, 18) = (12 × 18) / GCD(12, 18) = 216 / 6 = 36. The LCM is widely used when finding a common denominator for fractions.
How to use
Find the LCM of 8 and 14. First, compute GCD(8, 14): 14 mod 8 = 6, then 8 mod 6 = 2, then 6 mod 2 = 0, so GCD = 2. Now apply the formula: LCM(8, 14) = (8 × 14) / 2 = 112 / 2 = 56. Enter 8 in the First Number field and 14 in the Second Number field. The calculator returns 56 — the smallest number that both 8 and 14 divide into evenly.
Frequently asked questions
What is the difference between LCM and GCD?
The GCD (Greatest Common Divisor) is the largest number that divides both integers without a remainder, while the LCM is the smallest number that both integers divide into without a remainder. They are inversely related: LCM(a, b) = (a × b) / GCD(a, b). For example, GCD(4, 6) = 2 and LCM(4, 6) = 12. GCD is used to simplify fractions; LCM is used to find common denominators.
When would you use the least common multiple in real life?
The LCM appears whenever you need to synchronize repeating cycles. For instance, if one bus runs every 8 minutes and another every 12 minutes, they next coincide after LCM(8, 12) = 24 minutes. In math, LCM is essential for adding or subtracting fractions with different denominators — you need the least common denominator, which is the LCM of the two denominators. It also appears in scheduling, music theory, and gear ratio problems.
How do you find the LCM of more than two numbers?
To find the LCM of three or more numbers, apply the two-number LCM formula iteratively. First compute LCM(a, b), then compute LCM(result, c), and so on. For example, LCM(4, 6, 10) = LCM(LCM(4, 6), 10) = LCM(12, 10) = 60. This works because the LCM operation is associative. Alternatively, prime factorization can be used: take the highest power of each prime factor appearing in any of the numbers and multiply them together.