Greatest Common Factor Calculator
You can use our greatest common factor calculator to find the greatest common factor (GCF) of a given set of numbers. Finding the GCF is critical for reducing fractions or finding the least common multiple of two numbers. However, it can be tedious to find the GCF of large numbers, say 10144 and 12408, through manual calculations. And that's where this calculator shines - instantly, you can use our greatest common factor finder to find the GCF between any two numbers!
In the following article, you shall learn answers to some fundamental questions, like what is the greatest common factor and how to calculate it.
What is the greatest common factor?
The greatest common factor of a given set of positive numbers is the largest positive integer that divides them without leaving a remainder.
For example, consider the numbers 45 and 189. The greatest positive integer that can divide them both is 9. Hence, we say that the greatest common factor of 45 and 189 is 9.
We denote the GCF of two numbers, A and B, as GCF(A, B).
How to find the greatest common factor
There are several methods to find the greatest common factor of two numbers:
- List all factors;
- Prime factorization method;
- Euclidean algorithm;
- Binary algorithm; and
- Using some properties of GCF.
Let's briefly get acquainted with each method.
Listing all factors
This method involves two basic steps. Let's explore them with the help of our previous example:
- List all possible factors for each number:
- .
- .
- List all common factors for these numbers in ascending order: .
- The largest number in this list is the greatest common factor: .
This method is the most straightforward approach to the problem. But as you may have observed, it can be tedious to perform manually for large numbers.
Prime factorization method
In this method, we perform the prime factorization of the numbers, i.e., we write them as products of their prime factors and then multiply common prime factors together. Let's apply this method to the same example:
- Prime factorize the numbers:
- ; and
- .
- Gather the common prime factors: .
- Multiply the common prime factors to find the GCF: .
Euclidean algorithm
The Euclidean algorithm method relies on the principle that the GCF of two numbers is also the GCF of these two numbers and their difference:
A faster version of this algorithm utilizes the modulo operation rather than subtraction. Let's look at our example, GCF(45, 189):
-
Take the smaller number as the divisor and perform the modulo operation:
-
Take the previous divisor and the modulo remainder in a new list:
-
Take the smaller number in this list as the divisor and perform the modulo operation:
-
Since the remainder is , we can stop. The last modulo divisor, , is the GCF of 45 and 189.
Binary algorithm for GCF
This algorithm follows these simple rules:
- If A and B are even, .
- If only A is even, .
- If A and B are odd and A>B, .
- .
The binary algorithm dictates that we repeat steps 1-3 until we reach A = B or the condition in step 4. Let's look at our two numbers, 45 and 189:
- Both numbers are odd:
- Only one number is even:
- Only one number is even:
- Only one number is even:
- Both numbers are odd:
- Only one number is even:
- Since both numbers are the same, we can stop here:
Using this greatest common factor calculator
Our greatest common factor calculator is easy to use:
- Simply enter the list of (up to fifteen) numbers in any order. The tool will calculate the greatest common factor of these numbers.
- Want to check step-by-step solutions? Choose the method from the drop-down list, and our greatest common factor finder will make it happen in a snap!
GCF in your bathroom
Are you planning to renovate your house? If you intend to cover any surface with square tiles, you will probably need to compute a GCF!
Suppose that you want to tile the floor of your bathroom. For aesthetic reasons, you want to avoid breaking the tiles. If the floor has length and width , how big can you take the side length of your tiles? For the tiles to fill in the floor completely, their side length needs to be a factor of both the length and width. In other words, the largest possible is .
So, before you start the renovation, make sure to learn how to calculate the greatest common factor!
Other relevant tools
Check out other tools from Omni that perform similar calculations:
FAQ
What is the GCF of 8 and 12?
The greatest common factor of 8 and 12 is 4. To arrive at this answer, you need to follow these steps:
- List all factors for both numbers:
- 8: 1, 2, 4, 8.
- 12: 1, 2, 3, 4, 6, 12.
- Gather the common factors between the two numbers: 1, 2, 4.
- 4 is the largest in this list, hence the greatest common factor of 8 and 12.
- Verify the calculation and solution steps with our greatest common factor calculator.
What is the greatest common factor of two co-prime numbers?
The greatest common factor of any two co-prime numbers is 1. This is because, by definition, co-prime numbers have only 1 as the common factor between them.