How to Find the Greatest Common Factor (3 Methods + Examples)
You have 24 apples and 36 oranges, and you want to pack them into identical gift bags with nothing left over. How many bags can you make, and what goes in each one? The answer is a single number — the greatest common factor — and finding it is a skill that shows up far beyond school maths: simplifying fractions, shrinking ratios, splitting groups evenly, even tiling a floor.
The greatest common factor (GCF) of two or more numbers is the largest number that divides every one of them exactly, with no remainder. It is also called the greatest common divisor (GCD) or the highest common factor (HCF) — three names for the same number. There are three reliable ways to find it, and this guide works through all three with fresh examples. Or skip the handwriting and use our free GCF Calculator — it shows the prime factorisation and the answer together.
What the GCF Actually Means
Take 36 and 60. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36. The factors of 60 are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60. The numbers that appear in both lists — the common factors — are 1, 2, 3, 4, 6 and 12. The greatest of them is 12, so GCF(36, 60) = 12.
That one fact does real work. The fraction 36/60 simplifies in a single step: divide the top and bottom by 12 and you get 3/5. The ratio 36:60 shrinks to 3:5 without changing what it means. And back to the fruit: 24 apples and 36 oranges share the GCF 12, so you can make 12 identical bags, each holding 2 apples and 3 oranges, with nothing left over.
Method 1: List the Factors
How it works: write out every factor of each number, then take the largest factor that appears in every list.
Worked example: GCF(20, 30). The factors of 20 are 1, 2, 4, 5, 10 and 20. The factors of 30 are 1, 2, 3, 5, 6, 10, 15 and 30. The common factors are 1, 2, 5 and 10 — the greatest is 10, so GCF(20, 30) = 10.
This method is the easiest to understand and the best one to teach, because you can see exactly why the answer is what it is. Its weakness is speed: for numbers like 462 and 1,071, listing every factor by hand is slow and error-prone. Use it for small numbers, and reach for the next two methods when the numbers grow.
Method 2: Prime Factorisation
How it works: break each number into its prime factors, keep only the primes that appear in every number, take each at its lowest power, and multiply.
Worked example: GCF(36, 60). Break them down: 36 = 2² × 3² and 60 = 2² × 3 × 5. The prime 2 appears in both, at its lowest power 2². The prime 3 appears in both, at its lowest power 3¹. The prime 5 appears only in 60, so it drops out. Multiply what is left: 2² × 3 = 4 × 3 = 12. So GCF(36, 60) = 12 — the same answer the listing method gave, reached faster.
Worked example: GCF(56, 98). 56 = 2³ × 7 and 98 = 2 × 7². The shared primes are 2 (lowest power 2¹) and 7 (lowest power 7¹). Multiply: 2 × 7 = 14. So GCF(56, 98) = 14. Check it: 56 ÷ 14 = 4 and 98 ÷ 14 = 7, and 4 and 7 share no factor at all.
Worked example with three numbers: GCF(36, 54, 90). 36 = 2² × 3², 54 = 2 × 3³ and 90 = 2 × 3² × 5. A prime only counts if it appears in all three: 2 appears everywhere at lowest power 2¹, and 3 appears everywhere at lowest power 3². The 5 drops out because 36 and 54 do not contain it. Multiply: 2 × 9 = 18. So GCF(36, 54, 90) = 18.
Prime factorisation is the method textbooks teach first, because it explains *why* the answer works — and it is the method our GCF Calculator shows you step by step.
Method 3: The Euclidean Algorithm
How it works: divide the larger number by the smaller one and keep the remainder. Then repeat — divide the previous divisor by the remainder — until the remainder is 0. The last divisor is the GCF. No factorising at all.
Worked example: GCF(1,071, 462). Listing factors here would take all day, so watch how short this is:
1,071 = 462 × 2 + 147 (remainder 147)
462 = 147 × 3 + 21 (remainder 21)
147 = 21 × 7 + 0 (remainder 0 — stop)
The last divisor is 21, so GCF(1,071, 462) = 21. Check: 1,071 ÷ 21 = 51 and 462 ÷ 21 = 22, and 51 and 22 share no common factor.
This is the fastest method for large numbers, which is why computers use it. The only rule to remember is to always divide the larger number by the smaller one at each step, and to stop the moment a remainder hits 0.
GCF, LCM and the Identity That Connects Them
The GCF has a close partner: the least common multiple (LCM). Where the GCF is the largest number that divides both numbers, the LCM is the smallest number both numbers divide into. The two are tied together by one neat identity:
GCF(a, b) × LCM(a, b) = a × b
For 36 and 60: GCF = 12 and LCM = 180. Check the identity: 12 × 180 = 2,160, and 36 × 60 = 2,160. It matches — a useful cross-check when you have worked out one of the two and want to verify the other. If you need the LCM itself, our free LCM Calculator finds it the same way, with the factorisations shown.
Everyday Uses of the GCF
Simplifying fractions. A recipe scaled up calls for 56/98 of a cup — an awkward fraction. Divide top and bottom by GCF(56, 98) = 14 and it becomes a clean 4/7. Every fraction you have ever reduced was a GCF problem in disguise.
Splitting things evenly. A teacher has 36 pencils and 54 notebooks for prize packs. GCF(36, 54) = 18, so she can make 18 identical packs with 2 pencils and 3 notebooks each — the most packs possible with nothing left over.
Tiling a floor. A room measures 60 cm by 84 cm, and you want the largest square tiles that fit exactly, with no cutting. GCF(60, 84) = 12, so the biggest tiles are 12 cm × 12 cm, and you need (60 ÷ 12) × (84 ÷ 12) = 5 × 7 = 35 tiles.
When the GCF is 1. If two numbers share no prime factor at all, their GCF is 1 and they are called coprime. For example, GCF(8, 15) = 1. A fraction like 8/15 is already in its lowest terms — there is nothing left to simplify.
3 Mistakes That Make GCF Answers Wrong
Mistake 1: taking the highest power instead of the lowest. In prime factorisation, shared primes are taken at their lowest power. For 36 = 2² × 3² and 60 = 2² × 3 × 5, the 3 must be taken as 3¹, not 3² — taking 3² gives 36, which does not divide 60.
Mistake 2: including a prime that is not in every number. In GCF(36, 54, 90), the 5 belongs only to 90. Including it gives 90, which does not divide 36 or 54. A prime counts only if it appears in all the factorisations.
Mistake 3: stopping the Euclidean algorithm too early. The answer is the divisor at the step where the remainder first reaches 0 — not the remainder before it. In the 1,071 and 462 example, stopping after the first division would wrongly give 147; the true GCF is 21, found only by continuing to a zero remainder.
Frequently Asked Questions
How do I find the GCF of two numbers?
List the factors of both numbers and take the largest one they share; or factorise both into primes, keep the shared primes at their lowest powers, and multiply. For example, GCF(18, 27) = 9, because 18 = 2 × 3² and 27 = 3³, and the shared prime 3 at its lowest shared power is 3² = 9.
What is the GCF of 12 and 18?
6. The factors of 12 are 1, 2, 3, 4, 6 and 12; the factors of 18 are 1, 2, 3, 6, 9 and 18. The common factors are 1, 2, 3 and 6, and the greatest is 6. By prime factorisation: 12 = 2² × 3 and 18 = 2 × 3², so the shared primes at lowest powers give 2 × 3 = 6.
Is GCF the same as GCD and HCF?
Yes — greatest common factor, greatest common divisor and highest common factor are three names for the same number. GCF is the most common term in American textbooks, HCF in British and Indian ones, and GCD in programming.
How do I find the GCF of three or more numbers?
Use prime factorisation and keep only the primes that appear in every number, at their lowest powers. For 36, 54 and 90 that gives 2 × 3² = 18. The listing method works too, but the lists get long — factorisation stays short.
What is the GCF used for?
Most often for simplifying fractions and ratios in one step, splitting quantities into the largest possible equal groups with nothing left over, and finding the largest square tile that fits a rectangle exactly. It also checks the LCM through the identity GCF × LCM = a × b.
Try the Free GCF Calculator
All three methods give the same answer — listing factors is the clearest, prime factorisation explains the why, and the Euclidean algorithm is the fastest for big numbers. Practice them on small pairs like 18 and 27 until the steps feel automatic, and use the Euclidean algorithm when the numbers stop being friendly.
Our free GCF Calculator runs the prime factorisation for you and shows the shared primes, the GCF and the companion LCM in one place — entirely in your browser, with nothing to sign up for. And when you need the other half of the pair, the free LCM Calculator is right beside it.