KKwikfig.

LCM Calculator

Find the least common multiple of two or more numbers using prime factors or listing multiples, with the shared multiples highlighted in the working. Runs entirely in your browser — your numbers never leave this device.

Least common multiple
24
LCM of 4, 6, 8 = 24
Greatest common factor (bonus)
2
Numbers entered
3
Prime factorisation of each number
NumberPrime factorisation
44 = 2²
66 = 2 × 3
88 = 2³

How it works

Prime factor method: write each number as a product of primes, take the highest power of every prime that appears, and multiply them | Two numbers: LCM(a, b) = (a × b) / GCF(a, b)

The least common multiple is the smallest number that every one of your numbers divides into exactly. The calculator finds it by prime factorisation: each number is broken into primes, the highest power of each prime across all the numbers is kept, and those powers are multiplied together. For 4, 6 and 8 that means 4 = 2², 6 = 2 × 3 and 8 = 2³, so the LCM takes 2³ (from the 8) and 3¹ (from the 6): 8 × 3 = 24.

The working also lists the first few multiples of each number, because for small inputs that is the fastest way to see the answer — the LCM is simply the first multiple that appears in every list. For two numbers there is a shortcut worth knowing: LCM(a, b) = (a × b) / GCF(a, b), which the calculator uses as an independent check on the factorisation result.

Signs are ignored (the LCM of −4 and 6 is the same as the LCM of 4 and 6), and a single number's LCM is the number itself. Zero is the one special case: by convention the LCM of any number and 0 is 0, since 0 is the only multiple of 0 — the calculator reports this rather than hunting forever for a positive common multiple that does not exist.

Worked examples

Two numbers: LCM of 4 and 6

Input
Numbers = 4, 6
Working
Multiples of 4: 4, 8, 12, 16… Multiples of 6: 6, 12, 18… The first multiple in both lists is 12. Check with the shortcut: (4 × 6) / GCF(4, 6) = 24 / 2 = 12.
Result
LCM(4, 6) = 12

Three numbers: LCM of 4, 6 and 8

Input
Numbers = 4, 6, 8
Working
Prime factors: 4 = 2², 6 = 2 × 3, 8 = 2³. Take the highest power of each prime: 2³ = 8 and 3¹ = 3. LCM = 8 × 3 = 24. Check: 24 / 4 = 6, 24 / 6 = 4, 24 / 8 = 3 — all whole numbers, and no smaller number works.
Result
LCM(4, 6, 8) = 24

Coprime numbers: LCM of 5 and 7

Input
Numbers = 5, 7
Working
5 and 7 share no common factor except 1 (they are coprime), so no multiple smaller than their product can contain both. LCM = 5 × 7 = 35. Check: 35 / 5 = 7 and 35 / 7 = 5.
Result
LCM(5, 7) = 35

Frequently asked questions

What is the LCM used for in real problems?

Its most common job is adding and subtracting fractions: the LCM of the denominators is the common denominator, so LCM(4, 6) = 12 turns 1/4 + 1/6 into twelfths. It also answers scheduling questions — if one bus runs every 4 days and another every 6, they coincide every 12 days — and any problem where cycles of different lengths must line up.

What is the difference between LCM and GCF?

They are opposites in spirit. The GCF is the largest number that divides into all your numbers (it is never bigger than the smallest of them); the LCM is the smallest number that all your numbers divide into (it is never smaller than the largest of them). For two numbers they are linked: LCM × GCF = the product of the two numbers, as in 12 × 2 = 4 × 6.

Why is the LCM of coprime numbers just their product?

Coprime numbers share no prime factors, so a common multiple must contain every prime factor of both numbers at full strength — nothing can be shared or overlapped. The smallest such number is exactly the product, which is why LCM(5, 7) = 35 and LCM(4, 9) = 36.

Can I find the LCM of more than two numbers?

Yes — enter three or more numbers and the prime factor method handles them together, taking the highest power of each prime across the whole set. Doing it by hand, the reliable route is pairwise: find the LCM of the first two, then find the LCM of that result and the next number, and repeat.

What is the LCM if one of the numbers is 0 or 1?

With 1, nothing changes: the LCM is the LCM of the remaining numbers, since every number is a multiple of 1 in the sense required — LCM(1, 6) = 6. With 0, the answer is 0 by convention, because 0 is the only multiple of 0, so it is the only common multiple available.

Does this LCM calculator upload anything?

No. It runs 100% in your browser, so the numbers you enter are processed locally on your device and are never uploaded, stored or shared with anyone.

Related tools

More in Math Calculators · Browse all tools