Calculate the Greatest Common Factor (GCF), also called Greatest Common Divisor (GCD) or Highest Common Factor (HCF), of two or more numbers.
The greatest common factor (GCF) is the largest number that divides two or more numbers exactly. To find it, list the factors of each number and pick the biggest one they share, or divide their prime factorizations. For example, the GCF of 12 and 18 is 6. GCF is also called the greatest common divisor (GCD) or highest common factor (HCF). This calculator shows every step.
The greatest common factor is the largest whole number that divides two or more integers with no remainder. It is a key idea in number theory and arithmetic, used to simplify fractions, share amounts evenly and solve everyday problems. The GCF goes by three names that mean the same thing: greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF).
There are three reliable ways to find the GCF. This calculator uses them so you can see the full working.
These tables clarify how GCF relates to LCM and how the methods compare.
| Feature | GCF (Greatest Common Factor) | LCM (Least Common Multiple) |
|---|---|---|
| Meaning | Largest factor shared by the numbers | Smallest multiple shared by the numbers |
| Result size | Never larger than the smallest number | Never smaller than the largest number |
| Main use | Simplifying fractions, sharing evenly | Adding fractions, repeating events |
| Example (12 & 18) | 6 | 36 |
| Method | Best For | Notes |
|---|---|---|
| Listing factors | Small numbers | Simple but slow for large values |
| Prime factorization | Medium numbers | Shows shared structure clearly |
| Euclidean algorithm | Large numbers | Fastest; no factoring needed |
| Numbers | GCF | Shared Factors |
|---|---|---|
| 8 and 12 | 4 | 1, 2, 4 |
| 15 and 25 | 5 | 1, 5 |
| 24 and 36 | 12 | 1, 2, 3, 4, 6, 12 |
| 7 and 13 | 1 | 1 (coprime) |
find the largest factor shared by all numbersmultiply the primes common to every numberGCF(a,b) = GCF(b, a mod b) until remainder = 0GCF(a,b,c) = GCF(GCF(a,b), c)GCF(a,b) × LCM(a,b) = a × bGCF = 1
1) 4 2) 3 3) 10 4) 7 5) 6
1) 12 2) 84 = 2²×3×7, 126 = 2×3²×7 → shared 2×3×7 = 42 3) 1071 mod 462 = 147; 462 mod 147 = 21; 147 mod 21 = 0 → GCF = 21 4) Not coprime; 17 divides 34, so GCF = 17 5) GCF(45,60) = 15 → 45/60 = 3/4
The greatest common factor appears across mathematics and everyday problem-solving:
What is GCF?
GCF stands for greatest common factor. It is the largest whole number that divides two or more integers exactly, with no remainder. For example, the GCF of 12 and 18 is 6, because 6 is the biggest number that divides both. GCF is widely used to simplify fractions and share amounts evenly.
What is GCD?
GCD stands for greatest common divisor. It is exactly the same as the greatest common factor (GCF) — the largest number that divides two or more integers without a remainder. The term "divisor" is common in higher mathematics and computing, while "factor" is more common in schools.
What is HCF?
HCF stands for highest common factor. It is another name for the greatest common factor (GCF) and greatest common divisor (GCD). All three terms describe the same value: the largest number that divides the given integers exactly. HCF is the term most often used in British and Australian schools.
Are GCF, GCD and HCF the same?
Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same concept — the largest number that divides two or more integers exactly. Different regions and textbooks simply prefer different names.
How do you find the GCF?
List the factors of each number and choose the largest they share, or use prime factorization and multiply the shared primes. For larger numbers, the Euclidean algorithm is fastest. This calculator shows the prime-factorization steps so you can follow the method and check your work.
How do you find the GCF of three numbers?
Find the GCF of the first two numbers, then find the GCF of that result with the third number. For example, for 48, 36 and 60: GCF(48, 36) = 12, then GCF(12, 60) = 12. This calculator accepts several numbers separated by commas and does this automatically.
Can the GCF be 1?
Yes. When two or more numbers share no common factor other than 1, their GCF is 1 and they are called coprime or relatively prime. For example, 8 and 15 have a GCF of 1. This is common when numbers have no prime factors in common.
Can the GCF be negative?
No. The greatest common factor is conventionally reported as a positive integer. This calculator accepts positive whole numbers only. In mathematics, when negative integers are considered, their absolute values are normally used to determine the positive GCF.
What is the Euclidean algorithm?
The Euclidean algorithm is a fast method for finding the GCF. You replace the larger number with the remainder of dividing it by the smaller number, and repeat until the remainder is zero. The last non-zero remainder is the GCF. It avoids factoring, so it is very efficient for large numbers.
What is prime factorization?
Prime factorization breaks a number into the prime numbers that multiply to make it — for example, 48 = 2 × 2 × 2 × 2 × 3. To find the GCF, you multiply the prime factors that appear in every number, each taken the fewest number of times it appears.
Why is the GCF important?
The GCF simplifies fractions to their lowest terms, helps share quantities into the largest equal groups, and appears in ratios, algebra and number theory. It is a practical tool for cooking, construction, packaging and design, as well as a core classroom skill.
What is the difference between GCF and LCM?
The GCF is the largest factor shared by the numbers, while the least common multiple (LCM) is the smallest multiple they share. GCF(4, 6) = 2, but LCM(4, 6) = 12. They are linked by the rule GCF(a, b) × LCM(a, b) = a × b.
Does this GCF calculator show the steps?
Yes. It finds the greatest common factor of two or more numbers and shows the prime factorization and shared factors, so you can see how the answer is reached. That makes it useful for checking homework and learning the method, not just getting a result.