How to find the greatest common factor
- Type two or more whole numbers separated by commas or spaces, for example
24, 36, 60. - The GCF appears at once, with the LCM next to it and each number's prime factorization below.
Methods
Prime factors: factor each number and multiply the primes they share, using the lowest power of each. 24 = 2³ × 3, 36 = 2² × 3², 60 = 2² × 3 × 5. The common primes are 2 (lowest power 2²) and 3 (lowest power 3¹), so GCF = 4 × 3 = 12.
Euclid's algorithm, which this calculator uses, is faster for large numbers: replace the larger number with the remainder of dividing it by the smaller, and repeat until the remainder is 0. GCF(36, 24): 36 mod 24 = 12, 24 mod 12 = 0, so the GCF is 12.
The GCF is used to simplify fractions (36/60 ÷ 12 = 3/5), to split things into the largest equal groups (24 apples and 36 oranges make 12 identical gift bags), and to find tile sizes that fit a room exactly. If the GCF is 1, the numbers are called coprime.
FAQ
What is the GCF of 12 and 18?
6.
Is GCF the same as GCD and HCF?
Yes: greatest common factor, greatest common divisor and highest common factor are the same thing.
What is the GCF of two prime numbers?
1, unless the primes are equal.