Skip to main content
Viralrang
MathFree · no sign-up

LCM Calculator

Least common multiple, showing where the multiples of each number meet.

Updated

2 numbers found. Two or more whole numbers. Decimals are ignored.

Least common multiple

36

The smallest number all 2 divide into exactly.

Greatest common factor
6
36 ÷ 12
3
36 ÷ 18
2

Where the multiples meet

12: 12, 24, 36

18: 18, 36

Every number here divides the least common multiple exactly, which is what makes it a common multiple; nothing smaller does, which is what makes it the least. That is why adding fractions with these denominators works cleanly at 36 and at no smaller number.

The shortcut for two numbers is LCM = a × b ÷ GCF: 12 × 18 ÷ 6 = 36. It holds for pairs only, so with three or more the safe route is to fold pairwise rather than multiply everything at once.

In short

How do you find the least common multiple?

Multiply the two numbers and divide by their greatest common factor. For 12 and 18 that is 216 divided by 6, giving 36. Listing multiples works too: 12, 24, 36 and 18, 36 first meet at 36.

The shortcut is a pair rule. With three or more numbers, fold them two at a time.

How to use the LCM calculator

The least common multiple of a set of whole numbers is the smallest number that every one of them divides into without remainder. It is the number you need when adding fractions, when working out when two repeating events coincide, and whenever several different cycle lengths have to line up. Three methods find it and they suit different situations.

Listing multiples is the slowest and the most convincing. Write out 12, 24, 36, 48 and 18, 36, 54, and the first number appearing in both lists is 36. It takes longer than the alternatives but it shows exactly what the answer means, which is why it is worth doing once before switching to something quicker.

36

LCM of 12 and 18

where their multiples first meet

216 ÷ 6

The shortcut

product over the GCF

2,520

LCM of 1 through 10

and of 1 through 9 too

The shortcut is faster: multiply the two numbers and divide by their greatest common factor. Twelve times eighteen is 216, and dividing by their greatest common factor of 6 gives 36. This works because the product counts every shared factor twice, and dividing by the greatest common factor removes exactly one copy of each.

The prime factorisation method is the one that scales and explains. Break every number into primes, then take each prime that appears anywhere, raised to the highest power it reaches in any of them. Twelve is 2² × 3 and eighteen is 2 × 3²; the highest powers are 2² and 3², and 4 × 9 is 36.

Three methods, one answer
List the multiples
slowest, and shows what it means
Product ÷ GCF
fastest for two numbers
Highest power of each prime
works for any count
Pairwise fold
what to use for three or more
All four give
the same number, always

This page folds pairwise, which keeps every intermediate value at or below the final answer. Multiplying a long list first and dividing afterwards can exceed the safe integer range before the division ever happens.

Find the factor they share instead

The greatest common factor is the other half of the same computation, and knowing one gives you the other in a single division.

Open the GCF calculator

Least common multiples for pairs that come up often, with the greatest common factor alongside so the product identity can be checked.

NumbersLCMGCF
12 and 18366
4 and 6122
6 and 8242
3 and 5151
7 and 13911
10 and 15305
9 and 12363
2 and 882
25 and 301505
16 and 24488
4, 6 and 10602
For each pair, GCF × LCM equals the product of the two numbers. The final row has three values and does not satisfy that identity.

The job it does most often: common denominators

Adding fractions needs both to sit over the same denominator, and any common multiple of the two denominators will work. Using the least one keeps the numbers small and usually means no reducing afterwards. Multiplying the denominators together always works too and often leaves a fraction that still needs reducing.

Sixths plus eighths, two ways
Multiply the denominators
6 × 8 = 48
Least common multiple
24
Over 48
8/48 + 6/48 = 14/48
Over 24
4/24 + 3/24 = 7/24
Both reduce to
7/24

The two routes agree, as they must. The difference is that 14/48 still needs reducing by 2 while 7/24 is already finished, and on messier denominators the gap between the two grows quickly.

The same reasoning covers anything cyclical. Two buses leaving every 12 and 18 minutes depart together every 36 minutes. Two gears with 12 and 18 teeth return to their starting alignment after 36 teeth have passed. The least common multiple is where repeating things resynchronise.

Zero, one, and numbers that share nothing

When two numbers are coprime — sharing no factor above one — their least common multiple is simply their product. Seven and thirteen have nothing in common, so the first number they both divide is 91. That is also the largest the least common multiple can ever be for a given pair.

Do

  • Use the product-over-GCF shortcut for exactly two numbers
  • Fold pairwise when there are three or more
  • Take the highest power of each prime when factorising
  • Expect the LCM of coprime numbers to be their product

Don't

  • Extend the shortcut to three numbers
  • Assume the LCM is always larger than every input
  • Include zero in the list
  • Multiply a long list together before dividing

Zero is the case worth stating. Under the definition taught in schools — the least POSITIVE common multiple — zero has no least common multiple with anything, because every multiple of zero is zero and zero is not positive. Some programming libraries adopt the convention that it returns zero instead. This page follows the school definition and declines the input rather than printing a number that means something different depending on who is reading.

The formula, worked line by line

One shortcut, one general method, and a rule about when the shortcut stops applying. The general method never fails, which is why it is worth knowing even though it is slower to write out.

The product counts every shared factor twice. Dividing by the greatest common factor removes one copy of each, and what is left is the least common multiple.
Why the shortcut works, and why it needs exactly two numbers

Seeing it that way also explains the failure with three numbers: the shared factors no longer appear a predictable number of times in the product, so there is no single quantity to divide out.

lcm(a, b) = a × b ÷ gcf(a, b)
lcm(a, b, c) = lcm(lcm(a, b), c)
lcm = product of each prime, raised to its highest power
coprime numbers: lcm(a, b) = a × b
if a divides b, then lcm(a, b) = b
Where the multiples first meetThe multiples of 12 and of 18 both reach 36, and nothing smaller appears in both lists. That makes 36 their least common multiple.FIRST NUMBER IN BOTH LISTS12122436181836THE SHORTCUT12 × 18216÷ gcf6lcm36
The multiples of twelve and of eighteen, meeting for the first time at thirty-six.
Prime factorisation on 12 and 18
12 breaks into
2 × 2 × 3, or 2² × 3
18 breaks into
2 × 3 × 3, or 2 × 3²
Highest power of 2
2² = 4
Highest power of 3
3² = 9
Multiply them
4 × 9 = 36

Compare this with the greatest common factor, which takes the LOWEST power of each shared prime instead: 2¹ × 3¹ = 6. The two operations are mirror images, which is exactly why one gives the other in a single division.

When the LCM is one of the inputs

If one number already divides another, the larger one is the answer. Two divides eight, so the least common multiple of 2 and 8 is 8, not 16. It surprises people who expect the answer to be bigger than everything they entered, and it is the reason the three-number shortcut fails on 2, 4 and 8.

A number worth recognising

The LCM of the first n whole numbers
1 to 5
60
1 to 6
60 — 6 adds nothing new
1 to 8
840
1 to 10
2,520
1 to 12
27,720

The second row shows the pattern: adding 6 changes nothing, because 6 is 2 × 3 and both are already present. Only a new prime, or a higher power of an existing one, moves the answer.

That is why 2,520 turns up so often in puzzles and in problems about coincidence — it is the smallest number divisible by everything from one to ten, and adding 9 to the list is what pushes it there rather than the 10.

Questions people ask

Sources

Where the constants and formulas on this page come from. Each line names the figure it backs.

  1. The least common multiple of two integers is the smallest positive integer divisible by both, and equals their product divided by their greatest common divisor.

    Least Common MultipleWolfram MathWorld

  2. Students find the least common multiple of two whole numbers less than or equal to twelve.

    CCSS.Math.Content.6.NS.B.4Common Core State Standards Initiative

  3. Every integer greater than one has a unique prime factorisation, which is what makes the highest-power method well defined.

    Fundamental Theorem of ArithmeticWolfram MathWorld

How Are Loan Payments Calculated? Amortization, Explained

One level payment, front-loaded interest — the formula worked by hand, the two levers you control, and why the smaller payment is often the costlier loan.

July 23, 2026 · 13 min read

How Does Inflation Work? The Math That Shrinks Money

One growth factor, two answers — what today's money will buy later, and how many future dollars it takes to keep up.

July 23, 2026 · 13 min read

How Is Sales Tax Calculated? Rates, Rules, and the Reverse Math

The combined-rate reality, the one-multiplication forward formula, and the division that pulls the tax back out of any total.

July 23, 2026 · 13 min read