LCM calculator

Enter 2–10 positive integers. The calculator finds LCM and GCF with full prime factorization steps.

LCM
GCF / GCD
Prime Factorization — Step by Step
✓ Verification

What This Tool Does

This calculator finds the Least Common Multiple (LCM) of two or more numbers — the smallest positive number that all the given numbers divide into evenly.

You can also use this Home Loan Eligibility Calculator

How It’s Calculated

The most systematic approach is prime factorization: break each number down into its prime factors, then multiply together the highest power of each prime that appears across all numbers.

Worked example: Find LCM(8, 9, 15).

  • 8 = 2³
  • 9 = 3²
  • 15 = 3 × 5

Taking the highest power of each prime found: 2³ × 3² × 5¹

  • LCM = 8 × 9 × 5 = 360

Checking: 360 ÷ 8 = 45, 360 ÷ 9 = 40, 360 ÷ 15 = 24 — all divide evenly, confirming the result.

For just two numbers, there’s also a shortcut using the Greatest Common Factor (GCF):

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

Edge Cases and Special Rules

  • More than two numbers need chaining: The GCF shortcut only works for pairs — for three or more numbers, find the LCM of the first two, then find the LCM of that result with the next number, and so on.
  • Relatively prime numbers: If two numbers share no common factors (like 8 and 15), their LCM is simply their product — 120 in this case.
  • One number divides the other: If one number is already a multiple of another (like 4 and 8), the LCM is just the larger number — no further calculation needed.
  • Order doesn’t matter: LCM(a, b) always equals LCM(b, a), regardless of the order numbers are entered.

LCM for Fractions and Algebraic Expressions

The standard method covers whole numbers, but related techniques extend the idea further. For fractions, the LCM is found by taking the LCM of the numerators and dividing by the GCF of the denominators — useful for finding a common denominator when adding or subtracting fractions. For algebraic expressions with variables (like 4x² and 6x³), the same prime factorization logic applies, but extended to include the highest power of each variable alongside the numeric prime factors.

Who Uses This

  • Students finding a common denominator to add or subtract fractions
  • Teachers preparing math practice materials
  • Anyone figuring out when two repeating events will next coincide (like two schedules repeating every 4 and 6 days)
  • Programmers and engineers who need LCM calculations within algorithms

LCM vs. HCF (GCF)

These are related but opposite concepts. LCM (Least Common Multiple) is the smallest number that all given numbers divide into evenly. HCF (Highest Common Factor, also called GCF) is the largest number that divides evenly into all of them. They’re connected by a simple relationship for two numbers: LCM(a, b) × HCF(a, b) = a × b — which is exactly the shortcut formula used above.

FAQ

What is LCM?

Least Common Multiple — the smallest positive number that two or more given numbers all divide into evenly.

How is LCM different from HCF?

LCM finds the smallest shared multiple; HCF (or GCF) finds the largest shared factor — opposite operations on the same set of numbers.

What does LCM stand for?

Least Common Multiple, also sometimes called the Lowest Common Multiple.

Can LCM be found for more than two numbers?

Yes — calculate the LCM of the first two, then find the LCM of that result with each remaining number in turn.

What’s the fastest method to find LCM?

Prime factorization is generally the most systematic and efficient method, especially for larger numbers, compared to listing out multiples.

Try It Above

Enter two or more numbers, separated by commas, in the calculator above to get the LCM instantly. Results are for general calculation purposes only.