šŸ”¢ Math

šŸ”¢ šŸ”¢ LCM Calculator: How to Find Least Common Multiple

Learn how to find the Least Common Multiple (LCM) using prime factorization and the Euclidean algorithm. Covers methods, worked examples, and real-world uses in fractions and scheduling.

⏱️ 8 min read🦉 365tool.net🌍 For everyone worldwide

The Least Common Multiple (LCM) is the smallest positive integer that is divisible by all the given numbers without a remainder. It is the foundation for adding and subtracting fractions, finding common denominators, synchronizing repeating events in scheduling, and solving a wide range of number theory problems. Understanding how to calculate LCM — and why it works — makes fractions and periodic problems far easier to handle.

What is LCM?

The LCM of two or more numbers is the smallest number that appears in the multiplication tables of all the given numbers.

  • Multiples of 4: 4, 8, 12, 16, 20, 24, ...
  • Multiples of 6: 6, 12, 18, 24, ...
  • LCM(4, 6) = 12 — the first number appearing in both lists

This listing method works for small numbers, but for larger numbers, prime factorization or the Euclidean algorithm are far more efficient.

Method 1: Prime Factorization

Step 1: Find the prime factorization of each number.
Step 2: Take every prime factor that appears, using the highest power it appears in any one number.
Step 3: Multiply these together.

Example: LCM(12, 18)

  • 12 = 2² Ɨ 3
  • 18 = 2 Ɨ 3²
  • LCM = 2² Ɨ 3² = 4 Ɨ 9 = 36

(Take 2² from 12, 3² from 18 — the highest power of each prime across all numbers.)

Example: LCM(8, 12, 20)

  • 8 = 2³
  • 12 = 2² Ɨ 3
  • 20 = 2² Ɨ 5
  • LCM = 2³ Ɨ 3 Ɨ 5 = 8 Ɨ 3 Ɨ 5 = 120

Method 2: Using GCD (Euclidean Method)

The relationship between LCM and GCD:

LCM(a, b) = |a Ɨ b| Ć· GCD(a, b)

First find GCD using the Euclidean algorithm (divide larger by smaller, replace larger with remainder, repeat until remainder = 0).

Example: LCM(48, 18)

  • GCD step: 48 Ć· 18 = 2 remainder 12 → 18 Ć· 12 = 1 remainder 6 → 12 Ć· 6 = 2 remainder 0 → GCD = 6
  • LCM = (48 Ɨ 18) Ć· 6 = 864 Ć· 6 = 144

This method is especially efficient for large numbers where prime factorization becomes slow.

LCM in Real-World Contexts

Adding Fractions: The Least Common Denominator

The LCM of the denominators gives the Least Common Denominator (LCD), which lets you add fractions with different denominators:

5/12 + 7/18: LCM(12, 18) = 36 → 15/36 + 14/36 = 29/36

The LCD is always the LCM of the denominators — converting to the LCD is the same as finding the LCM.

Scheduling: Finding When Events Coincide

Two buses leave the same stop — Bus A every 8 minutes, Bus B every 12 minutes. When do they next leave together?

LCM(8, 12) = 24 → they depart together every 24 minutes

This is the classic "scheduling synchronization" problem that appears in operations research, manufacturing, and logistics.

Music: Finding Beat Coincidence

If one drum pattern repeats every 3 beats and another every 4 beats, both restart together every LCM(3, 4) = 12 beats — making 12 beats the actual period of the combined pattern.

Key Properties of LCM

  • LCM(a, b) Ɨ GCD(a, b) = a Ɨ b (valid for two numbers only)
  • LCM of co-prime numbers (GCD = 1) equals their product: LCM(7, 11) = 77
  • LCM is always ≄ the largest of the given numbers
  • LCM of a number with itself = the number: LCM(6, 6) = 6
  • LCM(a, b, c) is found iteratively: LCM(LCM(a, b), c)

LCM vs HCF: The Key Difference

LCM HCF / GCD
Full nameLeast Common MultipleHighest Common Factor
DefinitionSmallest number divisible by allLargest number that divides all
Prime factorization ruleHighest power of each primeLowest power of common primes
Result size≄ largest input≤ smallest input
Used forAdding fractions, schedulingSimplifying fractions, dividing

Try It Yourself! ✨

Use our free LCM Calculator — results appear as you type. No sign-up needed!

🚀 Open LCM Calculator Free

❓ Frequently Asked Questions

What is the LCM of two numbers?
The LCM (Least Common Multiple) is the smallest positive integer that is divisible by both numbers without a remainder. LCM(4, 6) = 12 because 12 is the smallest number that appears in both the multiples of 4 (4,8,12...) and multiples of 6 (6,12,18...).
How do you find LCM using prime factorization?
Factor each number into primes. For LCM, take every prime factor that appears in any number, using the highest power it appears. LCM(12, 18): 12=2²×3, 18=2Ɨ3² → LCM = 2²×3² = 36. For HCF (GCD), use the lowest power of common primes instead.
What is the relationship between LCM and GCD?
For two numbers a and b: LCM(a,b) Ɨ GCD(a,b) = a Ɨ b. This lets you find LCM if you know the GCD: LCM = (aƗb) Ć· GCD. Example: LCM(48,18): GCD=6, so LCM = (48Ɨ18)Ć·6 = 864Ć·6 = 144. This formula only works for exactly two numbers.
How is LCM used in adding fractions?
The LCM of the denominators is the Least Common Denominator (LCD). To add 1/4 + 1/6: LCM(4,6) = 12. Convert both: 3/12 + 2/12 = 5/12. The LCM ensures you use the smallest possible common denominator, keeping numbers manageable.
When do you use LCM vs HCF in problems?
Use LCM when you need to find when things coincide or come together — adding fractions (find common denominator), synchronizing repeating events (when do two buses depart together?). Use HCF/GCD when dividing or simplifying — simplifying fractions (divide by GCD), packing items into equal groups (largest group size). "When is the smallest time both repeat?" → LCM. "What is the largest unit that fits evenly?" → HCF.