Uni-Sine
MathematicsNumber

LCM calculator: find the least common multiple with working

This LCM calculator finds the least common multiple (the lowest common multiple in the UK) of two to six whole numbers. The LCM is the smallest number that all of your numbers divide into exactly, so the LCM of 12 and 18 is 36. Type your numbers and it shows the LCM, each number as a product of primes, and a Venn diagram of those primes.

It opens on 12 and 18. Change them to your own numbers, or press the button to open the full LCM calculator over this page.

Try it

LCM Calculator

Find the lowest common multiple with prime factor working

Go to its page

What the LCM calculator shows

  • The LCM, exact for any whole numbers up to 1,000,000,000, however long the answer gets.
  • The GCF (greatest common factor, called the HCF or highest common factor in the UK) of the same numbers, since the two are usually asked together.
  • The primes used: the highest power of each prime, multiplied together to make the LCM.
  • The working, step by step: each number as a product of primes, the highest powers picked out, the multiplication, and for two numbers a check using the GCF.
  • A Venn diagram of the prime factors for two or three numbers, or a factor table with the highest power of each prime marked for four to six numbers.
  • Practice questions with a hint and a full worked solution.

How to use the LCM calculator

  1. Type your first two numbers in Number 1 and Number 2. They must be positive whole numbers.
  2. For more numbers, press Add a number. You can have up to six. The cross beside a box removes it.
  3. Read the LCM at the top of the stage. The GCF and the primes used sit beside it.
  4. Follow the working under the answer to see how it was found, and the diagram to see where each prime came from.
  5. To practise, press Random problem in the Practice section. Type your answer and press Check answer, or use Hint and Reveal if you get stuck.

What is the least common multiple?

A multiple of a number is that number times 1, 2, 3 and so on. A common multiple is in both lists, and the least common multiple is the smallest one. Take 4 and 10:

  • Multiples of 4: 4, 8, 12, 16, 20, 24, 28, 32, 36, 40
  • Multiples of 10: 10, 20, 30, 40

20 and 40 are both common multiples, and 20 is the smallest, so LCM(4, 10) = 20. Every other common multiple is a multiple of the LCM. When the numbers are the denominators of fractions, the LCM is called the least common denominator (LCD).

How to find the LCM by hand

There are several methods. They all give the same answer, so use whichever suits the numbers. The calculator uses prime factorization (prime factorisation in the UK), because it works for any numbers, however large.

LCM by listing multiples

List the multiples of the largest number and stop at the first one the others divide into. For 4 and 10, the multiples of 10 are 10, 20, and 20 is the first that 4 divides. This is quick for small numbers and slow for big ones.

LCM by prime factorization

Write each number as a product of primes. Then take every prime that appears, at the highest power it reaches in any of the numbers, and multiply. For 12 and 18:

12 = 2^2 \times 3 \qquad 18 = 2 \times 3^2Each number as a product of primes
\text{LCM} = 2^2 \times 3^2 = 4 \times 9 = 36The highest power of 2 is 2², and the highest power of 3 is 3²

To find the GCF instead, take only the primes the numbers share, at the lowest power: 2 × 3 = 6. The prime factorization calculator draws a factor tree for any one number if you want to check that step.

LCM with a Venn diagram

Draw a circle for each number and put its prime factors inside. Primes the numbers share go in the overlap, once. For 12 = 2 × 2 × 3 and 18 = 2 × 3 × 3, a 2 and a 3 are shared, so they go in the middle, with the other 2 in the 12 circle and the other 3 in the 18 circle. Multiply everything in the diagram for the LCM: 2 × 2 × 3 × 3 = 36. Multiply only the overlap for the GCF: 2 × 3 = 6. This is the diagram the calculator draws.

Ladder method for the LCM

Also called the cake method. Write the numbers in a row and divide them by a prime that goes into at least one of them, carrying down any number it doesn't divide. Repeat until every number is 1, then multiply the primes you divided by. For 8, 12 and 20:

Divide by81220
24610
2235
2135
3115
5111

The primes down the side are 2, 2, 2, 3 and 5, so the LCM is 2 × 2 × 2 × 3 × 5 = 120.

LCM from the GCF

For exactly two numbers, the LCM times the GCF equals the two numbers multiplied together. So if you know the GCF, divide the product by it:

\text{LCM}(a,b) = \frac{a \times b}{\text{GCF}(a,b)} \qquad \text{LCM}(12,18) = \frac{12 \times 18}{6} = \frac{216}{6} = 36

The calculator shows this as its last step for two numbers. Euclid's algorithm finds the GCF fast even for huge numbers, and the GCF calculator shows it step by step.

Worked examples you can check in the calculator

Example 1: LCM of three numbers

Find the LCM of 8, 12 and 20.

8 = 2^3 \qquad 12 = 2^2 \times 3 \qquad 20 = 2^2 \times 5

The highest power of 2 is 2³, from 8. 3 and 5 each appear once.

\text{LCM} = 2^3 \times 3 \times 5 = 120

The LCM is 120, the same as the ladder method gave. Press Add a number, type 8, 12 and 20, and the calculator shows 120 with a three-circle Venn diagram. The GCF beside it is 4.

Example 2: LCM of four numbers

Find the LCM of 4, 6, 9 and 15.

4 = 2^2 \qquad 6 = 2 \times 3 \qquad 9 = 3^2 \qquad 15 = 3 \times 5
\text{LCM} = 2^2 \times 3^2 \times 5 = 4 \times 9 \times 5 = 180

The LCM is 180. With four numbers the calculator swaps the Venn diagram for a factor table: one row per number, one column per prime, and the highest power in each column marked. The GCF is 1, because no prime is in all four numbers.

Example 3: LCM of two large numbers

Find the LCM of 360 and 756. Listing multiples would take a long time here, so use primes.

360 = 2^3 \times 3^2 \times 5 \qquad 756 = 2^2 \times 3^3 \times 7
\text{LCM} = 2^3 \times 3^3 \times 5 \times 7 = 8 \times 27 \times 35 = 7560

The LCM is 7,560. Check it with the GCF: the shared primes at their lowest powers are 2² × 3² = 36, and 360 × 756 ÷ 36 = 7,560.

Example 4: an LCM word problem

Hot dogs come in packs of 10 and buns in packs of 8. What is the smallest number of each pack to buy so there are exactly as many hot dogs as buns?

The total of each must be a multiple of both 10 and 8, and you want the smallest, so find LCM(10, 8). 10 = 2 × 5 and 8 = 2³, so the LCM is 2³ × 5 = 40. That is 40 ÷ 10 = 4 packs of hot dogs and 40 ÷ 8 = 5 packs of buns.

Look for the words "smallest", "first time" or "together again". Things that repeat on different cycles, like two lights flashing or two timetables, line up again after the LCM.

Example 5: least common denominator for adding fractions

Work out 5/12 + 7/18. The least common denominator is LCM(12, 18) = 36, the calculator's opening example. 36 ÷ 12 = 3 and 36 ÷ 18 = 2, so:

\frac{5}{12} + \frac{7}{18} = \frac{15}{36} + \frac{14}{36} = \frac{29}{36}

Any common denominator works, such as 12 × 18 = 216, but the LCM keeps the numbers small and often saves simplifying at the end.

Try one

practice
Pick an answer, then check it.
What is the LCM of 6 and 15?

Checking the answer makes sense

  • The LCM is never smaller than your largest number, and every number divides into it exactly. Divide to check.
  • If one number divides another, the larger is the LCM. LCM(5, 20) = 20.
  • If two numbers share no prime, such as 7 and 9, the LCM is their product, 63, and the GCF is 1.
  • For two numbers, LCM × GCF = the product. For 12 and 18: 36 × 6 = 216 = 12 × 18.

Common mistakes

  • Mixing up LCM and GCF. The LCM is at least as big as your largest number. The GCF is at most as big as your smallest.
  • Taking the lowest powers. The LCM needs the highest power of each prime. The lowest powers of the shared primes give the GCF.
  • Leaving out primes that aren't shared. Every prime in any of the numbers goes into the LCM, not only the shared ones.
  • Just multiplying the numbers. 4 × 10 = 40 is a common multiple, but not the least one. It is only the LCM when the numbers share no prime.
  • Using product ÷ GCF for three or more numbers. It only works for two. For 4, 6 and 8 it gives 192 ÷ 2 = 96, but the LCM is 24.

Where the LCM comes up in school

In the US, the Common Core standards ask grade 6 students to find the least common multiple of two whole numbers up to 12, and the greatest common factor of two whole numbers up to 100. In England, the national curriculum brings in common multiples in year 6, then the lowest common multiple and prime factorization at key stage 3, and both are part of GCSE Maths. The same methods carry on into algebra, where you find the least common denominator of algebraic fractions.

Common questions

How do you find the LCM of three numbers?
Write each number as a product of primes, take every prime that appears at its highest power, and multiply. For 8, 12 and 20 that is 2³ × 3 × 5 = 120. The ladder method also works. The shortcut product ÷ GCF does not work for three numbers.
What is the difference between LCM and GCF?
The LCM is the smallest number that all your numbers divide into. The GCF is the biggest number that divides into all of them. For 12 and 18 the LCM is 36 and the GCF is 6. The calculator shows both.
Is the least common multiple the same as the lowest common multiple?
Yes. Least common multiple is the usual US name and lowest common multiple is the usual UK name. Both are shortened to LCM.
Is the LCM the same as the least common denominator?
The least common denominator of some fractions is the LCM of their denominators. For 5/12 and 7/18 it is LCM(12, 18) = 36.
How do you find the LCM of fractions?
Divide the LCM of the numerators by the GCF of the denominators. For 2/3 and 4/9 that is LCM(2, 4) ÷ GCF(3, 9) = 4/3, and 4/3 is 2 lots of 2/3 and 3 lots of 4/9. The calculator takes whole numbers, so use it for the numerators and denominators separately.
What is the LCM of two prime numbers?
Their product, because they share no factor except 1. The LCM of 13 and 17 is 221.
Can the LCM be one of the numbers?
Yes, when every other number divides into it. LCM(3, 9) = 9 and LCM(5, 20) = 20.

Revision cards

Read the front, say your answer, then flip to check.

Where to go next

  • Solve it

    LCM Calculator

    Find the lowest common multiple with prime factor working

    Open the tool
  • Test it

    Pre-Algebra & Algebra 1

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · NumberPrime factor decomposition: method, HCF and LCMHow to write a number as a product of prime factors with a factor tree or division, in index form, and use it for HCF, LCM, square roots and cube roots.