HCF from Factor Lists

Introduction

Welcome back to Finding the Highest Common Factor! In the previous lesson, you learned how to list all the common factors of two or more numbers by comparing their factor lists. That was an important first step, but in practice, we usually need just one number from that list — the biggest one.

This second lesson zooms in on exactly that idea. We will define the Highest Common Factor (HCF), walk through a reliable method for finding it, and explore two special cases you will encounter regularly. By the end, you will be able to look at any set of whole numbers and confidently pick out the greatest factor they all share.

Why the Greatest Common Factor Matters

Common factors tell us every group size that divides two or more quantities evenly, but in most real situations we care about the largest group size that works. Think of it this way: if you have 20 apples and 30 oranges and you want to make identical fruit bags with no leftovers, you could make 2 bags, or 5 bags. But you probably want to know the most bags you can make, because that means more people served and less waste per bag. That "most bags" number is the HCF.

Illustration of 20 apples and 30 oranges being packed into the maximum number of identical fruit bags with no leftovers, showing HCF = 10

Whenever a problem asks for the greatest, maximum, or largest value that divides several quantities evenly, you are looking for the HCF. Let's give it a precise definition.

What Is the Highest Common Factor?

The Highest Common Factor (HCF) of two or more whole numbers is the largest number that is a factor of every number in the set. You may also see it called the Greatest Common Factor (GCF) or the Greatest Common Divisor (GCD) — all three names mean exactly the same thing.

Because 1 divides every whole number, every set of whole numbers has at least one common factor. This guarantees that the HCF always exists and is at least 11.

Finding the HCF Step by Step

The method builds directly on the factor-listing skill you practised in the previous lesson. Only one new action is needed at the end:

  1. List all factors of each number.
  2. Identify the common factors (those appearing in every list).
  3. Select the greatest value from that shared list.
Flowchart showing the three-step method for finding the HCF: list all factors, identify common factors, select the greatest

Let's walk through an example with 1212 and 1818.

Factors of 12Factors of 18
1, 2, 3, 4, 6, 121, 2, 3, 6, 9, 18

Comparing the two lists, the common factors are 1,2,3,61, 2, 3, 6. The largest of these is 6, so:

HCF(12,18)=6\text{HCF}(12, 18) = 6

This means 66 is the biggest number that divides both 1212 and 1818 exactly. No number larger than 66 can do that.

A Larger Pair: 20 and 30

Let's try 2020 and 3030, which have a few more factors to consider.

Factors of 20Factors of 30
1, 2, 4, 5, 10, 201, 2, 3, 5, 6, 10, 15, 30

The common factors are 1,2,5,101, 2, 5, 10. The greatest value in this list is 10:

HCF(20,30)=10\text{HCF}(20, 30) = 10

Notice how 44 is a factor of 2020 but not of 3030, so it does not qualify. Always check each candidate against every list before including it. Going back to our fruit-bag scenario, this result tells us we can make 10 identical bags — each containing 2 apples and 3 oranges — with nothing left over.

When the HCF Is 1

In the previous lesson, we met the idea of coprime (relatively prime) numbers — pairs whose only common factor is 11. When that happens, the HCF is simply 11.

Consider 88 and 1515:

  • Factors of 88: 1,2,4,81, 2, 4, 8
  • Factors of 1515: 1,3,5,151, 3, 5, 15

The only shared factor is 11, so:

HCF(8,15)=1\text{HCF}(8, 15) = 1

An HCF of 11 does not mean something went wrong. It just tells us that no number greater than 11 divides both values evenly. This is a perfectly normal outcome, and you will see it often when the two numbers have no overlap in their prime factors.

When One Number Is Itself the HCF

Another special case occurs when the smaller number divides the larger one exactly. Take 1212 and 3636:

Factors of 12Factors of 36
1, 2, 3, 4, 6, 121, 2, 3, 4, 6, 9, 12, 18, 36

The common factors are 1,2,3,4,6,121, 2, 3, 4, 6, 12. The greatest is 12, which is one of the original numbers:

HCF(12,36)=12\text{HCF}(12, 36) = 12

This happens because 36÷12=336 \div 12 = 3, so 1212 is a factor of 3636. Whenever one number divides the other exactly, the smaller number will always be the HCF. Recognizing this pattern can save you time: if you notice that aa divides bb with no remainder, you can immediately conclude that HCF(a,b)=a\text{HCF}(a, b) = a.

Working with Three Numbers

The process extends naturally to three or more numbers. The only change is that a factor must appear in every list to qualify. Let's find the HCF of 1212, 1818, and 3030 — numbers you worked with in the previous lesson when practising common factors.

Factors of 12Factors of 18Factors of 30
1, 2, 3, 4, 6, 121, 2, 3, 6, 9, 181, 2, 3, 5, 6, 10, 15, 30

Checking each candidate: 11 ✓, 22 ✓, 33 ✓, 44 (missing from 18 and 30) ✗, 55 (missing from 12 and 18) ✗, 66 ✓. The largest common factor is 6:

HCF(12,18,30)=6\text{HCF}(12, 18, 30) = 6 Venn diagram showing the factors of 12, 18, and 30 in three overlapping circles, with common factors 1, 2, 3, 6 in the central intersection and HCF = 6 highlighted

With more numbers in the set, the HCF tends to stay the same or get smaller, because each new list adds another filter. It can never get larger.

Key Patterns at a Glance

Before heading into practice, here is a compact reference for the three scenarios you will encounter:

ScenarioWhat happensExample
Typical caseSeveral common factors; pick the largestHCF(20,30)=10\text{HCF}(20, 30) = 10
Coprime numbersOnly common factor is 11HCF(8,15)=1\text{HCF}(8, 15) = 1
One divides the otherSmaller number is itself the HCFHCF(12,36)=12\text{HCF}(12, 36) = 12

In every scenario, the method is the same: list, compare, and choose the greatest.

Conclusion and Next Steps

In this lesson, we defined the Highest Common Factor as the largest number that divides every number in a set. We practised a straightforward three-step method — list all factors, find the common ones, and pick the greatest — and we explored two important special cases: coprime numbers (where the HCF is 11) and pairs where one number divides the other (where the smaller number is the HCF).

Now it is time to put this knowledge into action! You will work through tasks that range from straightforward HCF calculations to real-world sharing scenarios where the HCF determines the best way to split items into equal groups. Jump in and see how quickly the method becomes second nature.

Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal