How to Calculate Greatest Common Factor (GCF)

Learn how to find the Greatest Common Factor (GCF) of two or more numbers using listing factors, prime factorization, and the Euclidean algorithm. Includes step-by-step examples and real-world uses.

What Is the Greatest Common Factor?

The Greatest Common Factor (GCF), also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is the largest positive integer that divides two or more numbers without leaving a remainder. For 12 and 18, the GCF is 6 because 6 is the largest number that divides both evenly.

Method 1: Listing All Factors

List all factors of each number, then identify the largest factor they share. Factors of 24: {1, 2, 3, 4, 6, 8, 12, 24}. Factors of 36: {1, 2, 3, 4, 6, 9, 12, 18, 36}. Common factors are {1, 2, 3, 4, 6, 12}, so GCF(24, 36) = 12. This method is practical for smaller numbers.

Method 2: Prime Factorization

Write each number as a product of prime factors, then multiply the common prime factors using the lowest exponent. For 48 = 2⁴ × 3 and 60 = 2² × 3 × 5, the common primes are 2² and 3, so GCF = 2² × 3 = 12. This method scales well to larger numbers.

Method 3: The Euclidean Algorithm

The Euclidean algorithm is the most efficient method, especially for large numbers. Divide the larger number by the smaller and take the remainder. Replace the larger number with the smaller and the smaller with the remainder. Repeat until the remainder is 0; the last non-zero remainder is the GCF. For GCF(252, 105): 252 = 2×105 + 42, then 105 = 2×42 + 21, then 42 = 2×21 + 0, so GCF = 21.

GCF of More Than Two Numbers

To find the GCF of three or more numbers, find the GCF of the first two numbers, then find the GCF of that result with the third number, and so on. For GCF(12, 18, 24): GCF(12, 18) = 6, then GCF(6, 24) = 6. So GCF(12, 18, 24) = 6.

Practical Uses of GCF

The GCF is used to simplify fractions by dividing both numerator and denominator by the GCF. It also helps solve word problems about dividing things into equal groups, such as: "What is the largest equal group size when you have 48 apples and 60 oranges?" The answer is GCF(48, 60) = 12 groups.

Relationship Between GCF and LCM

For any two positive integers a and b, the relationship GCF(a, b) × LCM(a, b) = a × b always holds. This allows you to find the LCM once you know the GCF, or vice versa. For a = 12 and b = 18: GCF = 6, so LCM = (12 × 18) / 6 = 216 / 6 = 36.

Try These Calculators

Put what you learned into practice with these free calculators.