LCM Calculator

Find the least common multiple (LCM) of two or more numbers and see the prime factors, a Venn diagram and the working step by step.

What is the least common multiple (LCM)?

The least common multiple (LCM) of two or more whole numbers is the smallest positive number that every one of them divides into exactly. It is also called the lowest common multiple. The multiples of 4 are 4, 8, 12, 16 and so on, and the multiples of 6 are 6, 12, 18 and so on. The first number in both lists is 12, so the LCM of 4 and 6 is 12. This LCM calculator finds the answer for two or more numbers, shows the prime factor working step by step, and draws a Venn diagram of the prime factors for two numbers.

Properties of the LCM

  • The LCM is never smaller than the largest of the numbers.
  • If one number is a multiple of the others, the LCM is that number: LCM(3, 6, 12) = 12.
  • For coprime numbers the LCM is just their product: LCM(7, 9) = 63.
  • GCD(a, b) × LCM(a, b) = a × b, so LCM(a, b) = a × b ÷ GCD(a, b).
  • The order of the numbers does not matter.

How to find the LCM with prime factors

Write each number as a product of primes, then take every prime that appears and keep its highest power. Multiply those together. Here is 12 and 18.

  1. Factorise: 12 = 2² × 3 and 18 = 2 × 3².
  2. List the primes that appear: 2 and 3.
  3. Take the highest power of each: 2² (from 12) and 3² (from 18).
  4. Multiply: 2² × 3² = 4 × 9 = 36.
  5. Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, and no smaller number works, so LCM(12, 18) = 36.

How to find the LCM with the GCD

For two numbers, multiply them and divide by their GCD. For 48 and 18 the GCD is 6, so the LCM is 48 × 18 ÷ 6 = 864 ÷ 6 = 144. Dividing before multiplying (48 ÷ 6 × 18 = 8 × 18 = 144) keeps the numbers smaller.

LCM of three or more numbers

With prime factors, just include every number. For 8, 12 and 20: 8 = 2³, 12 = 2² × 3, 20 = 2² × 5. The highest powers are 2³, 3 and 5, so the LCM is 8 × 3 × 5 = 120. Check: 120 ÷ 8 = 15, 120 ÷ 12 = 10 and 120 ÷ 20 = 6, all whole numbers.

Where the LCM is used

  • Adding and subtracting fractions: the LCM of the denominators is the smallest common denominator. For 1/6 + 1/8, LCM(6, 8) = 24, so 4/24 + 3/24 = 7/24.
  • Scheduling: if one bus leaves every 15 minutes and another every 20 minutes, they leave together every LCM(15, 20) = 60 minutes.
  • Repeating patterns: gears, lights and cycles with different lengths line up again after the LCM of their lengths.
  • Problems about the smallest number that leaves the same remainder or is divisible by several numbers.

Formulas Used

Prime factor method

LCM = product of every prime, each to its highest power

LCM(12, 18): 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36.

Using the GCD

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

LCM(48, 18) = 48 × 18 ÷ 6 = 144.

Several numbers

LCM(a, b, c) = LCM(LCM(a, b), c)

Combine the numbers in pairs. LCM(4, 6, 10): LCM(4, 6) = 12, then LCM(12, 10) = 60.

Variables Explained

a, b

The positive whole numbers you want the common multiple of.

p (prime)

A prime factor that appears in at least one of the numbers.

e (exponent)

The power of a prime. The LCM uses the largest exponent each prime has in any of the numbers.

LCM

The least (lowest) common multiple of the numbers.

Important Notes

•

This calculator works with positive whole numbers up to 1,000,000,000,000 and gives exact results. It is meant for learning, homework checks and everyday use.

•

For legal, financial or engineering work, check the result with a second method before you rely on it.

Frequently Asked Questions

It is the smallest positive number that both numbers divide into without a remainder. The LCM of 4 and 6 is 12, because 12 is the first number that appears in both lists of multiples.
Find the GCD with the Euclidean algorithm, then use LCM = a × b ÷ GCD. For 12 and 18 the GCD is 6, so the LCM is 12 × 18 ÷ 6 = 36.
The GCD is the largest number that divides all the given numbers, so it is never bigger than the smallest one. The LCM is the smallest number that all of them divide into, so it is never smaller than the biggest one.
Their product, because two different primes share no factors. LCM(5, 7) = 35.
The larger number. For example LCM(6, 18) = 18, because 6 already divides 18.
The LCM of the denominators is the smallest common denominator. To add 1/6 and 1/8, use 24: 1/6 = 4/24 and 1/8 = 3/24, so the sum is 7/24.
Yes. Enter them separated by commas. The LCM of 8, 12 and 20 is 120, found by taking 2³, 3 and 5 from their prime factors.
When the numbers are the denominators of fractions, yes. The lowest common denominator is the LCM of the denominators.