LCM Calculator

Free LCM calculator with step-by-step prime factorization. Find the least common multiple of two or more numbers — instant answer plus the working shown.

=

How to Calculate LCM?

The Least Common Multiple (LCM) is the smallest positive integer that is divisible by two or more numbers. It's useful for finding common denominators in fractions and solving various mathematical problems.

Finding LCM of Multiple Numbers:

  • Find the LCM of the first two numbers
  • Use that result to find the LCM with the next number
  • Continue until all numbers are processed

LCM(12, 18, 24) = 72

Finding LCM using Prime Factorization:

  • Find the prime factors of each number
  • Take the highest power of each prime factor
  • Multiply all the prime factors together

12 = 2² × 3

18 = 2 × 3²

LCM(12, 18) = 2² × 3² = 36

Finding LCM using GCF:

  • Use the relationship: LCM(a, b) = (a × b) / GCF(a, b)
  • This method is efficient for two numbers

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

LCM(12, 18) = (12 × 18) / 6 = 216 / 6 = 36

Common LCM examples

NumbersLCM
4, 612
8, 1224
5, 735
6, 8, 1224
10, 15, 2060
3, 5, 7105
2, 4, 88

About this LCM calculator

This calculator accepts any list of two or more positive integers — separated by commas, spaces, or newlines — and returns their least common multiple along with the full working. The step-by-step box prints the prime factorization of each input and shows which highest powers are kept, so the calculator doubles as a study aid for primary, middle-school and early algebra classes. There is no upper limit imposed: the BigInt arithmetic underneath handles numbers far beyond what fits in a 64-bit integer.

Frequently Asked Questions

The LCM of two integers a and b is the smallest positive integer that both a and b divide evenly into. For example, LCM(4, 6) = 12 because 12 is the first multiple shared by 4 (4, 8, 12, ...) and 6 (6, 12, ...). The LCM is always at least as large as the larger input, and equals one of the inputs only when that input is itself a multiple of the other (LCM(3, 9) = 9).

Factor each number into primes, then for every prime that appears in any factorization, take the highest power of that prime and multiply them together. Example for LCM(12, 18): 12 = 2²·3 and 18 = 2·3². The primes are 2 and 3; the highest powers are 2² and 3². LCM = 2²·3² = 36. This method works for any number of inputs and is what the 'Calculation steps' box shows.

For two numbers, LCM(a, b) = (a × b) / GCF(a, b). The product of the LCM and GCF always equals the product of the original two numbers. For 12 and 18: GCF(12, 18) = 6, so LCM = (12 × 18) / 6 = 216 / 6 = 36. The shortcut is the fastest way to compute LCM of two numbers because computing the GCF via the Euclidean algorithm is very fast even for huge integers. For three or more numbers, apply it pairwise: LCM(a, b, c) = LCM(LCM(a, b), c).

LCM(12, 18) = 36 (= 2² × 3²). LCM(8, 12) = 24 (= 2³ × 3). LCM(6, 8) = 24 (= 2³ × 3). The reference table at the bottom of the page lists more common pairings — LCM(4, 6) = 12, LCM(5, 7) = 35, LCM(10, 15, 20) = 60 — so you can spot-check the calculator or look up textbook problems quickly.

To add fractions with different denominators, you rewrite each fraction with a common denominator first. Any common denominator works, but the LCM gives the smallest one, which keeps the numbers manageable. For 1/4 + 1/6: LCM(4, 6) = 12, so the fractions become 3/12 and 2/12, and the sum is 5/12. If you used 4 × 6 = 24 instead you would end up with 6/24 + 4/24 = 10/24 = 5/12 — same answer but with an extra simplification step.

No — the LCM is always at least as large as the largest input. Every multiple of LCM(a, b) is also a multiple of both a and b, so the LCM must contain the largest input at least once. It equals the largest input only when the largest is itself a multiple of all the others: LCM(3, 6, 12) = 12 because 12 already contains 3 and 6.

Yes — when the inputs are the denominators of fractions, the LCM is exactly the lowest common denominator (LCD). The two terms are used interchangeably in arithmetic. LCM is the broader term used outside of fraction work (e.g. for scheduling problems, gear ratios, traffic light cycles), while LCD specifically refers to the fraction-arithmetic use case.

Scheduling: if one bus comes every 12 minutes and another every 18 minutes, they will meet again at LCM(12, 18) = 36 minutes. Music: a 4/4 phrase and a 6/8 phrase realign every 12 beats. Cron jobs and game-tick loops use LCM-style reasoning to figure out when several periodic events coincide. Manufacturing gearboxes use LCM to compute how many revolutions before each gear returns to its starting orientation.
LCM Calculator — Free LCM calculator with step-by-step prime factorization. Find the least common multiple of two or more numbers — insta
LCM Calculator