EasyUnitConverter.com

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.

Related Calculators: