Skip to content

Prime factorisation, HCF and LCM

Write a number as a product of primes with a factor tree, then use it to find the highest common factor and lowest common multiple.

Also known as: prime factorization, prime factor decomposition, highest common factor, lowest common multiple, GCF and LCM, factor trees.

Key ideas

  • A prime number has exactly two factors: 1 and itself. 1 is not prime, and 2 is the only even prime.
  • Every whole number greater than 1 can be written as a product of primes in exactly one way (apart from order): 60=22×3×560 = 2^2 \times 3 \times 5.
  • HCF (highest common factor): multiply the prime factors the numbers share, using the lower power of each.
  • LCM (lowest common multiple): multiply every prime factor that appears, using the higher power of each.

Prime numbers and factor trees

The primes start 2,3,5,7,11,13,17,19,23,29,…2, 3, 5, 7, 11, 13, 17, 19, 23, 29, \ldots

To write a number as a product of prime factors, split it into any two factors, and keep splitting until every branch ends in a prime. For 60:

  • 60=6×1060 = 6 \times 10
  • 6=2×36 = 2 \times 3 and 10=2×510 = 2 \times 5
  • So 60=2×2×3×5=22×3×560 = 2 \times 2 \times 3 \times 5 = 2^2 \times 3 \times 5.

You could start with 60=4×1560 = 4 \times 15 instead and you'd reach the same primes: the prime factorisation of a number is unique. Write the primes in order, using powers for repeats.

HCF and LCM from prime factors

Write both numbers as products of primes, then compare the powers of each prime.

For 36=22×3236 = 2^2 \times 3^2 and 60=22×3×560 = 2^2 \times 3 \times 5:

PrimePower in 36Power in 60HCF uses the lowerLCM uses the higher
2222^2222^2222^2222^2
3323^2313^1313^1323^2
5none515^1none515^1

So HCF=22×3=12\text{HCF} = 2^2 \times 3 = 12 and LCM=22×32×5=180\text{LCM} = 2^2 \times 3^2 \times 5 = 180. A quick check: for two numbers, HCF×LCM\text{HCF} \times \text{LCM} equals the product of the numbers, and 12×180=2160=36×6012 \times 180 = 2160 = 36 \times 60.

Some students prefer a Venn diagram: shared primes go in the overlap. The HCF is the product of the overlap; the LCM is the product of everything in the diagram.

When to use HCF or LCM

  • HCF answers "what's the biggest equal group or size?" Questions about splitting things into identical groups with nothing left over, or the largest square tile that fits exactly.
  • LCM answers "when do things line up again?" Questions about buses, lights or events that repeat at different intervals.

In the US, the HCF is often called the GCF (greatest common factor).

Worked examples

Example 1 · A factor tree

Write 84 as a product of its prime factors.

  1. Step 1.84=2×4284 = 2 \times 42, and 42=2×2142 = 2 \times 21, and 21=3×721 = 3 \times 7.
  2. Step 2.So 84=2×2×3×784 = 2 \times 2 \times 3 \times 7.

Answer: 84=22×3×784 = 2^2 \times 3 \times 7

Example 2 · HCF and LCM

Find the HCF and LCM of 36 and 60.

  1. Step 1.36=22×3236 = 2^2 \times 3^2 and 60=22×3×560 = 2^2 \times 3 \times 5.
  2. Step 2.HCF: shared primes with the lower power, 22×3=122^2 \times 3 = 12.
  3. Step 3.LCM: every prime with the higher power, 22×32×5=1802^2 \times 3^2 \times 5 = 180.

Answer: HCF=12\text{HCF} = 12, LCM=180\text{LCM} = 180

Example 3 · A word problem

One bus leaves the station every 12 minutes and another every 18 minutes. Both leave together at 9:00. When do they next leave together?

  1. Step 1."Next together" means a common multiple, so find the LCM of 12 and 18.
  2. Step 2.12=22×312 = 2^2 \times 3 and 18=2×3218 = 2 \times 3^2, so LCM=22×32=36\text{LCM} = 2^2 \times 3^2 = 36.
  3. Step 3.36 minutes after 9:00 is 9:36.

Answer: 9:36

Common mistakes

  • Counting 1 as a prime number.
  • Stopping a factor tree too early, e.g. writing 60=22×1560 = 2^2 \times 15 (15 is not prime).
  • Mixing up HCF and LCM: the HCF can't be bigger than the smaller number, and the LCM can't be smaller than the larger number.
  • Using the higher powers for the HCF, e.g. giving 22×32=362^2 \times 3^2 = 36 as the HCF of 36 and 60.

Try it yourself

Original practice questions. Your answer is checked instantly.

Question 1Prime factorisation, HCF and LCMEasier

Which of these numbers is prime?

Question 2Prime factorisation, HCF and LCMEasier

What is 12 written as a product of its prime factors?

Stuck on a question like these? Our AI math tutor explains it one step at a time and checks your working.

Start learning with TutorAura

Take the diagnostic, get a study plan and practise with the AI tutor. Free for 3 days, no card needed.

Start free trial