Find the Greatest Common Factor (GCF) of two or more numbers instantly with step-by-step prime factorization.
Enter two or more numbers separated by commas to find their Greatest Common Factor.
A GCF calculator (Greatest Common Factor calculator) is a mathematical tool that finds the largest positive integer that divides two or more numbers without leaving a remainder. The GCF is also known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF). This concept is fundamental in number theory and is widely used in simplifying fractions, solving ratio problems, and various applications in algebra and arithmetic.
For example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 evenly. Understanding GCF helps students build a strong foundation in mathematics and is essential for standardized tests like the SAT, GRE, and GMAT. According to Khan Academy, mastering GCF is a key skill for 6th-grade mathematics and beyond.
The prime factorization method breaks each number into its prime factors, then identifies the common factors. This is the most intuitive approach taught in schools and recommended by Math is Fun.
Example: Find GCF of 48 and 36
48 = 2 × 2 × 2 × 2 × 3 = 2⁴ × 3¹
36 = 2 × 2 × 3 × 3 = 2² × 3²
Common factors: 2² × 3¹ = 4 × 3 = 12
The Euclidean Algorithm is an efficient method that uses repeated division. It was first described by the Greek mathematician Euclid around 300 BCE and remains one of the oldest algorithms still in use today, as noted by Wikipedia.
Example: Find GCF of 48 and 18
48 ÷ 18 = 2 remainder 12
18 ÷ 12 = 1 remainder 6
12 ÷ 6 = 2 remainder 0
GCF = 6
For smaller numbers, simply list all factors and find the largest one in common. This method works well for quick mental calculations and is perfect when working with numbers under 100.
Example: Find GCF of 20 and 30
Factors of 20: 1, 2, 4, 5, 10, 20
Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30
Common: 1, 2, 5, 10 → GCF = 10
The GCF and LCM (Least Common Multiple) are related but opposite concepts. The GCF finds the largest shared divisor, while the LCM finds the smallest shared multiple. There's a useful relationship between them:
For instance, GCF(12, 18) = 6 and LCM(12, 18) = 36. Verification: 6 × 36 = 216 = 12 × 18 ✓. This property is extensively covered in the Purplemath GCF guide.
The GCF of 1 and any number is always 1, since 1 is the only positive integer that divides 1.
Only if they are the same prime number. Two different prime numbers always have a GCF of 1 because prime numbers have no common factors other than 1. Such numbers are called coprime or relatively prime.
To simplify a fraction, divide both the numerator and denominator by their GCF. For example, to simplify 24/36: GCF(24,36) = 12, so 24/36 = (24÷12)/(36÷12) = 2/3.
They are all the same thing! GCF (Greatest Common Factor), GCD (Greatest Common Divisor), and HCF (Highest Common Factor) all refer to the largest number that divides two or more numbers without a remainder. Different countries and textbooks use different terms.
The greatest common factor (GCF), also called the greatest common divisor, is the largest whole number that divides evenly into two or more numbers. For 24 and 36, the GCF is 12. It is the tool that simplifies fractions, reduces ratios and solves practical division problems where things must come out in whole units.
Write out every factor of each number and pick the largest they share. It is reliable and intuitive, but it becomes impractical above about two digits.
Break each number into its prime factors, then multiply the primes they have in common. This also shows the structure of the numbers, which helps when working with fractions.
The fastest method, and over two thousand years old. It appears in Euclid's Elements from around 300 BC and is still the algorithm computers use today.
Method 1: Listing factors
Method 2: Prime factorisation
Method 3: Euclidean algorithm
The GCF is 12 by all three methods, but Euclid's takes two steps instead of twenty
For 48 and 60 the difference is minor. For 1,071 and 462 it is decisive: listing factors means testing hundreds of candidates, while the Euclidean algorithm reaches the answer in three divisions.
The GCF is 21, found in three steps
| Application | How GCF Is Used |
|---|---|
| Simplifying fractions | Divide numerator and denominator by their GCF |
| Reducing ratios | Divide every part by the GCF |
| Equal grouping problems | Largest identical groups from different quantities |
| Tiling and cutting | Largest square tile that fits a rectangle exactly |
| Cryptography | Underpins RSA key generation and modular arithmetic |
You have 48 pens and 60 notebooks and want to make identical gift bags with nothing left over. What is the largest number of bags?
12 bags, each with 4 pens and 5 notebooks
For any two numbers, GCF multiplied by LCM equals the product of the numbers themselves. For 48 and 60: GCF is 12, LCM is 240, and 12 times 240 equals 2,880, which is 48 times 60. Finding one gives you the other for free.
This calculator is provided for educational purposes.