GCF Calculator — Greatest Common Factor
Calculate the greatest common factor (GCF), also known as greatest common divisor (GCD), of two or more numbers. Also shows the prime factorization of each number. See also LCM Calculator and Fraction Calculator.
Enter at least 2 positive integers separated by commas
How to Find the GCF
The greatest common factor (GCF) of two or more numbers is the largest positive integer that divides all of them without a remainder. There are several methods: prime factorization (take the lowest power of each common prime), the Euclidean algorithm (repeated division), or listing all factors. This calculator uses the efficient Euclidean algorithm and also displays the prime factorization of each input number.
GCF Formula
Euclidean Algorithm:
GCD(a, b) = GCD(b, a mod b), until b = 0
GCD(a, 0) = a
Using prime factorization:
GCF = product of lowest powers of common primes
Relationship with LCM:
GCF(a, b) × LCM(a, b) = a × b
Example
GCF(24, 36) = ?
24 = 2³ × 3
36 = 2² × 3²
Common primes: 2 (min power 2) and 3 (min power 1)
GCF = 2² × 3 = 4 × 3
= 12
Frequently Asked Questions
What is the difference between GCF and GCD?
They are the same thing. GCF (Greatest Common Factor) and GCD (Greatest Common Divisor) are two names for the same concept. Some textbooks also use HCF (Highest Common Factor).
When do you use GCF?
GCF is used to simplify fractions (divide numerator and denominator by their GCF), factor polynomials, solve problems involving equal distribution, and in the Euclidean algorithm. For example, to simplify 24/36, divide both by GCF(24,36) = 12 to get 2/3.
What is the GCF of two prime numbers?
If two numbers are both prime and different, their GCF is always 1 (they are coprime). If they are the same prime, the GCF equals that prime number.
How is GCF related to LCM?
For any two positive integers a and b: GCF(a,b) × LCM(a,b) = a × b. This means if you know the GCF, you can find the LCM and vice versa.
What does it mean if GCF = 1?
If the GCF of two numbers is 1, they are called coprime (or relatively prime). They share no common factors other than 1. For example, 8 and 15 are coprime because GCF(8,15) = 1.
Solved Examples — GCF
Example: Find the GCF of 84 and 126
Solution:
Step 1: Prime factorization: 84 = 2² × 3 × 7, 126 = 2 × 3² × 7
Step 2: Take the minimum power of each common prime
Step 3: Common primes: 2¹, 3¹, 7¹
Step 4: GCF = 2 × 3 × 7 = 42
Answer: GCF(84, 126) = 42
Example: Simplify the fraction 168/224 using GCF
Solution:
Step 1: Find GCF(168, 224) using Euclidean algorithm:
Step 2: 224 ÷ 168 = 1 remainder 56
Step 3: 168 ÷ 56 = 3 remainder 0
Step 4: GCF = 56
Step 5: 168/56 = 3, 224/56 = 4
Answer: 168/224 = 3/4
Example: You have 48 red marbles and 64 blue marbles. What is the maximum number of identical groups you can make using all marbles?
Solution:
Step 1: Find GCF(48, 64)
Step 2: 48 = 2⁴ × 3, 64 = 2⁶
Step 3: GCF = 2⁴ = 16
Step 4: Each group has 48/16 = 3 red, 64/16 = 4 blue
Answer: 16 groups (each with 3 red and 4 blue)
Practice Questions
Try these on your own:
- Find GCF(36, 48) (Answer: 12)
- Find GCF(72, 108, 144) (Answer: 36)
- Simplify 56/98 using GCF (Answer: 4/7)
- Are 35 and 64 coprime? (Answer: Yes, GCF = 1)
- A garden is 18m × 24m. What is the largest square tile that fits evenly? (Answer: 6m × 6m)
- Find GCF(91, 65) using the Euclidean algorithm (Answer: 13)
Common Mistakes to Avoid
The most common mistake is confusing GCF with LCM. GCF finds the LARGEST factor common to all numbers (always ≤ smallest input), while LCM finds the SMALLEST multiple common to all (always ≥ largest input). When using prime factorization for GCF, take the MINIMUM power of each common prime — not the maximum (that gives LCM). Another error is stopping too early when finding common factors: 12 is a common factor of 48 and 36, but GCF(48, 36) = 12, not 6 (check that no larger factor exists). The Euclidean algorithm (repeated division) is more reliable and efficient than listing factors, especially for large numbers. Also remember: GCF of any number with itself is that number, and GCF of any number with 0 is that number.
Key Takeaways
- GCF (GCD/HCF) is the largest positive integer that divides all given numbers evenly.
- Prime factorization method: take the lowest power of each COMMON prime factor.
- Euclidean algorithm: repeatedly divide and take remainders until remainder = 0. The last non-zero remainder is the GCF.
- Main use: simplifying fractions — divide numerator and denominator by their GCF.
- If GCF(a, b) = 1, the numbers are coprime (relatively prime) and cannot be simplified further.
- Relationship: GCF(a,b) × LCM(a,b) = a × b.