LCM Calculator
Find the least common multiple (LCM) of two or more numbers, exactly even for very large results, with the steps.
Enter at least two whole numbers, separated by commas or spaces.
Steps
Runs in your browser. What you enter is kept for 30 days to improve Toolgrid, then deleted.
How to use the LCM Calculator
- 1 Type two or more whole numbers, separated by commas or spaces.
- 2 The least common multiple appears immediately.
- 3 Read the steps to see how each number was combined.
About the LCM Calculator
The least common multiple (LCM) of two numbers is the smallest positive number that both divide into. The LCM of 4 and 6 is 12: the multiples of 4 are 4, 8, 12, … and of 6 are 6, 12, …, and 12 is the first one they share.
The calculator uses the relation lcm(a, b) = a × b / gcd(a, b), where the greatest common divisor comes from the Euclidean algorithm. That is much faster than listing multiples. With more than two numbers it works step by step: lcm(4, 6, 10) = lcm(lcm(4, 6), 10) = lcm(12, 10) = 60. Results are exact, even with dozens of digits.
The LCM is what you need to add fractions (the least common denominator), to find when repeating events coincide (a bus every 12 minutes and one every 18 minutes leave together every 36 minutes), and for gear ratios and schedules.
Frequently asked questions
What is the LCM of 0 and a number?
By convention it is 0: the only multiple of 0 is 0.
How do you find the LCM of three numbers?
Combine them two at a time: first lcm of the first two, then the lcm of that result with the third.
What is the difference between the LCM and the GCD?
The GCD is the largest number that divides all of them; the LCM is the smallest number all of them divide into. For 4 and 6 the GCD is 2 and the LCM is 12.
How is the LCM used with fractions?
To add or subtract fractions, rewrite them with the LCM of the denominators: for 1/4 + 1/6 that is 12, so 3/12 + 2/12 = 5/12.
Can I use negative numbers?
Yes. The LCM is given as a positive number: lcm(−4, 6) = 12.