Numbers & Arithmetic

Least Common Multiple (LCM): Formula, Methods and Examples

The least common multiple of two numbers is the smallest positive number that both divide into evenly, and for two numbers you can compute it as lcm⁡(a,b)=a⋅bgcd⁡(a,b)\operatorname{lcm}(a,b)=\dfrac{a\cdot b}{\gcd(a,b)}.

lcm⁡(a,b)=a⋅bgcd⁡(a,b)\operatorname{lcm}(a,b)=\frac{a\cdot b}{\gcd(a,b)}

Try it with your numbers

Show every step

In divisibility notation, lcm⁡(a,b)\operatorname{lcm}(a,b) is the smallest positive mm with a∣ma\mid m and b∣mb\mid m (see What a|b Means in Math if that symbol is new). The sections below show three reliable methods, explain why they work, and flag the spots where each one quietly breaks.

How do you find the least common multiple by listing multiples?

Number line from 0 to 72 showing common multiples of 6 and 8 at 24, 48 and 72
Multiples of 6 and 8 line up at 24, 48 and 72, so every common multiple is a multiple of the LCM, 24.

Write out the multiples of each number until a value appears on both lists. For 66 and 88:

6, 12, 18, 24, 308, 16, 24, 326,\ 12,\ 18,\ 24,\ 30 \qquad 8,\ 16,\ 24,\ 32

The first shared value is 2424, so lcm⁡(6,8)=24\operatorname{lcm}(6,8)=24. If you want ready-made lists, the multiples of numbers 1 to 100 page has them.

A faster way is to list only the multiples of the larger number and test each one against the smaller. Here that means 88 (is it divisible by 66? no), 1616 (no), 2424 (yes). You write fewer numbers and make fewer errors.

The trap is grabbing the first shared number you notice, or multiplying the two numbers out of habit. Since 6⋅8=486\cdot 8=48 is a common multiple, it feels right, but it is twice the least one. In fact, every common multiple of 66 and 88 (24,48,72,…24, 48, 72, \dots) is a multiple of the LCM. That fact is why “least” is well defined. Listing fails when the numbers are large (try 8484 and 9090), which is where factorization takes over.

Quick check

Find the LCM of 1010 and 1414 by listing multiples of the larger number.

How do you find the LCM using prime factorization?

A number is a multiple of nn exactly when its prime factorization contains every prime of nn with at least the same exponent. So the smallest number that works for both takes the highest exponent of each prime that appears in either number.

Take 8484 and 9090:

84=22⋅3⋅790=2⋅32⋅584=2^2\cdot 3\cdot 7 \qquad 90=2\cdot 3^2\cdot 5

lcm⁡(84,90)=22⋅32⋅5⋅7=4⋅9⋅5⋅7=1260\operatorname{lcm}(84,90)=2^2\cdot 3^2\cdot 5\cdot 7=4\cdot 9\cdot 5\cdot 7=1260

The steps, in order:

  1. Factor each number into primes (use prime factorization and the primes from 1 to 100 as a reference).
  2. List every prime that shows up in any factorization.
  3. For each prime, keep the largest exponent.
  4. Multiply those prime powers.

Students often confuse this with the GCF rule. The GCF keeps only primes shared by all numbers, at the smallest exponent. The LCM keeps every prime, at the largest exponent. Highest for LCM, lowest for GCF.

Try this: Find lcm⁡(36,60)\operatorname{lcm}(36,60) by factoring, then confirm your answer divides by both numbers. You should get 180180.

Why does LCM times GCF equal the product of two numbers?

Prime factor blocks of 48 and 180 showing LCM 720 times GCF 12 equals 8640
For 48 and 180, the LCM keeps the longer run of each prime and the GCF the shared run, so 720 × 12 = 48 × 180.

Look at one prime pp that appears in aa with exponent xx and in bb with exponent yy. The LCM uses max⁡(x,y)\max(x,y) copies of pp and the GCF uses min⁡(x,y)\min(x,y) copies. Whichever exponent is larger, the two together always add back to the originals:

max⁡(x,y)+min⁡(x,y)=x+y\max(x,y)+\min(x,y)=x+y

That holds for every prime at once, so lcm⁡(a,b)⋅gcd⁡(a,b)=a⋅b\operatorname{lcm}(a,b)\cdot\gcd(a,b)=a\cdot b. Dividing by the greatest common factor removes exactly the overlap that the product counted twice.

Example: find lcm⁡(48,180)\operatorname{lcm}(48,180). The GCF is 1212, because 48=24⋅348=2^4\cdot 3 and 180=22⋅32⋅5180=2^2\cdot 3^2\cdot 5 share 22⋅32^2\cdot 3. Then:

lcm⁡(48,180)=48⋅18012=720\operatorname{lcm}(48,180)=\frac{48\cdot 180}{12}=720

For big inputs, divide first: 4812⋅180=4⋅180=720\dfrac{48}{12}\cdot 180=4\cdot 180=720. The numbers stay smaller and the arithmetic is easier.

The formula is a two-number tool. For three numbers, 66, 1010 and 1515 have product 900900 and GCF 11, yet the LCM is 3030, not 900900. Pairwise overlaps are not the same as overlap across all three, so the identity does not extend.

Quick check

You know gcd⁡(18,30)=6\gcd(18,30)=6. Use it to find lcm⁡(18,30)\operatorname{lcm}(18,30).

How do you find the LCM of three or more numbers?

Use the same prime rule: keep the highest exponent of every prime across all the numbers. For 88, 1212 and 3030:

8=2312=22⋅330=2⋅3⋅58=2^3 \qquad 12=2^2\cdot 3 \qquad 30=2\cdot 3\cdot 5

lcm⁡(8,12,30)=23⋅3⋅5=120\operatorname{lcm}(8,12,30)=2^3\cdot 3\cdot 5=120

You can also work pairwise, because lcm⁡(a,b,c)=lcm⁡(lcm⁡(a,b),c)\operatorname{lcm}(a,b,c)=\operatorname{lcm}(\operatorname{lcm}(a,b),c). Here lcm⁡(8,12)=24\operatorname{lcm}(8,12)=24 and lcm⁡(24,30)=120\operatorname{lcm}(24,30)=120, the same result. The order you pick does not matter, so start with the pair that looks easiest.

The LCM of 1 through 10

The highest powers are 232^3, 323^2, 55 and 77, so the LCM is 8⋅9⋅5⋅7=25208\cdot 9\cdot 5\cdot 7=2520. Compare that with 10!=3,628,80010!=3{,}628{,}800, which is a common multiple but far from the least.

That comparison with the factorial is worth remembering: a product of everything is always a common multiple, and almost never the least one.

Can the least common multiple be negative, zero or a fraction?

For negative integers, work with their absolute values and report a positive result. So lcm⁡(−4,6)=lcm⁡(4,6)=12\operatorname{lcm}(-4,6)=\operatorname{lcm}(4,6)=12. The sign never changes which numbers divide into which.

Zero is a multiple of every number, but there is no smallest positive common multiple to pick when a zero is involved. Textbooks leave lcm⁡(a,0)\operatorname{lcm}(a,0) undefined, while software often returns 00.

For fractions, first put each one in lowest terms (see simplifying fractions). Then:

lcm⁡ ⁣(ab,cd)=lcm⁡(a,c)gcd⁡(b,d)\operatorname{lcm}\!\left(\frac{a}{b},\frac{c}{d}\right)=\frac{\operatorname{lcm}(a,c)}{\gcd(b,d)}

For 23\frac{2}{3} and 49\frac{4}{9} the answer is lcm⁡(2,4)gcd⁡(3,9)=43\frac{\operatorname{lcm}(2,4)}{\gcd(3,9)}=\frac{4}{3}. Check: 43÷23=2\frac{4}{3}\div\frac{2}{3}=2 and 43÷49=3\frac{4}{3}\div\frac{4}{9}=3, both whole numbers. Skipping the reduction step is the usual slip: with 24\frac{2}{4} and 13\frac{1}{3} the formula gives 22, which is a common multiple, but the reduced pair 12\frac{1}{2} and 13\frac{1}{3} gives the true LCM, 11. Decimals work the same way once you convert them: 0.40.4 and 0.60.6 are 25\frac{2}{5} and 35\frac{3}{5}, so the LCM is 65=1.2\frac{6}{5}=1.2.

One more limit: two numbers have a common multiple only when their ratio is a fraction of integers. A rational number and π\pi never line up, which is why this topic lives among rational and irrational numbers.

LCM vs GCF: which one does the problem want?

Word problems rarely say “LCM” or “GCF”. The wording gives it away.

The problem says Use The answer is
“next time together”, “repeat at the same moment” LCM a multiple, at least as large as every number
“split into equal groups”, “largest square tile” GCF a factor, no larger than any number

Example: one bus leaves a stop every 1212 minutes and another every 1818 minutes, and both leave at 8:00. They next leave together after lcm⁡(12,18)=36\operatorname{lcm}(12,18)=36 minutes, so at 8:36. Check: 36=3⋅1236=3\cdot 12 and 36=2⋅1836=2\cdot 18.

Use size as a sanity check

An LCM can never be smaller than the largest input, and a GCF can never be larger than the smallest. If your answer lands on the wrong side, you swapped the two ideas.

Gears are the same story. A 1212-tooth and an 1818-tooth gear return to their starting alignment after 3636 teeth pass, which is 33 turns of the small gear and 22 of the large one. That 3:23:2 is the reduced ratio of the gears.

How does the LCM help add fractions with unlike denominators?

The LCM of the denominators is the least common denominator, and using it keeps the numbers small. Add 512+718\frac{5}{12}+\frac{7}{18}. Since lcm⁡(12,18)=36\operatorname{lcm}(12,18)=36:

512+718=5⋅336+7⋅236=15+1436=2936\frac{5}{12}+\frac{7}{18}=\frac{5\cdot 3}{36}+\frac{7\cdot 2}{36}=\frac{15+14}{36}=\frac{29}{36}

The multipliers 33 and 22 come from 36÷1236\div 12 and 36÷1836\div 18. Since 2929 is prime and does not divide 3636, the fraction is already in lowest terms.

Multiplying the denominators also works: 5⋅18+7⋅12216=174216\frac{5\cdot 18+7\cdot 12}{216}=\frac{174}{216}, which reduces by 66 to the same 2936\frac{29}{36}. The LCM route skips that cleanup step and gives smaller numbers throughout. The full routine is on the adding fractions with unlike denominators page.

What is the LCM of variable expressions?

The rule carries over unchanged: take the LCM of the coefficients and the highest power of each variable. For 12x2y12x^2y and 18xy318xy^3:

lcm⁡(12,18)=36,x2,y3 ⇒ 36x2y3\operatorname{lcm}(12,18)=36,\quad x^2,\quad y^3\ \Rightarrow\ 36x^2y^3

For polynomials, factor first and do not expand. The LCM of x2−4x^2-4 and x2+4x+4x^2+4x+4 comes from (x−2)(x+2)(x-2)(x+2) and (x+2)2(x+2)^2. The highest power of each factor gives (x−2)(x+2)2(x-2)(x+2)^2. This is exactly how you find a common denominator for rational expressions.

Quick check

Find the LCM of 10x310x^3 and 4x2y4x^2y.

How do you check that an LCM answer is right?

Run these quick tests on any answer LL:

  • LL divides evenly by every input (use the divisibility rules for speed).
  • LL is at least as large as the largest input and at most the product of all of them.
  • The quotients L÷aL\div a and L÷bL\div b have no common factor.

The last test is the sharp one. For lcm⁡(84,90)=1260\operatorname{lcm}(84,90)=1260, the quotients are 1515 and 1414, which share nothing. If they did share a factor, LL would be too big and you could divide it by that factor. With a wrong answer of 25202520 for the same pair, the quotients 3030 and 2828 share a factor of 22, which tells you to halve it.

Finally, for two numbers confirm that lcm⁡⋅gcd⁡\operatorname{lcm}\cdot\gcd equals the product. A mismatch means the GCF or LCM is off.

Practice problems

0 of 5 solved

  1. Find the LCM of 88 and 1212.

  2. Find the LCM of 1818 and 2424.

  3. Find the LCM of 1515, 2020 and 2424.

  4. Two numbers have GCF 1414 and LCM 8484. One of them is 2828. What is the other?

  5. Find the LCM of 34\frac{3}{4} and 56\frac{5}{6}.

Common questions

What is the least common multiple in simple terms?

It is the smallest positive number that every number in your list divides into with no remainder. For 4 and 6, the common multiples are 12, 24, 36 and so on, and the least of them is 12.

What is the LCM of two prime numbers?

It is their product, because two different primes share no factors. For example, the LCM of 7 and 11 is 77. The same holds for any two numbers whose GCF is 1.

Is the LCM always bigger than the numbers?

It is always at least as large as the biggest number, never smaller. It equals the biggest number when the others divide into it, as with 5 and 15, where the LCM is 15.

How do you find the LCM using the GCF?

Multiply the two numbers, then divide by their greatest common factor. For 48 and 180 the GCF is 12, so the LCM is 48 times 180 divided by 12, which is 720. This shortcut works for two numbers only.

What is the LCM of a number and zero?

Textbooks usually leave it undefined, since zero is a multiple of everything and there is no smallest positive common multiple to pick. Many calculators and spreadsheets return 0 by convention.

What is the difference between the LCM and the LCD?

The least common denominator (LCD) is just the LCM of the denominators of a set of fractions. It is the smallest number every denominator divides into, so it gives the cleanest common denominator when adding or subtracting.

Up next