CalculatorBear
English

LCM Calculator

Find the least common multiple of two to ten whole numbers, with prime factorizations and the greatest common factor.

Separate numbers with commas, spaces or new lines.

LCM of 12, 18

36

Greatest common factor (GCF)
6
Prime factors of 12
2² × 3
Prime factors of 18
2 × 3²

Results are provided for general information only.

About the LCM calculator

The least common multiple (LCM) of several whole numbers is the smallest positive number that every one of them divides evenly. It is the number you need when you add fractions with different denominators or when two repeating events must line up.

Enter between two and ten whole numbers. The calculator shows the LCM, the greatest common factor of the same numbers, and the prime factorization of each. Very large answers are handled exactly, with no rounding.

If any of the numbers is 0, the only common multiple is 0. Negative numbers are treated by their absolute value.

Formula

  • LCM(a, b) = |a × b| ÷ GCF(a, b)
  • LCM(a, b, c) = LCM(LCM(a, b), c)
  • Using primes: take each prime at its highest power in any number

Example

12 = 2² × 3 and 18 = 2 × 3². Taking the highest power of each prime gives 2² × 3² = 36, so LCM(12, 18) = 36.