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 , so:

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
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
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:

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 ✓, ✓, (missing from 18 and 30) ✗, (missing from 12 and 18) ✗, ✓. The largest common factor is :

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
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