Find the greatest common factor (GCF), also called the highest common factor (HCF), of 2 to 10 whole numbers. See every common factor, the simplified fraction or ratio and the full working for four methods.

This GCF calculator finds the greatest common factor, known in UK and Irish schools as the highest common factor, for students, teachers and anyone simplifying fractions, ratios or measurements. Type whole numbers separated by commas or spaces. You get the GCF, the full list of common factors, the lowest common multiple, the simplified fraction or ratio and worked steps for the method you choose.
What is the greatest common factor?
The greatest common factor (GCF), called the highest common factor (HCF) in the UK, is the largest whole number that divides every number in a set exactly. A GCF calculator finds it with prime factors: 24 = 2³ × 3 and 36 = 2² × 3², so the GCF is 2² × 3 = 12.
How Does the GCF Calculator Work?
It uses exact whole number arithmetic and Euclid’s algorithm, so numbers with up to 15 digits give an exact answer instantly. The working can also be shown with prime factors, a list of factors or the ladder method, and every method gives the same GCF.
Euclid: GCF(a, b) = GCF(b, a mod b), until the remainder is 0
GCF(a, b, c) = GCF(GCF(a, b), c)
Euclid’s algorithm repeatedly divides and keeps the remainder. For 1071 and 462: 1071 = 2 × 462 + 147, then 462 = 3 × 147 + 21, then 147 = 7 × 21 + 0. The last non-zero remainder, 21, is the GCF. Euclid described this method in his Elements around 300 BC, and it is still one of the oldest algorithms in everyday use. In 1844 Gabriel Lamé proved it never needs more than five times as many steps as the smaller number has digits.
Which Method Should You Use to Find the GCF?
| Method | Best for | Example: 24 and 36 |
|---|---|---|
| List factors | Small numbers | 1, 2, 3, 4, 6, 8, 12, 24 and 1, 2, 3, 4, 6, 9, 12, 18, 36: largest shared is 12 |
| Prime factors | GCSE and Junior Cycle exams | 2³ × 3 and 2² × 3²: lowest powers 2² × 3 = 12 |
| Euclid’s algorithm | Large numbers | 36 = 1 × 24 + 12, 24 = 2 × 12 + 0: GCF 12 |
| Ladder (division) | Three or more numbers | Divide both by 2, 2, 3 to reach 2 and 3: 2 × 2 × 3 = 12 |
GCF of common number pairs
| Numbers | GCF (HCF) | LCM |
|---|---|---|
| 8, 12 | 4 | 24 |
| 12, 18 | 6 | 36 |
| 16, 24 | 8 | 48 |
| 18, 24 | 6 | 72 |
| 20, 30 | 10 | 60 |
| 24, 36 | 12 | 72 |
| 36, 48 | 12 | 144 |
| 42, 56 | 14 | 168 |
| 54, 72 | 18 | 216 |
| 17, 31 | 1 | 527 |
How Do You Use the GCF to Simplify Fractions and Ratios?
Divide the top and bottom of a fraction by their GCF and the result is in its lowest terms in a single step: the GCF of 24 and 36 is 12, so 24/36 = 2/3. Ratios work the same way. A ratio of 24 : 36 : 60 shares a GCF of 12, so it simplifies to 2 : 3 : 5. Enter two numbers and the calculator shows the simplified fraction, or three or more for the simplest ratio. To keep going with fraction sums, open the fraction calculator, or turn a decimal into a fraction first with the decimal to fraction calculator.
Worked example: the largest square tile for a floor
Tomás wants to cover a 360 cm × 480 cm utility room floor with square tiles and no cutting. The tile side must divide both lengths, so it must be a common factor of 360 and 480. The GCF is 120, which gives the largest possible tile, 120 cm, needing 3 × 4 = 12 tiles. Every common factor is a size that fits exactly: 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 30, 40, 60 and 120 cm. A practical 60 cm tile fits 6 × 8 = 48 times and a 40 cm tile 9 × 12 = 108 times. The tile calculator handles rooms where tiles do need cutting.
What Is the Difference Between GCF, HCF and GCD?
GCF, HCF and GCD all mean the same number: the largest whole number that divides every number in the set. Greatest common factor is the usual US school term. Highest common factor is used in the UK and Ireland, including the Department for Education’s GCSE maths content for England and learning outcome N.1d of Ireland’s Junior Cycle maths specification. Greatest common divisor (GCD) is the usual term in university maths and programming. In German it is the ggT (größter gemeinsamer Teiler) and in French the PGCD (plus grand commun diviseur).
What Does It Mean When the GCF Is 1?
A GCF of 1 means the numbers are coprime: they share no factor except 1, so a fraction made from them is already in lowest terms. 8 and 9 are coprime even though neither is prime, and 17 and 31 are coprime because both are prime and different. For two coprime numbers, the lowest common multiple is simply their product, for example 8 × 9 = 72.
How Do You Use the GCF Calculator?
Enter your numbers
Type 2 to 10 whole numbers separated by commas or spaces, such as 24, 36, 60. Negative signs are ignored and 0 is left out.

Choose a method
Pick prime factors, list factors, Euclid’s algorithm or the ladder. The GCF stays the same and the working changes to match.

Read the GCF
The large figure is the GCF. Below it are the LCM, every common factor, the simplified fraction or ratio and whether the numbers are coprime.

Copy the working
The working shows each step for your own numbers, laid out the way it is usually written in class or in an exam answer.

Frequently Asked Questions
What is the GCF of 24 and 36?
The GCF of 24 and 36 is 12. In prime factors, 24 = 2³ × 3 and 36 = 2² × 3², and the lowest shared powers are 2² and 3, so 4 × 3 = 12. Dividing both by 12 gives the simplified fraction 2/3.
Is the HCF the same as the GCF?
Yes. Highest common factor (HCF) is the usual term in the UK and Ireland and greatest common factor (GCF) is the usual US term. Both mean the largest whole number that divides every number in the set exactly, also called the greatest common divisor.
How do you find the GCF of three numbers?
Find the GCF of the first two numbers, then the GCF of that answer and the third number. With prime factors, keep only the primes found in all three numbers, each at its lowest power. For 24, 36 and 60 the GCF is 2² × 3 = 12.
Can the GCF be one of the numbers?
Yes. If the smallest number divides all the others, it is the GCF. For 6, 18 and 30, all three are divisible by 6, so the GCF is 6. The GCF can never be larger than the smallest number in the set.
What is the GCF of a number and 0?
The GCF of any positive number and 0 is the number itself, because every number divides 0. For example, GCF(15, 0) = 15. If every number is 0 there is no useful answer, so the calculator asks for at least one number above 0.
How are the GCF and LCM related?
For two numbers, the GCF times the LCM equals the product of the numbers. For 24 and 36: 12 × 72 = 864 = 24 × 36. This shortcut does not hold for three or more numbers, so the calculator works those out in pairs.
Sources and Further Reading
- Euclidean algorithm, Wikipedia
- Greatest common divisor, Wikipedia
- GCSE mathematics: subject content and assessment objectives, Department for Education (GOV.UK)
Related Tools
Last reviewed: October 2026



