Skip to content
SimplCalc

LCM Calculator

Enter two or more whole numbers to get their least common multiple and see how it is built.

Two to 10 whole numbers, separated by commas or spaces.

Result

Least common multiple (LCM)
12

The smallest positive whole number that every number in the list divides without a remainder.

Multiples up to the LCM

  • 4: 4, 8, 12
  • 6: 6, 12

Prime factorisation

  • 4 = 22
  • 6 = 2 × 3

Each prime with its largest exponent: 22 × 3 = 12

Formula: lcm(a, b) = a × b / gcd(a, b)

  • lcm(4, 6) = 4 × 6 / 2 = 12

How to use the LCM calculator

Enter two to ten whole numbers separated by commas or spaces. The least common multiple is shown together with the working: the multiples of each number when the lists are short, the prime factorisation of each number, and the formula applied to each pair. Negative signs are ignored. Use digits only, up to 30 digits per number.

How the LCM is found

Listing multiples. Write the multiples of each number in turn and take the first one they all share.

Prime factorisation. Write each number as a product of primes and multiply every prime that appears in any of them, each with the largest exponent it has in any number.

Formula. For two numbers, lcm(a, b) = a × b / gcd(a, b). For a longer list the calculator applies this to the first two numbers, then to that result and the third number, and so on.

Worked example: LCM(4, 6)

  • Multiples of 4: 4, 8, 12. Multiples of 6: 6, 12. The first shared multiple is 12.
  • 4 = 22 and 6 = 2 × 3, so the LCM is 22 × 3 = 12.
  • Formula: 4 × 6 / gcd(4, 6) = 24 / 2 = 12.

Limits and conventions

  • The LCM of a list that contains 0 is 0 by convention.
  • LCM(a, b) × GCF(a, b) = a × b for two numbers, so the GCF calculator gives the same relationship from the other side.
  • Prime factorisations are listed for numbers up to 1015. For larger numbers (up to 30 digits) the LCM is still exact, because the formula only needs the GCF.
  • The LCM can be much larger than the inputs. A list of ten numbers is exact but can run to many digits.

Frequently asked questions

How do I find a common denominator with the LCM?

The least common denominator of several fractions is the LCM of their denominators. For 1/4 and 1/6 the LCM of 4 and 6 is 12, so both fractions can be written with a denominator of 12 (3/12 and 2/12).

What is the LCM of two numbers that share no factors?

Their product. For 7 and 13 the LCM is 91. Numbers with no common factor other than 1 are called coprime.

What is the LCM when one of the numbers is 0?

The result is 0 by convention, because 0 is the only number that is a multiple of 0. This calculator shows a note when it applies the rule.

Sources and methodology

Last reviewed 2026-12-04