Skip to content

Paper Together: sit a paper in a room with your friends.See how it works

Prime factors, HCF & LCM: worked examples and method

Foundation and Higher · Grade 4 · Non-calculator

This page sets out the method for prime factors, HCF & LCM in the order you would use it, then walks through the full lesson explanation. For three complete worked examples with the slips that cost marks, see the Prime factors, HCF & LCM topic page.

Key facts

The method, step by step

Method: factor tree

When you are asked to write a number as a product of prime factors, split it into any two factors and keep splitting.

  1. Split the number into any two factors that multiply to give it.
  2. Circle any factor that is prime; keep splitting any factor that is not.
  3. Stop when every branch ends in a prime.
  4. Collect the circled primes, smallest first, and write them with powers.

Method: Venn diagram for HCF and LCM

When you need both the HCF and the LCM of two numbers, put the prime factors in a Venn diagram.

  1. Write both numbers as products of primes.
  2. Put primes that appear in both lists in the overlap (match them one for one).
  3. Put the leftover primes in the outer parts of each circle.
  4. HCF = multiply the overlap. LCM = multiply everything in the diagram.

How the lesson explains it

Prime factors

A prime has no factors other than 1 and itself.

18 = 2 × 3 × 3, which is 2 × 3².

A factor tree

Split a composite number into a pair of factors, then split those, until every end is prime.

The order of the splits does not change the primes you finish with.

HCF

The highest common factor uses only the primes that appear in both lists, at the lower power.

12 = 2² × 3 and 18 = 2 × 3², so the HCF is 2 × 3 = 6.

LCM

The lowest common multiple uses every prime that appears, at the higher power.

The LCM of 12 and 18 is 2² × 3² = 36.

A check

HCF × LCM = the product of the two numbers, for two numbers.

6 × 36 = 216 and 12 × 18 = 216.

In a problem

The HCF is the greatest equal group you can make from both amounts.

The LCM is the first time two repeating events happen together.

Prime factors in index form

Split the number into a factor pair, then keep splitting any composite number you meet. For 72, one route is 72 = 8 × 9, then 8 = 2 × 2 × 2 and 9 = 3 × 3. The primes are three 2s and two 3s. Index form gathers them: 2^3 × 3^2. Another tree, such as 72 = 6 × 12, ends at the same primes. The order you write them in does not matter if the powers are right.

Check by multiplying back. 2^3 = 8 and 3^2 = 9, and 8 × 9 = 72. If the product is short of the original number, a prime is missing. If it overshoots, a power is too high. Stop when every branch is prime. 4 is not a prime factor, even though it divides 72. Replace 4 with 2 × 2.

120 = 12 × 10 = (2^2 × 3) × (2 × 5) = 2^3 × 3 × 5. Count the twos carefully: two from the 12 and one from the 10 make 2^3. Writing 2^2 × 3 × 5 is 60, which is only half of 120. The index is a count, not a decoration.

Method: 1. Start the tree with two factors of the number. 2. Keep splitting any number that is not prime. 3. Write the primes as a product, using indices for repeats.

HCF from the lowest powers

List the primes for both numbers, lined up so matching primes sit together. For 72 = 2^3 × 3^2 and 120 = 2^3 × 3 × 5, the shared primes are 2 and 3. The prime 5 is only in 120, so it cannot be in a common factor. A common factor can use only primes that appear in both lists.

Take the lower power of each shared prime. Both numbers have 2^3, so the lower power of 2 is 2^3. The powers of 3 are 2 and 1, so the lower one is 3^1. The HCF is 2^3 × 3 = 24. Taking the higher power instead builds a number that does not divide the other one. 3^2 does not divide 120.

In words, 24 is the largest equal group that fits both totals. If 72 apples and 120 oranges are packed so that every piece of fruit is used and every bag holds the same number, the biggest bag size that works for both fruits, packed separately into equal full bags, is 24. You get 3 bags of apples and 5 bags of oranges.

Method: 1. Write both numbers as prime factors. 2. Use only the primes that appear in both lists. 3. Take the lower power of each shared prime, then multiply.

LCM from the highest powers

The LCM has to be a multiple of both numbers, so it needs every prime that appears in either list. Use the higher power of each. From 72 and 120, that is 2^3 (the higher of 2^3 and 2^3), 3^2 (higher than 3^1) and 5^1. The LCM is 2^3 × 3^2 × 5.

Evaluate in a calm order. 2^3 = 8, 3^2 = 9 and 8 × 9 = 72. Then 72 × 5 = 360. So the LCM is 360. A quick check: 360 ÷ 72 = 5 and 360 ÷ 120 = 3, both whole numbers, and no smaller positive candidate built from these primes would do. Multiplying 72 × 120 gives a common multiple, but it is not the lowest.

Two lights flash together now. One flashes every 72 seconds and the other every 120 seconds. They next flash together after the LCM of the two times, which is 360 seconds. That is 6 minutes. The HCF would answer a different question, about splitting those times into equal pieces. Match the word 'together' or 'next coincide' to the LCM.

Method: 1. Write both numbers as prime factors. 2. Use every prime that appears in either list. 3. Take the higher power of each prime, then multiply.

Choosing HCF or LCM in a problem

Ask what is being shared or what is being lined up. Splitting into the largest equal groups, cutting ribbon into the longest equal lengths, or finding the greatest number of identical teams, is an HCF. You want the biggest number that goes into both totals. Events that repeat and next happen at the same moment, or the smallest length of track that is a whole number of both laps, is an LCM.

A smaller pair shows the same choice. 36 = 2^2 × 3^2 and 48 = 2^4 × 3. The HCF takes 2^2 × 3 = 12. The LCM takes 2^4 × 3^2 = 16 × 9 = 144. Twelve is the group size. One hundred and forty-four is the first shared multiple. Swapping those answers is the usual mix-up: lowest powers were used for the multiple, or highest powers were used for the factor.

After you have the prime lists, do not start again from listing every factor. The lists already contain the answer. Write the HCF and the LCM in index form first, then multiply out if the question wants an ordinary number. If three numbers appear, the rule is unchanged: lowest power of each prime that is in all three for the HCF, highest power of each prime that is in any of them for the LCM.

Method: 1. Largest equal groups, or the greatest shared size, is the highest common factor. 2. The next time two cycles meet is the lowest common multiple. 3. Find the prime factors first, then choose HCF or LCM.

The Venn diagram method for HCF and LCM

Real exam questions often draw two overlapping circles and ask you to fill them with prime factors. Write the prime factors of the first number in one circle and the second number in the other. Primes that appear in both numbers go in the overlap. For 84 = 2^2 × 3 × 7 and 126 = 2 × 3^2 × 7, the overlap holds 2, 3 and 7. The first circle keeps one extra 2 and the second circle keeps one extra 3.

The highest common factor is the product of the numbers in the overlap: 2 × 3 × 7 = 42. The lowest common multiple is the product of every number in the diagram: 2 × 3 × 7 × 2 × 3 = 252. Check that the overlap number divides both of the original numbers, and that both divide the LCM. This method gives the same answer as using the lowest and highest powers but is easy to see.

Method: 1. Write each number as a product of prime factors. 2. Put the shared prime factors in the overlap of the two circles. 3. Put the leftover prime factors in the correct outer circle. 4. Multiply the overlap for the HCF, and multiply everything for the LCM.

Tip: Check that every prime from each number appears in its own circle plus the overlap.

Working directly with prime factor form

Some questions give a number already in prime factor form and never ask you to multiply it out. If c = 2^10 × 3 × 5^6, then 18c is found by writing 18 = 2 × 3^2 and adding the indices of matching primes: 2^11 × 3^3 × 5^6. You can also read facts from the form. A number is a factor of another if all its prime powers are no larger.

Unknown letters can appear in the powers or in the primes. For Q = 2^2 × 3 × a^3 and R = 2^3 × 3^2 × a^2 with a a prime number, the HCF takes the lowest powers, so it is 2^2 × 3 × a^2. If that equals 300, then 12a^2 = 300, so a^2 = 25 and a = 5. The LCM takes the highest powers: 2^3 × 3^2 × a^3.

Method: 1. Write both numbers in prime factor form with the same primes in the same order. 2. For the HCF, take the lowest power of each prime. For the LCM, take the highest power. 3. Keep unknowns in the working, and solve once you have an equation. 4. Check your value by substituting it into the original forms.

Square numbers and the HCF and LCM product

A number is a perfect square when every prime in its prime factorisation has an even power. 180 = 2^2 × 3^2 × 5 has an odd power on the 5, so 180 is not a square. Multiply by one more 5 and you get 900 = 2^2 × 3^2 × 5^2 = 30^2. The smallest whole number to multiply by is therefore 5.

A very useful fact links two numbers a and b with their HCF and LCM: a × b = HCF × LCM. If the HCF is 12, the LCM is 72 and one number is 24, then the other is (12 × 72)/24 = 36. Check that HCF(24, 36) = 12 and LCM(24, 36) = 72. Remember a common multiple of two numbers is a multiple of their LCM.

Method: 1. Write the number in prime factor form. 2. Find which primes have an odd power, and multiply by those primes to make a square. 3. Use a × b = HCF × LCM to find a missing number. 4. Check by finding the HCF and LCM of your numbers.

Repeating events and equal groups

Questions about buses, flashing lights or bells that repeat want the LCM. If lights flash every 12 s, 18 s and 30 s, they flash together every LCM = 180 s. In 10 minutes, which is 600 s, that happens after 180, 360 and 540 seconds, so 3 times after the start. Be careful about whether the start counts. Read the question and say what you counted.

Questions about the biggest tile, the biggest group, or sharing equally want the HCF. A floor 360 cm by 240 cm tiled with identical whole square tiles uses tiles of side HCF(360, 240) = 120 cm. The number of tiles along each side is 360 ÷ 120 = 3 and 240 ÷ 120 = 2. Always convert to a single unit first, and finish with the count the question asks for.

Method: 1. Decide whether the story is about "together again" (LCM) or "biggest equal size" (HCF). 2. Convert all quantities to the same unit. 3. Find the LCM or HCF using prime factors. 4. Use the result to answer the actual question, such as a count, a size or a time.

Tip: Words like "again", "together", "next" suggest LCM. Words like "largest", "equal", "greatest" suggest HCF.

Remember

Keep going with Prime factors, HCF & LCM

Practise free

Start free

AQA-style and Edexcel-style questions. Yumio is not affiliated with, endorsed by or connected to AQA, Pearson Edexcel or any other exam board.

Next topicPractise free