Least Common Multiple Calculator | Best Calculator

Least Common Multiple Calculator

Calculated LCM:
Formula:
LCM(a, b) = (a × b) / GCD(a, b)
Example: LCM(12, 18) = (12 × 18) / GCD(12, 18) = 216 / 6 = 36
Copied!

What is the Least Common Multiple (LCM)?

The Least Common Multiple (LCM) of two or more integers is the smallest positive number that both (or all) numbers can divide without leaving a remainder. In simpler terms, it’s the lowest number that is a multiple of each of the numbers involved. This is often represented as LCM(a, b) when working with two numbers.

Method 1: Brute Force Approach

One way to find the LCM is by using the “brute force” method. This involves listing out the multiples of each number until you find the smallest common multiple. While this approach is straightforward, it can be time-consuming and less efficient.

Example: Find LCM(18, 26)

Multiples of 18: 18, 36, 54, 72, 90, 108, 126, 144, 162, 180, 198, 216, 234

Multiples of 26: 52, 78, 104, 130, 156, 182, 208, 234

As seen, the smallest common multiple is 234, but listing the multiples can get tedious.

Method 2: Prime Factorization

Another efficient way to calculate the LCM is by using prime factorization. This method involves breaking down each number into its prime factors. Once you have the prime factors, multiply the highest powers of each prime number together to find the LCM. While this method is more efficient than brute force, it still works best with smaller numbers.

Example: Find LCM(21, 14, 38)

  • 21 = 3 × 7

  • 14 = 2 × 7

  • 38 = 2 × 19

To get the LCM, multiply the highest powers of each prime:
LCM = 3 × 7 × 2 × 19 = 798

Method 3: Using the Greatest Common Divisor (GCD)

Another popular method to calculate the LCM is by using the greatest common divisor., also known as the Greatest Common Factor (GCF). To find the LCM of two numbers using their GCD, use the formula:
LCM(a, b) = (a × b) / GCD(a, b)

If you have more than two numbers, you can find the LCM in steps. First, calculate the LCM of two numbers, then use that result to find the LCM with the third number, and so on.

Example: Find LCM(21, 14, 38)

  • Find GCD(14, 38) = 2

  • Use the formula: LCM(14, 38) = (14 × 38) / 2 = 266

Next, find GCD(266, 21) = 7
LCM(266, 21) = (266 × 21) / 7 = 798

So, the LCM of 21, 14, and 38 is 798.

Conclusion

Each method for calculating the LCM has its own advantages. The brute force method is simple but not very efficient for large numbers. Prime factorization is faster but better suited for smaller integers, while using the GCD is a great choice for accuracy and efficiency, especially when dealing with more than two numbers. You can choose the method that works best for your needs and apply it accordingly!