Skip to content

LCM Calculator

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

LCM Worksheet

Something wrong or missing? Tell us — we read every report and fix issues fast.

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 of 8 and 12?

The LCM of 8 and 12 is 24. Factor each number: 8 is 2 cubed and 12 is 2 squared times 3. Take the highest power of each prime, 2 cubed times 3, which gives 24. Check: 24 divided by 8 is 3 and 24 divided by 12 is 2, both whole numbers.

How do you find the LCM of two numbers?

Factor each number into primes, take the highest power of each prime that appears, and multiply them. For 4 and 6, 4 is 2 squared and 6 is 2 times 3, so the LCM is 2 squared times 3 = 12. For three or more numbers, find the LCM of the first two, then of that result and the next number.

What is the difference between LCM and GCD?

The LCM is the smallest number that all the inputs divide into, while the GCD is the largest number that divides all of them. For 4 and 6, the LCM is 12 and the GCD is 2. They are linked by LCM(a, b) x GCD(a, b) = a x b, and 12 x 2 = 24 = 4 x 6.

What is the LCM of two prime numbers?

The LCM of two different prime numbers is their product. LCM(7, 11) is 77, because primes share no common factor, so no smaller number is a multiple of both. The same applies to any two numbers with no common factor other than 1, such as 8 and 9, whose LCM is 72.