Omni Calculator logo

Least Common Multiple Calculator

Created by Davide Borchia
Reviewed by Komal Rafay
Last updated: Jan 18, 2024


Our least common multiple calculator will be a valuable help in your math homework: you can find the least common multiple of large sets of numbers in the blink of an eye and even see how we found it step-by-step. Keep reading this short article to learn:

  • What is the least common multiple?
  • How to calculate the least common multiple?

Three algorithms for this quantity;
and much more: the situations when we can't calculate it, how to deal with negative numbers, and so on.

What is the least common multiple?

The least common multiple of a set of numbers is the smallest possible integer that is a multiple to each of the numbers in the set. What is a multiple of a number? A multiple is the result of the multiplication of the number by another integer. For example, the multiples of 44 are 44 (4×14\times1), 88 (4×24\times2), 1212 (4×34\times3), 1616 (4×44\times4), etc.

The least common multiple is defined to be a positive number, so feel free to ignore eventual negative signs in your calculations.

How do I calculate the least common multiple?

You can calculate the least common multiple in many ways. Among them:

  • Using the greatest common divisor;
  • Using the prime factorization; and
  • The table method.

Calculate the least common multiple using the greatest common divisor

This is the most straightforward way to calculate the least common multiple. Take any set of numbers, and follow these steps:

  1. Multiply all the numbers in the set, and take the absolute value of the result.
  2. Divide the product by the greatest common divisor.
  3. The result is the least common multiple. Notice that the result is always an integer by definition of the quantities involved.

Let's see the mathematical formulation of this method for a set {a,b}\{a,b\}:

lcm(a,b)=abgcd(a,b)\mathrm{lcm}(a,b) = \frac{\big| a\cdot b \big|}{\mathrm{gcd}(a,b)}

Notice that you can even make this procedure more manageable by taking apart one of the numbers at a time:

lcm(a,b)=agcd(a,b)=bagcd(a,b)\begin{split} \mathrm{lcm}(a,b) &= \big| a \big|\cdot\frac{\big| \big|}{\mathrm{gcd}(a,b)}\\ &=\big| b \big|\cdot\frac{\big| a\big|}{\mathrm{gcd}(a,b)} \end{split}

Each of the numbers in this formula is at most equal to the least common multiple. If the set has more than three elements, simply apply this algorithm to an arbitrary pair in the set, and substitute the two numbers with the result. Apply the algorithm to the resulting set again until you are left with two numbers only.

🙋 There are many ways to calculate the greatest common divisor: we explored the most important of them in our dedicated tool, the greatest common divisor calculator.

Find the least common multiple using the prime factorization

You can find the least common multiple in a safe yet time-consuming way: follow these steps:

  1. Find the prime factorization of all numbers in the set.
  2. Identify all the factors appearing in the factorizations, and if repeated, choose the highest exponent.
  3. Multiply the factors elevated to the chosen exponents to find the least common multiple.

Finding the prime factorization is not an easy task, and it's better to leave it to algorithms like the one we implemented in the prime factorization calculator.

Find the least common multiple with the table method

This is another time-consuming method, but at least it doesn't require you to calculate the prime factorization.

  1. List all numbers vertically.
  2. Try to divide the numbers by 22 (the first proper prime number).
    • If 22 divides a number, write the result in a new column.
    • If 22 doesn't divide a number, write the number unchanged in the new column.
  3. Repeat the step 2., and try to divide again by 22. Keep trying until no numbers can be divided by 22.
  4. Try to divide by 33, and repeat the method seen in the step 2.
  5. Proceed with all prime numbers in increasing order.
  6. The algorithm stops when a prime number can't divide any numbers in a column, and all the numbers are 11.

The least common multiple is the product of all the numbers that divided at least one of the numbers in the columns.

Here is an example for the set {14,25,12,6,24}\{14,25,12,6,24\}:

How to find the lcm using the table method

The result is 2×2×2×3×5×5×7=42002\times2\times2\times3\times5\times5\times7 = 4200

What are the applications of the least common multiple?

The least common multiple finds many applications. The most common one, however, rarely sees us even identifying it! We regularly use the least common multiple when summing fractions. The new denominator we use when we start summing (before eventually simplifying the result) is the least common multiple of the denominators!

Engineers use the least common multiple to understand the behavior of toothed gears. Since the teeth are in a 1-to-1 relationship, the least common multiple between the number of teeth of two contiguous gears is connected to the number of rotations that each gear has to complete before returning to the original position in relation to the other gear.

We analyzed the least common multiple under... multiple angles: visit our other tools!

FAQ

What is the least common multiple of 0 and any other number?

There are two possible interpretations of this problem:

  1. The least common multiple of any number and 0 is undefined as division by zero is undefined.
  2. The least common multiple of any number and 0 is 0 since 0 is an integer number that satisfies the definition of the least common multiple.

When summing fractions, the first choice is the only one making sense, but in other fields, you may find it helpful to use 0 as a result.

How do I calculate the least common multiple using the GCD?

To calculate the least common multiple of a set of numbers using the greatest common divisor, follow these simple steps:

  1. Compute the absolute value of the product of all the numbers in the set.
  2. Divide the result by the greatest common divisor of the numbers in the set.
  3. The result is the least common multiple.

You can also compute the product of all but one of the numbers and multiply the result of the division as the last stage. The result will be the same, but no quantity will pass the least common multiple.

What is the least common multiple of 12, 16, and 21?

The least common multiple of 12, 16, and 21 is 336. To find the result, follow these steps:

  1. Find the prime factorization of each number:
    • 12 = 2 × 2 × 3;
    • 16 = 2 × 2 × 2 × 2; and
    • 21 = 3 × 7.
  2. Identify all factors in the factorizations: 2, 3, and 7.
  3. Select the highest exponent with which each of them appears: 24, 3, and 7.
  4. Multiply all these factors to find the least common multiple: lcm(12,16,21) = 24 × 3 × 7 = 336.
Davide Borchia
Data (you may enter up to 15 numbers)
#1
#2
Step by step solution?
Choose method:
None
Check out 75 similar arithmetic calculators ➗
Absolute changeAbsolute valueAdding and subtracting fractions… 72 more
People also viewed…

Cos 2 theta

This cos 2 theta calculator will teach you all there is about the double angle formula for the cosine function.

Sleep

The sleep calculator can help you determine when you should go to bed to wake up happy and refreshed.

Titration

Use our titration calculator to determine the molarity of your solution.

Trapezoid side

Find the length of the missing side (a, b, c or d) of a trapezoid with the trapezoid side calculator.
Copyright by Omni Calculator sp. z o.o.
Privacy, Cookies & Terms of Service