A factor of a number divides into it exactly, leaving no remainder: the factors of 12 are 1, 2, 3, 4, 6 and 12. A common factor of two numbers appears in both lists. The greatest common factor is the largest one they share - the biggest number that divides both cleanly.
The GCF of 24 and 36 is 12. Both are divisible by 1, 2, 3, 4, 6 and 12, and 12 is the largest of those. You will also see it called the greatest common divisor (GCD) or the highest common factor (HCF); the three names mean exactly the same thing and which one you were taught is mostly a matter of geography.
Its main job is simplifying. To reduce 24/36 to lowest terms you divide both parts by their GCF: 24 ÷ 12 = 2 and 36 ÷ 12 = 3, giving 2/3 in one step. Dividing by a smaller common factor also works but leaves you going round again - which is the whole reason it is worth finding the greatest one.
What to watch for in the working
The prime table shows every prime and the exponent each number contributes. For a GCF you take the lowest in each row - and a prime missing from any column contributes nothing at all.
The Euclidean algorithm never factorises anything. It just divides and keeps remainders, which is why it stays fast on numbers far too large to factor.
A GCF of 1 means the numbers are coprime. That is a real answer, not a failure to find one.
The GCF can never be larger than your smallest number, and it is exactly the smallest number whenever that number divides all the others.
How to find the GCF of two numbers
1
Enter your numbers
Type two or more whole numbers separated by commas or spaces - 24, 36 or 54 24 36. Up to ten at once.
2
Read the answer, then pick a method
The GCF is at the top. Below it, the same answer is reached by shared prime factors and - for exactly two numbers - by the Euclidean algorithm.
3
Check the prime table row by row
Each row is a prime. The GCF takes the lowest exponent in the row, and any row with a dash in it drops out entirely, because a factor shared by only some of the numbers is not common.
4
Follow the Euclidean trace
Each line divides and records the remainder, then the next line repeats with the divisor and that remainder. When the remainder hits zero, the previous one is your answer.
Common GCF answers
The pairs that come up most often, with the reason rather than just the result.
Numbers
GCF
Why
24 and 36
12
Both share 2² and 3
48 and 18
6
Both share 2 and 3
8 and 12
4
Both share 2², but only 12 has a 3
15 and 25
5
Both share a single 5
8 and 9
1
No shared prime - coprime
7 and 21
7
7 divides 21, so the smaller number is the GCF
54, 24 and 36
6
2 and 3 appear in all three
Worked examples
GCF of 24 and 36
plain
24, 36
24 = 2³ · 3 and 36 = 2² · 3². For each prime take the lower exponent: 2² (since 24 has three 2s but 36 only two) and 3¹ (since 36 has two 3s but 24 only one). That gives 2² · 3 = 12. The Euclidean route agrees: 36 = 1 × 24 + 12, then 24 = 2 × 12 + 0, so the last non-zero remainder is 12.
Simplifying 24/36
plain
24, 36
The GCF is 12, so divide both parts by it: 24 ÷ 12 = 2 and 36 ÷ 12 = 3, giving 2/3. If you had spotted only the factor 2 you would have got 12/18, then 6/9, then 2/3 - the same place, three steps later. Finding the greatest common factor is what makes it one step.
Coprime numbers: 8 and 9
plain
8, 9
8 = 2³ and 9 = 3². They have no prime in common, so there is nothing to put in the GCF and the answer is 1. Numbers like this are called coprime. It also means the fraction 8/9 is already in lowest terms and cannot be reduced.
The Euclidean algorithm on 48 and 18
plain
48, 18
48 = 2 × 18 + 12. Now repeat with 18 and 12: 18 = 1 × 12 + 6. Repeat with 12 and 6: 12 = 2 × 6 + 0. The remainder is zero, so the previous remainder, 6, is the GCF. Notice that nothing was ever factorised - this is why the method works on numbers hundreds of digits long.
Common mistakes
Confusing GCF with LCM. The GCF is never bigger than your smallest number; the LCM is never smaller than your biggest. An answer on the wrong side means you solved the other problem.
Taking the highest exponent in the prime table. That is the LCM rule. For a GCF you take the lowest.
Including a prime that only some of the numbers have. If 3 does not divide every input, no power of 3 belongs in the GCF.
Stopping at the first common factor you notice. 2 divides both 24 and 36, but so does 12 - and only the greatest one simplifies a fraction in a single step.
Treating a GCF of 1 as an error. It means the numbers are coprime, which is a complete answer.
Reading the wrong line of the Euclidean algorithm. The answer is the last non-zero remainder, not the final zero and not the last quotient.
GCF FAQ
What is the greatest common factor?
The largest whole number that divides two or more numbers with no remainder. For 24 and 36 it is 12. It is also called the greatest common divisor (GCD) and the highest common factor (HCF) - all three names mean the same thing.
Are GCF, GCD and HCF the same?
Yes, completely. GCF and GCD are the common terms in the United States, HCF in the UK and much of the Commonwealth. Whichever your textbook uses, this calculator answers the same question.
How do you find the GCF by prime factorisation?
Break each number into primes, then for every prime that appears in ALL of them, take the lowest power you see, and multiply those together. For 24 = 2³ · 3 and 36 = 2² · 3², you take 2² and 3, giving 12.
What is the Euclidean algorithm and why use it?
Divide the larger number by the smaller and keep the remainder. Then repeat with the divisor and that remainder, until the remainder is zero - the last non-zero remainder is the GCF. It is worth knowing because it never factorises anything, so it stays fast on numbers far too big to factor.
What does it mean if the GCF is 1?
The numbers share no factor other than 1, which makes them coprime. Any fraction built from them is already in its lowest terms.
Can the GCF be one of the numbers?
Yes, whenever one number divides all the others. The GCF of 7 and 21 is 7, because 7 divides 21 and nothing larger than 7 could divide 7.
How do I use the GCF to simplify a fraction?
Divide the numerator and the denominator by their GCF. For 24/36 the GCF is 12, so you get 2/3. Because you used the greatest common factor, the result is guaranteed to be in lowest terms already.