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 can illustrate 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 prime factorize the numbers, i.e., we only list the prime factors of the numbers. Applying 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
Euclidean algorithm method relies on the principle that the GCF of two given numbers must also be the GCF of the two numbers and the difference between those numbers:
A faster version of this algorithm utilizes the modulo operation rather than subtraction. Looking 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 A = B or the condition in step 4 occurs. 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!
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.