Skip to content

LCM Calculator

Calculate the Least Common Multiple of two or more numbers. Shows prime factorization and GCD.

Enter at least 2 positive integers

How to Find the LCM

The Least Common Multiple (LCM) is the smallest positive number that is a multiple of all given numbers. There are several methods to find it:

Prime Factorization Method

Factor each number into primes, then take the highest power of every prime that appears:

  • 12 = 2² × 3
  • 18 = 2 × 3²
  • LCM = 2² × 3² = 36

GCD Method

For two numbers, use the relationship: LCM(a, b) = |a × b| / GCD(a, b)

Example: LCM(12, 18) = (12 × 18) / GCD(12, 18) = 216 / 6 = 36

Listing Multiples Method

List multiples of each number until you find the first common one:

  • Multiples of 4: 4, 8, 12, 16, 20, 24...
  • Multiples of 6: 6, 12, 18, 24...
  • LCM(4, 6) = 12

Common Uses for LCM

  • Adding fractions: Find the least common denominator (LCD), which is the LCM of the denominators
  • Scheduling: Determine when repeating events coincide (e.g., two buses with different intervals)
  • Gears and pulleys: Calculate when teeth or rotations align
  • Music: Finding when rhythmic patterns repeat together

LCM and GCD Relationship

For any two positive integers a and b:

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

This means if you know the GCD, you can quickly find the LCM, and vice versa. This calculator shows both values automatically.

Related Calculators

Frequently Asked Questions

What is the LCM?

The Least Common Multiple (LCM) of two or more numbers is the smallest positive integer that is divisible by all of them. For example, LCM(4, 6) = 12.

How do you find the LCM?

The most efficient method uses prime factorization: factor each number into primes, then take the highest power of each prime that appears. Multiply them together to get the LCM.

What is the difference between LCM and GCD?

LCM is the smallest number divisible by all inputs. GCD (Greatest Common Divisor) is the largest number that divides all inputs evenly. They are related: LCM(a,b) × GCD(a,b) = a × b.

Can I find the LCM of more than 2 numbers?

Yes. Compute LCM of the first two numbers, then compute the LCM of that result with the third number, and so on. This calculator supports any number of inputs.

What if one number is 0?

LCM is only defined for positive integers. If any input is 0, the LCM is 0 by convention, though some definitions leave it undefined.

When is LCM useful?

LCM is used to find common denominators when adding fractions, synchronize repeating events (schedules, gears, signals), and solve problems in number theory and cryptography.