Change language

Mathematics

Least common multiple calculator

Compute the LCM of several numbers to add fractions or synchronise repeating cycles.

Published by SolucionesAhora.com How we verify

Calculator inputs

Separated by commas or spaces

Results

Enter your values and press “Calculate” to see the result.

Free, no sign-up! What if you could do this without a calculator? A five-minute game with challenges, lives and points. It clicks even when you cannot be bothered.

In short

What it calculates
Compute the LCM of several numbers to add fractions or synchronise repeating cycles.
Formula used
lcm(a, b) = |a × b| / gcd(a, b)
Example
Example 1: LCM of 4, 6 and 10

LCM calculator

The least common multiple is the smallest number that is a multiple of every value you enter.

It is used to add fractions with different denominators and to work out how often two repeating cycles line up.

How it works

It is derived from the greatest common divisor: the product of two numbers divided by their GCD gives the LCM. With more than two values the same operation is applied cumulatively.

Formula

lcm(a, b) = |a × b| / gcd(a, b)

lcm(a, b, c) = lcm(lcm(a, b), c)

Worked example

Example 1: LCM of 4, 6 and 10

1. lcm(4, 6) = 24 / 2 = 12
2. lcm(12, 10) = 120 / 2 = 60

Result: 60

Example 2: LCM of 8, 12 and 18 (common denominator to add 1/8 + 5/12 + 7/18)

By prime factorisation:
8 = 2³ · 12 = 2² · 3 · 18 = 2 · 3²

Take each prime with its highest power: 2³ · 3² = 8 · 9 = 72

Result: 72

Explanation

Adding fractions requires a common denominator

A third plus a quarter is not two sevenths. Both must be taken to the same denominator, and the lowest common multiple of three and four is twelve: four twelfths plus three twelfths is seven twelfths. Any common multiple works, but the lowest one saves simplifying afterwards.

Gears and cycles that coincide

Two gear wheels of twelve and eighteen teeth return to their starting position every thirty-six teeth, their lowest common multiple. The same idea explains when two buses running every fifteen and every twenty minutes coincide, or when two planets realign.

Relationship with the greatest common divisor

The product of two numbers always equals the product of their greatest common divisor and their lowest common multiple. That identity lets you calculate one from the other without repeating the factorisation, and it is the basis of the fast method.

Calendars and leap years

The twenty-eight year cycle after which the calendar repeats exactly comes from combining the seven days of the week with the four-year leap cycle: their lowest common multiple is twenty-eight.

Frequently asked questions

Why do I need the LCM to add fractions?

Because it is the smallest possible common denominator, which keeps the numbers from growing unnecessarily large.

Can one of the numbers be zero?

No. Zero has no multiples other than itself, so the LCM is undefined.

How do I calculate the LCM quickly?

Multiply the two numbers and divide by their greatest common divisor. The product of GCD and LCM always equals the product of the numbers.

When do buses running every 15 and every 20 minutes coincide?

Every sixty minutes, which is the lowest common multiple of fifteen and twenty.

How do I find the LCM with prime factors?

Break each number into primes and multiply each prime raised to the highest power that appears. For 8, 12 and 18 you take 2³ and 3², which give 72.

How are the LCM and the GCD related?

For two numbers, LCM × GCD = a × b. With 12 and 18 the GCD is 6, and 36 × 6 = 216 = 12 × 18.

Can the LCM be one of the numbers?

Yes, when that number is a multiple of all the others. The LCM of 4, 8 and 16 is 16.

Sources and references

The formula behind this calculator is not ours. These are the sources it comes from, in APA 7 format, in case you want to go to the original or cite them in your own work.

  1. Weisstein, E. W. (s. f.). Least Common Multiple. MathWorld—A Wolfram Web Resource. https://mathworld.wolfram.com/LeastCommonMultiple.html https://mathworld.wolfram.com/LeastCommonMultiple.html Definition of the least common multiple and its link to the greatest common divisor.
  2. Knuth, D. E. (1997). The Art of Computer Programming, Volume 2: Seminumerical Algorithms (3rd ed.). Addison-Wesley. Section 4.5.2: Euclid’s algorithm, on which the LCM computation rests.

Need to calculate something else?

These tools are often used alongside this calculator.

GCD

Find the GCD of two or more whole numbers using Euclid’s algorithm.

Fractions

Add, subtract, multiply or divide two fractions and get the result already simplified.

Prime numbers

Check whether a number is prime and break it down into its prime factors.

Sequences

Compute the nth term and the sum of an arithmetic or geometric sequence.

Calculator

Type the whole expression and get the result instantly, brackets and functions included.

Percentage

The four most common percentage calculations in a single tool.