Greatest Common Factor Calculator
This Greatest Common Factor Calculator finds the biggest whole number that divides every number in a list exactly, and shows the working at every step. For smaller numbers it lists the factors of each one, marks the factors they share, and picks the greatest. For bigger numbers it breaks each one into prime factors instead and multiplies the primes they have in common. Following the same pattern every time is what makes the greatest common factor easy to find, check, and repeat on your own.
Step-by-step method
- Set up the problem.
- List the factors of each number.
- Find the factors that appear in every list.
- Pick the greatest of those common factors.
Required knowledge
- How to write a number as a product of prime factors, covered in the Prime Factorization Calculator.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- List the factors of each number.
- Find the factors that appear in every list.
- Pick the greatest of those common factors.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the greatest common factor of \(12\) and \(18\).
Step 2
Step 2 - List the factors of each number.
In this problem: The factors of \(12\) are \(1\), \(2\), \(3\), \(4\), \(6\) and \(12\). The factors of \(18\) are \(1\), \(2\), \(3\), \(6\), \(9\) and \(18\).
Step 3
Step 3 - Find the factors that appear in every list.
In this problem: Comparing the lists, \(1\), \(2\), \(3\) and \(6\) are in every list.
Step 4
Step 4 - Pick the greatest of those common factors.
In this problem: The greatest of \(1\), \(2\), \(3\) and \(6\) is \(6\), so \(\text{GCF}(12, 18) = 6\).
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- List the factors of each number.
- Find the factors that appear in every list.
- Pick the greatest of those common factors.
Step 1
Step 1 - Set up the problem.
In this problem: We are finding the greatest common factor of \(84\) and \(126\).
Step 2
Step 2 - Write each number as a product of prime factors, covered in the Prime Factorization Calculator.
In this problem: Each of \(84\) and \(126\) is broken down into primes one at a time.
Step 2a
Step 2a - Write the first number as a product of prime factors.
In this problem: Breaking \(84\) down gives \(84 = 2 \times 2 \times 3 \times 7\), worked through below.
Problem
Approach
Step-by-step method
- Set up the problem.
- Divide by the smallest prime number that goes in exactly, then repeat with the answer until you reach 1.
- Write the number as a product of the primes you divided by.
Step 1
Step 1 - Set up the problem.
In this problem: We are writing \(84\) as a product of prime factors.
Step 2
Step 2 - Divide by the smallest prime number that goes in exactly, then repeat with the answer until you reach 1.
In this problem: Dividing by the smallest prime each time gives \(84 \div 2 = 42\), \(42 \div 2 = 21\), \(21 \div 3 = 7\) and \(7 \div 7 = 1\).
Step 3
Step 3 - Write the number as a product of the primes you divided by.
In this problem: The primes divided by were \(2\), \(2\), \(3\) and \(7\), so \(84 = 2 \times 2 \times 3 \times 7\).
Final Answer
Step 2b
Step 2b - Write the second number as a product of prime factors.
In this problem: Breaking \(126\) down gives \(126 = 2 \times 3 \times 3 \times 7\), worked through below.
Problem
Approach
Step-by-step method
- Set up the problem.
- Divide by the smallest prime number that goes in exactly, then repeat with the answer until you reach 1.
- Write the number as a product of the primes you divided by.
Step 1
Step 1 - Set up the problem.
In this problem: We are writing \(126\) as a product of prime factors.
Step 2
Step 2 - Divide by the smallest prime number that goes in exactly, then repeat with the answer until you reach 1.
In this problem: Dividing by the smallest prime each time gives \(126 \div 2 = 63\), \(63 \div 3 = 21\), \(21 \div 3 = 7\) and \(7 \div 7 = 1\).
Step 3
Step 3 - Write the number as a product of the primes you divided by.
In this problem: The primes divided by were \(2\), \(3\), \(3\) and \(7\), so \(126 = 2 \times 3 \times 3 \times 7\).
Final Answer
Step 3
Step 3 - Find the prime factors that every number shares.
In this problem: Every number has \(2\) once, \(3\) once and \(7\) once, so those are the shared prime factors.
Step 4
Step 4 - Multiply the shared prime factors together.
In this problem: Multiplying the shared prime factors gives \(2 \times 3 \times 7 = 42\), so \(\text{GCF}(84, 126) = 42\).
Final Answer
Sign up or login to get the full step solution for free!
Example Problems
Click one to load it into the box and solve it.