Greatest Common Factor: Three Methods, One Answer
Listing factors works for small numbers and falls apart fast; here is the method that scales, worked through twice.
Quick answer: The greatest common factor is the largest number that divides two or more numbers exactly. For 48 and 180 it is 12, because 48 = 2^4 x 3 and 180 = 2^2 x 3^2 x 5, and the shared part is 2^2 x 3. Listing factors works for small numbers; prime factorisation or the Euclidean algorithm works for anything.
Three methods get you the same answer. They differ enormously in how well they hold up once the numbers stop being friendly.
Two methods that work by hand
Listing factors
Write out every factor of each number and take the biggest one they share. For 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48. For 180: 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 30, 36, 45, 60, 90, 180. The largest in both lists is 12. Fine under about 100, tedious above that, and easy to get wrong by missing a factor mid-list.
Prime factorisation
Break each number into primes and multiply the overlap. 48 is 2 x 2 x 2 x 2 x 3, so 2^4 x 3. 180 is 2 x 2 x 3 x 3 x 5, so 2^2 x 3^2 x 5. For each prime that appears in both, take the lower power: 2^2 from the fours, 3^1 from the threes, and 5 is ignored because 48 has none. That gives 4 x 3 = 12.
This scales better than listing and it gives you the least common multiple for free. Take the higher power of every prime instead and you get 2^4 x 3^2 x 5 = 720. The shortcut check is that GCF x LCM equals the product of the two numbers: 12 x 720 = 8,640, and 48 x 180 = 8,640.
Run your own numbers
It is free, there is no sign-up, and it works on your phone.
Open the Greatest Common Factor CalculatorThe Euclidean algorithm handles the ugly cases
When the numbers are large and factorising them is slow, divide instead. Divide the larger by the smaller, keep the remainder, then repeat with the previous divisor and that remainder until the remainder is zero. The last non-zero remainder is the answer.
Find the GCF of 1,071 and 462. Divide 1,071 by 462: quotient 2, remainder 147. Divide 462 by 147: quotient 3, remainder 21. Divide 147 by 21: quotient 7, remainder 0. So the answer is 21. Three lines of arithmetic, and no factorising of a four digit number.
This is the method computers use, and it stays fast on numbers with hundreds of digits because every step shrinks the pair hard: 1,071 and 462 were down to 147 and 21 after two divisions.
Try it with your figures
No sign-up, no ads. Your inputs stay in your browser.
Use the Greatest Common Factor CalculatorWhere this shows up outside homework
Reducing fractions is the obvious one. 48/180 divided top and bottom by 12 gives 4/15, and no further reduction is possible because 4 and 15 share no factor above 1. That is what fully simplified means, and it is covered in more depth in the guide to simplifying fractions.
Tiling is the other one people actually meet. A floor measuring 336 cm by 210 cm can be covered exactly by square tiles with no cutting, and the largest such tile is the GCF: 42 cm. That gives 8 tiles along one wall and 5 along the other, 40 tiles in total. Any smaller common factor fits too, so 21 cm or 14 cm tiles also work, but 42 cm means the fewest grout lines.
The same logic sorts out scheduling problems, splitting mixed groups into equal teams, and gear ratios.
Using the calculator
Enter two or more numbers separated by commas and read the result. Most tools accept a whole list, which matters because the GCF of three numbers is not the GCF of a pair: for 24, 36 and 90 it is 6, even though 24 and 36 on their own share 12. Negative numbers are usually treated by their absolute value, since sign does not affect divisibility. For fraction work, run the numerator and denominator through together and divide by whatever comes back. If you would rather skip the step, a fraction calculator does the reduction as part of the answer.
Check your own case
Free to use, and it takes less than a minute.
Open the Greatest Common Factor CalculatorCommon questions
Is GCF the same as HCF? Yes. US textbooks say greatest common factor, UK ones say highest common factor, and greatest common divisor turns up in both. Same calculation, three names.
What is the GCF of two prime numbers? Always 1, unless the two primes are identical. Primes have no factors besides 1 and themselves, so two different ones can only share 1.
Can the GCF be one of the numbers themselves? Yes, whenever the smaller number divides the larger exactly. The GCF of 15 and 45 is 15.
What is the GCF of a number and zero? The number itself, because every whole number divides zero exactly. So the GCF of 0 and 18 is 18. It looks like a trick question and follows straight from the definition.
Calculators for this
All free, no sign-up.