CalculatorPro Tools

How to Find the Least Common Multiple

There are two quick ways to find the LCM, and both are worth knowing because they fail in different situations.

Skip the manual math. Enter your numbers and get the answer instantly.

Try the GCD and LCM Calculator

The Formula Method

Divide the first number by the GCD of the pair, then multiply by the second number. For 4 and 6 the GCD is 2, so 4 divided by 2 is 2 and 2 times 6 is 12.

Why Divide Before Multiplying

The product divided by the GCD gives the same answer, but the intermediate product can be far larger than needed. Dividing first keeps the intermediate value small, which matters for large inputs where the naive route can overflow.

The Prime Factorisation Method

Factorise both numbers, then for each prime take the highest power appearing in either and multiply them together. For 12 and 18, that is 2 squared times 3 squared, which is 36.

When to Use Each

The formula is quickest for two small numbers. Prime factorisation is better when the numbers are large or share obvious structure, and it is the method to use when you need the factorisation anyway.

More Than Two Numbers

Fold pairwise as you did for the GCD. The LCM of 4, 6 and 10 is the LCM of 12 and 10, which is 60.

The Zero Case

If any input is zero the LCM is zero, since zero is a multiple of every number. This is a valid answer rather than an error, and it is worth recognising rather than treating as a calculation failure.

Worked Example

For 12 and 18, the GCD is 6, so 12 divided by 6 is 2 and 2 times 18 is 36. Checking: 36 divided by 12 is 3 and by 18 is 2, and nothing smaller is a common multiple.

Calculate It Now

Last updated: · by CalculatorPro Tools