Sizely
GCF Calculator

GCF Calculator

Find the greatest common factor free, for two or more numbers. Shows the GCF with worked factorization and Euclid steps. Also called the GCD or HCF.

There was an error with your calculation.

Result

GCF = 4

Greatest common factor at a glance#

The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor, is the largest whole number that divides two or more numbers with no remainder. The GCF of 12 and 18 is 6, because 6 is the biggest number that divides both 12 and 18 evenly.

How do you find the greatest common factor of two numbers?#

One reliable method is prime factorization. Break each number into its prime factors, take the primes they share, and multiply those shared primes together. For 12 and 18: 12 is 2 x 2 x 3, and 18 is 2 x 3 x 3. The shared primes are one 2 and one 3, so the GCF is 2 x 3, which is 6.

Euclid's algorithm is faster for large numbers. Divide the larger number by the smaller and keep the remainder, then repeat with the divisor and that remainder until the remainder is 0. The last nonzero remainder is the GCF. For 18 and 12: 18 divided by 12 leaves 6, then 12 divided by 6 leaves 0, so the GCF is 6.

How do you find the greatest common factor of two numbers?
NumbersGcf
8 and 124
9 and 123
12 and 186
15 and 255
16 and 248
20 and 3010
24 and 3612

Enter your numbers in the calculator above for the exact GCF with worked steps. The GCF is only defined for positive whole numbers, and if one input is 0 the GCF is the other number.

Three ways to find the GCF#

You can find the greatest common factor by listing factors, by prime factorization, or with Euclid's algorithm. Listing works for small numbers, prime factorization scales better, and Euclid's algorithm is fastest for large numbers.

Listing factors#

Write out the factors of each number and take the largest one they share. For 12 (1, 2, 3, 4, 6, 12) and 18 (1, 2, 3, 6, 9, 18), the common factors are 1, 2, 3 and 6, so the GCF is 6.

Prime factorization#

Break each number into primes, take the primes they share, and multiply. For 16, 24 and 76: 16 is 2 to the 4th, 24 is 2 cubed times 3, and 76 is 2 squared times 19. The only shared prime is 2 squared, so the GCF is 4.

Euclid's algorithm#

Divide the larger number by the smaller, keep the remainder, then repeat with the divisor and that remainder until the remainder is 0. For 124 and 98: 124 divided by 98 leaves 26, then 98 divided by 26 leaves 20, then 26 divided by 20 leaves 6, then 20 divided by 6 leaves 2, then 6 divided by 2 leaves 0, so the GCF is 2.

What the calculator accepts#

Enter whole numbers separated by commas or spaces. The GCF is defined for positive integers, and if one input is 0 the result is the other number, since every integer divides 0. The GCF can never be larger than the smallest number you enter.

Using the GCF to simplify fractions#

Divide the numerator and denominator of a fraction by their GCF to reduce it. The GCF of 18 and 24 is 6, so 18/24 divides down to 3/4. When the numerator and denominator share no factor but 1, the fraction is already in lowest terms.

Frequently asked questions#

What is the difference between GCF and GCD?#

None. Greatest common factor and greatest common divisor name the same thing, the largest whole number that divides each value with no remainder. Highest common factor is a third name for it.

How is the GCF different from the LCM?#

The GCF is the largest number that divides the inputs, while the least common multiple is the smallest number they all divide into. For 12 and 18, the GCF is 6 and the LCM is 36.

Can the GCF be one of the numbers?#

Yes, when one number divides the other. The GCF of 12 and 24 is 12, because 12 divides 24 evenly.

Does the GCF work with negative numbers?#

The GCF is reported as a positive value. If you include negatives, it is computed from their absolute values, so the GCF of -8 and 12 is 4.

What does a GCF of 1 mean?#

The numbers share no common factor other than 1, so they are coprime. For example, 8 and 9 have a GCF of 1.