Skip to main content

Least Common Multiple Calculator

Find the LCM of two or more numbers using prime factorization and the GCF method. Enter values for instant results with step-by-step formulas.

Reviewed by Manoj Kumar, Mathematics Educator

Reviewed by Manoj Kumar, Mathematics Educator

Formula

LCM(a, b) = (a x b) / GCF(a, b)

The LCM can be found by dividing the product of the two numbers by their GCF. Equivalently, using prime factorization, the LCM is the product of all prime factors raised to their maximum powers across both numbers. LCM(a,b) x GCF(a,b) = a x b always holds.

Worked Examples

Example 1: LCM of 12 and 18

Problem:Find the LCM of 12 and 18 using both the GCF method and prime factorization.

Solution:GCF Method:\nGCF(12, 18): 18 = 12 x 1 + 6, 12 = 6 x 2 + 0, so GCF = 6\nLCM = (12 x 18) / 6 = 216 / 6 = 36\n\nPrime Factorization:\n12 = 2^2 x 3\n18 = 2 x 3^2\nLCM = 2^2 x 3^2 = 4 x 9 = 36\n\nVerify: 36 / 12 = 3 (integer), 36 / 18 = 2 (integer)

Result:LCM(12, 18) = 36 | GCF = 6 | Product = 216

Example 2: Adding Fractions with LCM

Problem:Use the LCM to add 5/8 + 7/12.

Solution:Find LCD = LCM(8, 12):\n8 = 2^3, 12 = 2^2 x 3\nLCM = 2^3 x 3 = 24\n\nConvert fractions:\n5/8 = (5 x 3)/(8 x 3) = 15/24\n7/12 = (7 x 2)/(12 x 2) = 14/24\n\nAdd: 15/24 + 14/24 = 29/24\nResult: 29/24 = 1 and 5/24

Result:LCD = 24 | 5/8 + 7/12 = 29/24 = 1.2083...

Frequently Asked Questions

What is the Least Common Multiple and how is it different from the GCF?

The Least Common Multiple (LCM) of two or more numbers is the smallest positive integer that is divisible by all of the given numbers. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6. The GCF (Greatest Common Factor) works in the opposite direction, finding the largest number that divides into all given numbers. While the GCF takes the minimum prime exponents, the LCM takes the maximum prime exponents from each number. The LCM is always greater than or equal to the largest of the input numbers, while the GCF is always less than or equal to the smallest input number. These two values are mathematically linked by the formula LCM(a,b) times GCF(a,b) = a times b.

What are common mistakes when calculating the LCM?

The most common mistake is confusing the LCM with the GCF, which work in opposite directions. Another frequent error is simply multiplying the numbers together, which only gives the correct LCM when the numbers are coprime. For example, LCM(6, 10) = 30, not 60. Students also sometimes forget that the LCM must be a multiple of both numbers, which provides a quick sanity check. When using prime factorization, a common error is taking the minimum instead of maximum exponents, which gives the GCF instead. When finding the LCM of multiple numbers, applying the formula in the wrong order or forgetting to iterate properly can lead to errors. Always verify your answer by confirming that the result is divisible by each input number.

References

Reviewed by Manoj Kumar, Mathematics Educator ยท Editorial policy