Greatest Common Factor (GCF) Calculator
Calculate GCF, GCD and HCF of a set of two or more numbers and see the work using factorization.
Calculation Results
What is the Greatest Common Factor?
The greatest common factor (GCF or GCD or HCF) of a set of whole numbers is the largest positive integer that divides evenly into all numbers with zero remainder.
Factorization
GCF: Greatest Common Factor
The Greatest Common Factor (GCF), also known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is one of the most useful ideas in arithmetic. It helps you simplify numbers, fractions, and even solve everyday problems involving sharing or grouping items equally.
The GCF of two or more numbers is the largest number that divides each of them exactly — without leaving a remainder.
For example:
The GCF of 12 and 18 is 6 because 6 is the biggest number that divides both 12 and 18.
If you’ve ever simplified a fraction, like turning 18/24 into 3/4, you’ve already used the concept of GCF — you just didn’t call it that!
You can also try our Fraction Simplify Calculator to see how GCF helps simplify fractions instantly.
What Is the Greatest Common Factor?
The GCF is the largest number that divides two or more numbers evenly.
In simple terms:
GCF(a, b) = largest number that divides both a and b
Let’s see an example:
Factors of 12 = 1, 2, 3, 4, 6, 12
Factors of 18 = 1, 2, 3, 6, 9, 18
Common factors = 1, 2, 3, 6
Greatest Common Factor = 6
So, GCF(12, 18) = 6
It’s that simple.
Why Is GCF Important?
You’ll use GCF in many real-life and classroom situations.
- Simplifying fractions: dividing both numerator and denominator by the same number.
- Finding equivalent ratios: to reduce them to the simplest form.
- Dividing items into equal groups: such as splitting 24 apples and 36 oranges into baskets evenly.
- Factoring algebraic expressions: when you take out common terms.
If you’re working with fractions or ratios, you might find our Fractions Calculator helpful to visualize how numbers relate.
Methods to Find the GCF
There are several ways to find the Greatest Common Factor. The best method depends on the size and complexity of the numbers you’re working with. Let’s explore the main ones.
1. Listing Factors Method
This is the simplest and most intuitive way to find the GCF.
Steps:
- List all the factors of each number.
- Identify the common factors.
- The largest one is the GCF.
Example:
Find the GCF of 16 and 20
Factors of 16 = 1, 2, 4, 8, 16
Factors of 20 = 1, 2, 4, 5, 10, 20
Common factors = 1, 2, 4
GCF = 4
This method is perfect for smaller numbers or when you’re just learning the concept.
2. Prime Factorization Method
Prime factorization means breaking down a number into its prime factors — numbers that can’t be divided further except by 1 and themselves.
Steps:
- Write each number as a product of prime factors.
- Find the prime factors common to all numbers.
- Multiply those common primes to get the GCF.
Example:
Find the GCF of 36 and 60
36 = 2 × 2 × 3 × 3
60 = 2 × 2 × 3 × 5
Common prime factors = 2 × 2 × 3
GCF = 12
This method is excellent for larger numbers because it’s systematic and accurate.
If you’d like to factor numbers quickly, use the Factoring Calculator.
3. Division Method (Euclidean Algorithm)
The Euclidean algorithm is one of the most efficient ways to find the GCF, especially for large numbers. It’s based on the idea that the GCF of two numbers also divides their difference.
Steps:
- Divide the larger number by the smaller one.
- Replace the larger number with the smaller number and the smaller number with the remainder.
- Repeat until the remainder is 0.
- The last non-zero remainder is the GCF.
Example:
Find the GCF of 48 and 18
Step 1: 48 ÷ 18 = 2 remainder 12
Step 2: 18 ÷ 12 = 1 remainder 6
Step 3: 12 ÷ 6 = 2 remainder 0
So, GCF = 6
This is the same process used by the Euclid’s Algorithm Calculator.
4. Factor Tree Method
A factor tree is a fun and visual way to find the GCF using prime factors.
Example:
Find the GCF of 45 and 60
Draw the factor trees:
45
→ 5 × 9
→ 5 × 3 × 3
60
→ 6 × 10
→ 2 × 3 × 2 × 5
Common primes = 3 × 5 = 15
GCF = 15
It’s an ideal method for visual learners and younger students.
Finding the GCF for Multiple Numbers
You can also find the GCF of three or more numbers.
Example:
Find GCF(24, 36, 60)
24 = 2 × 2 × 2 × 3
36 = 2 × 2 × 3 × 3
60 = 2 × 2 × 3 × 5
Common primes = 2 × 2 × 3
GCF = 12
You can also find it by applying the Euclidean method step by step:
GCF(24, 36, 60) = GCF(GCF(24, 36), 60)
GCF(24, 36) = 12
GCF(12, 60) = 12
So, GCF = 12
Relation Between GCF and LCM
The GCF and LCM (Least Common Multiple) are closely related.
Formula:
GCF(a, b) × LCM(a, b) = a × b
Example:
Find the GCF and LCM of 12 and 18
We know:
GCF(12, 18) = 6
LCM(12, 18) = (12 × 18) ÷ 6 = 36
Check:
6 × 36 = 216
12 × 18 = 216
Both sides match — the relationship is correct!
You can use the LCM Calculator to find LCM values quickly.
Applications of GCF in Real Life
GCF is not just a school topic — it’s incredibly practical:
- Simplifying fractions:
Example: 20/28 → divide numerator and denominator by GCF(20, 28) = 4 → 5/7 - Distributing items evenly:
Example: You have 36 pens and 60 pencils and want equal gift packs.
GCF(36, 60) = 12, so you can make 12 equal packs. - Scaling ratios:
When simplifying ratios like 15:25 → divide both by GCF(15, 25) = 5 → 3:5
If you work with numbers often, you can try tools like the Adding Fractions Calculator to practice combining or simplifying fractional problems using GCF logic.
Practice Examples
Let’s strengthen your understanding with some hands-on problems.
Example 1:
Find GCF(18, 27)
Factors of 18 = 1, 2, 3, 6, 9, 18
Factors of 27 = 1, 3, 9, 27
GCF = 9
Example 2:
Find GCF(42, 56, 70)
Prime factors:
42 = 2 × 3 × 7
56 = 2 × 2 × 2 × 7
70 = 2 × 5 × 7
Common = 2 × 7 = 14
GCF = 14
Example 3:
Find GCF(20, 50, 120) using Euclid’s Algorithm
GCF(20, 50) = 10
GCF(10, 120) = 10
GCF = 10
You can also test your answers with a Basic Calculator or check related problems in Common Factors Calculator.
GCF in Fractions and Decimals
Sometimes, GCF is used in combination with decimals or mixed numbers.
For instance, when simplifying fractions like 0.25/0.75, you can first convert them to whole numbers by multiplying by 100, giving 25/75.
GCF(25, 75) = 25 → 1/3.
You can test such conversions with the Decimal to Fraction Calculator.
GCF and Mathematical Patterns
Mathematicians use GCF to study number relationships and divisibility. For example, if GCF(a, b) = 1, the numbers are called coprime — meaning they share no common factor other than 1.
Example: 8 and 15 are coprime since GCF(8, 15) = 1.
Coprime numbers are essential in cryptography, computer algorithms, and modular arithmetic — the math behind online security and data encryption.
You can read about the math of encryption at Khan Academy .
GCF and Ancient Mathematics
The concept of GCF dates back thousands of years to the Greek mathematician Euclid, who described it around 300 BCE. His Euclidean Algorithm is still one of the fastest ways to find the GCF today.
For an interesting historical read, explore the Euclidean Algorithm section in Britannica’s mathematics history page .
Frequently Asked Questions
1. What is the easiest way to find the GCF?
The Euclidean algorithm is generally the fastest and easiest way, especially for large numbers.
2. Can the GCF be negative?
By definition, the GCF is always positive.
3. What is the difference between GCF and HCF?
They mean the same thing. “Greatest Common Factor” and “Highest Common Factor” are two names for the same concept.
4. What is the GCF of 0 and another number?
The GCF of 0 and a number n is n itself, because any number divides 0.
5. How do I find the GCF of fractions?
Convert fractions to their simplest form by dividing numerator and denominator by their GCF.
The Greatest Common Factor (GCF) is one of the most foundational tools in mathematics. Whether you’re simplifying fractions, dividing quantities evenly, or exploring number patterns, understanding GCF helps you see the elegant structure behind numbers.
To explore more, try calculators like the GCF Calculator, LCM Calculator, or the Euclid’s Algorithm Calculator.
Mastering GCF not only simplifies arithmetic — it builds the foundation for understanding algebra, ratios, and the deep relationships between numbers that shape all of mathematics.
