LCM Calculator

Find the least common multiple of two or more positive integers. Enter your numbers below and get the answer with step-by-step calculations.

Separate numbers with commas, spaces, semicolons, or new lines.

What Is the Least Common Multiple?

The least common multiple (LCM) is the smallest positive integer that is divisible by two or more numbers.

For example, the multiples of 4 are:

4, 8, 12, 16, 20, 24, ...

The multiples of 6 are:

6, 12, 18, 24, 30, ...

The first positive number appearing in both lists is 12. Therefore:

LCM(4, 6) = 12

LCM Formula

For two positive integers a and b, the LCM can be calculated using the greatest common divisor:

LCM(a, b) = (a × b) ÷ GCD(a, b)

Example

Consider 12 and 18.

GCD(12, 18) = 6

LCM(12, 18) = (12 × 18) ÷ 6

LCM(12, 18) = 36

LCM and Prime Factorization

Another method for finding an LCM is prime factorization. Factor each number into prime numbers and then take the highest exponent of every prime that appears.

For example:

12 = 2² × 3
18 = 2 × 3²

LCM = 2² × 3² = 36

LCM vs. GCD

The GCD is the greatest number that divides all of the input numbers. The LCM is the smallest positive number that is divisible by all of them.

For two positive integers, they are related by:

GCD(a, b) × LCM(a, b) = a × b