Skip to main content

Someone wanted to learn this too, so Grasp built them a personal learning path.

You can keep exploring this one or create your own

Finding HCF and LCM from Prime Factorizations

Hello! Last lesson, you used factor trees to write numbers as products of prime factors, taking care to include repeated primes. You found, for example, that and . Today you’ll compare prime factorizations to find the highest common factor (HCF) and lowest common multiple (LCM). Allow about 35–40 minutes, including the video and practice.


What are we looking for?

The HCF is the largest positive whole number that divides both numbers exactly. The LCM is the smallest positive whole number that appears in both numbers’ multiplication tables.

For 8 and 12, the common factors are 1, 2 and 4, so their HCF is 4. Their multiples first meet at 24, so their LCM is 24. Listing factors and multiples works well for small numbers, but prime factorizations are more useful when the numbers grow.

Watch HCF and LCM by Maths Genie. It begins with listing, then shows how to organise prime factors in a Venn diagram.

HCF and LCM

Watch HCF and LCM by Maths Genie to see why listing works for small numbers and how prime factors make larger examples manageable.

Watch the definitions using 12 and 8, then the factorizations of 144 and 100. In the Venn diagram, pay particular attention to the two shared copies of 2: they go in the overlap once, where they count towards both numbers.


Match shared primes without losing repeats

Return to the numbers from the previous lesson:

They each have one 2 and one 5. Multiplying those shared copies gives the HCF:

For the LCM, we need enough prime factors to build either number. Take the shared 2 and 5, the extra 3 from 30, and the extra 2 from 20:

Here is the Venn-diagram idea without drawing circles:

Belongs only to 30 Shared by both Belongs only to 20

The HCF multiplies the shared column. The LCM multiplies every entry in the row. A shared factor is written once in the middle, but it belongs to both numbers; putting two copies of it in the middle would count it twice.

This also explains why simply multiplying the original numbers often gives an LCM that is too large. counts their shared 2 and 5 twice. The lowest common multiple needs each shared copy only once.


A quicker rule when powers are given

You do not have to expand every power and draw a Venn diagram. The image below applies the same matching idea directly to prime factorizations.

Prime factorizations of 180 and 168: the HCF uses the smaller number of shared prime copies, while the LCM uses enough copies of every prime to cover both numbers.

Start with the two products shown:

For the HCF, look only at primes present in both numbers. Both have 2s, but 180 has only two copies, so only can be shared. Both have 3s, but 168 has only one copy, so only one 3 can be shared. Therefore,

For the LCM, include every distinct prime, using the larger number of copies required by either number. We need for 168, for 180, plus the 5 and the 7:

The rule to remember is smaller powers for the HCF; larger powers for the LCM. For a prime missing from one number, it contributes nothing to the HCF, but it still belongs in the LCM.

Check what your answers do, not just how you calculated them: 12 divides both 180 and 168, while 2520 is divisible by both. For these two numbers, , , , and .


Choosing the right method in a problem

The arithmetic matters, but so does deciding whether the question calls for a factor or a multiple.

Suppose 48 pencils and 60 pens must be divided into the greatest possible number of identical packs, with nothing left over. The number of packs must divide both 48 and 60, so find the HCF:

The shared primes, using their smaller powers, give . There can be 12 packs, each containing pencils and pens.

Now suppose two lights flash together, then one flashes every 24 seconds and the other every 36 seconds. The next time they flash together must be a multiple of both intervals, so find the LCM:

Using the larger powers gives . They next flash together after 72 seconds. Notice the difference: splitting into the largest possible equal groups suggests HCF; waiting for repeating events to coincide suggests LCM.

A couple of useful checks follow from the definitions. The HCF cannot be greater than the smaller number, and the LCM cannot be smaller than the larger number. If one number divides the other—for example, 12 and 36—the HCF is the smaller number and the LCM is the larger one. If the numbers share no prime factors, their HCF is 1.

For negative integers, use their positive sizes when finding HCF and LCM: the sign does not change which positive numbers divide them or their positive common multiples. Zero has no prime factorization, so the method in this lesson is for nonzero integers.


Check your understanding

Work through these from easier to harder. Show the prime factorizations and the factors you choose, rather than giving only the final numbers.

  1. Given and , find their HCF and LCM.
  2. Find the HCF and LCM of 48 and 60. Explain why you chose the smaller or larger power of 2 for each answer.
  3. GCSE-style: Two lengths of ribbon measure 1.2 m and 80 cm. Both must be cut into pieces of the same greatest possible length, with none left over. What length should each piece be, in centimetres, and how many pieces will each ribbon make?

Send your working, including anything you are unsure about. We can check and correct it before moving on.


What to take forward

Prime factorization turns both calculations into a comparison of prime copies. The HCF takes the copies shared by both numbers; the LCM takes enough copies to build either number. In index form, that means smaller shared powers for the HCF and larger powers of all primes for the LCM. Use the wording of a problem to decide which you need, then check your result against the original numbers.

Once this is secure, the next module will explore squares, cubes, roots and powers in more detail.

Can't find a good explanation? Sign up and we'll make it for you

Sign up