Numbrik

GCF Calculator

Find the greatest common factor, also called the GCD or HCF, of 2 to 20 whole numbers, with each number's prime factorization.

Loading calculator…

How to use the GCF Calculator

  1. Type your numbers separated by commas or spaces.
  2. Read the GCF, the LCM of the same numbers and the prime factors.

How it works

The greatest common factor is the largest number that divides every number in the list without a remainder. With prime factorization, multiply the primes the numbers share, each at its lowest power.

The calculator uses Euclid's algorithm, which is fast even for large numbers: replace the larger number with the remainder after dividing by the smaller one, and repeat until the remainder is 0. The last non-zero number is the GCF.

Formula

GCF(a, b) = GCF(b, a mod b), until the remainder is 0

Example

48 = 2⁴ × 3, 180 = 2² × 3² × 5 and 72 = 2³ × 3². The shared primes at their lowest powers are 2² × 3 = 12. With Euclid: 180 mod 48 = 36, 48 mod 36 = 12, 36 mod 12 = 0, so GCF(180, 48) = 12.

Where the GCF is used

  • Simplifying fractions: 36/60 has a GCF of 12, so it simplifies to 3/5.
  • Equal groups: with 24 apples and 36 oranges, the largest number of identical gift bags with nothing left over is GCF(24, 36) = 12, each with 2 apples and 3 oranges.
  • Tiling: the largest square tile that fits a 120 × 84 cm area exactly has a side of GCF(120, 84) = 12 cm.
  • Factoring in algebra: 18x + 24 = 6(3x + 4), because the GCF of 18 and 24 is 6.

Frequently asked questions

What is the GCF of 12 and 18?

6. The factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18; the largest shared one is 6.

How do I simplify a fraction with the GCF?

Divide the top and bottom by their GCF. For 48/180 the GCF is 12, so it simplifies to 4/15.

What does it mean if the GCF is 1?

The numbers are coprime: they share no factor except 1, so a fraction made from them is already in lowest terms.

Is GCF the same as GCD and HCF?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same thing.

Last reviewed October 20, 2026. Spotted an error? Tell us.