Greatest Common Factor (GCF) Calculator
Find the Greatest Common Factor (GCF) of a set of numbers. The GCF is also known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF).
Your Result
Enter at least two integers above to find their GCF.
What is the Greatest Common Factor (GCF)?
The Greatest Common Factor (GCF) of two or more integers is the largest positive integer that divides each of the integers without leaving a remainder. For instance, the GCF of 18 and 24 is 6, because 6 is the largest number that can divide both 18 and 24 evenly.
Factors of 18 are: 1, 2, 3, 6, 9, 18
Factors of 24 are: 1, 2, 3, 4, 6, 8, 12, 24
The common factors are 1, 2, 3, and 6. The greatest among them is 6.
How to Find the GCF
There are several methods to find the GCF. Our calculator uses the highly efficient Euclidean algorithm, but understanding the manual methods is also useful.
1. Prime Factorization Method
This method involves finding the prime factors of each number.
- Find the prime factorization of each number.
- Identify all the common prime factors.
- For each common prime factor, take the lowest power it appears in.
- Multiply these factors together to find the GCF.
Example: Find the GCF of 48, 60, and 72
- Prime factors of 48 = 24 × 31
- Prime factors of 60 = 22 × 31 × 51
- Prime factors of 72 = 23 × 32
- Common prime factors are 2 and 3.
- The lowest power of 2 is 22. The lowest power of 3 is 31.
- GCF = 22 × 31 = 4 × 3 = 12.
2. The Euclidean Algorithm
This is a very efficient method for finding the GCF of two numbers. It is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. To find the GCF of (a, b), you replace (a, b) with (b, a mod b) repeatedly until the second number is 0. The GCF is the last non-zero remainder.
To find the GCF of a list of numbers, you can apply the algorithm iteratively: GCF(a, b, c) = GCF(GCF(a, b), c).
Practical Uses of the GCF
- Simplifying Fractions: The most common application of GCF is simplifying fractions to their lowest terms. By dividing both the numerator and the denominator by their GCF, you get an equivalent, simplified fraction. For example, to simplify 18/24, you divide both by GCF(18, 24) = 6 to get 3/4. This is also useful for simplifying ratios, which you can do with our Ratio Calculator.
- Organizing Groups: GCF is useful for solving problems where you need to split different items into the largest possible number of identical groups. For example, if you have 48 cookies and 60 brownies, the GCF(48, 60) = 12 tells you that you can create a maximum of 12 identical treat bags.
GCF vs. LCM
While the GCF is the largest number that divides into a set of numbers, the Least Common Multiple (LCM) is the smallest number that is a multiple of a set of numbers. They are related by the formula: GCF(a, b) × LCM(a, b) = |a × b|.
Related Math Tools
Check out our other calculators for more mathematical problem-solving:
- Math Calculators - The central hub for all our math tools.
- Least Common Multiple (LCM) Calculator - The counterpart to the GCF calculator.
- Root Calculator - For finding square roots, cube roots, and more.