Skip to main content
Calculator WorldProFree online calculators

LCM Calculator

Find the smallest positive number that all of your numbers divide into evenly. Each number's prime factorization is shown, so you can see where the answer comes from.

Two or more non-zero integers

Results update automatically as you type.

Result

LCM(4, 6, 15)

60

GCD of the same numbers
1
Show calculation steps
  1. 4 = 2^2
  2. 6 = 2 × 3
  3. 15 = 3 × 5
  4. Take each prime at its highest power: 2^2 × 3 × 5
  5. LCM = 60

How to use the LCM Calculator

  1. Enter two or more non-zero whole numbers.
  2. Read the LCM, along with the GCD of the same numbers for reference.
  3. Open the steps to see each prime factorization.

Formula

LCM = product of every prime at its highest power
For two numbers: lcm(a, b) = |a × b| ÷ gcd(a, b)

Factor each number into primes, then take each prime the greatest number of times it appears in any single factorization. Multiplying these gives the smallest number that contains every original number as a factor.

Worked example: LCM of 4, 6 and 15

  1. 4 = 2²
  2. 6 = 2 × 3
  3. 15 = 3 × 5
  4. Highest powers: 2² × 3 × 5

LCM = 60

Prime factorization at a glance

Every integer greater than 1 has exactly one prime factorization, a result called the Fundamental Theorem of Arithmetic. That uniqueness is why the highest-power method always gives the correct LCM.

The Fraction Calculator uses LCM automatically when adding or subtracting fractions.

Assumptions & limitations

  • Zero has no meaningful LCM, so it is rejected.
  • Negative numbers use their absolute value.
  • Results above 9 quadrillion can't be represented exactly and are rejected.

Frequently asked questions

How is LCM used with fractions?

The LCM of the denominators is the least common denominator. To add 1/4 + 1/6, use 12: 3/12 + 2/12 = 5/12.

What is a real-world LCM problem?

If one bus leaves every 12 minutes and another every 18 minutes, both leave together every lcm(12, 18) = 36 minutes.

Is the LCM ever smaller than the numbers?

No. The LCM is always at least as large as the largest number in the list.