GCF Calculator (Greatest Common Factor)

Find the greatest common factor — also called the greatest common divisor (GCD) or highest common factor (HCF) — of two or more numbers.

GCF is 6.

GCF of 12, 186
LCM36
Relatively prime?No

Step by step

  1. Prime factorize each number (table). The GCF uses each prime that appears in all of them, with its smallest power: 2 × 3 = 6
  2. Check with the Euclidean algorithm on 12 and 18:
    18 = 1 × 12 + 6
    12 = 2 × 6 + 0
    The last non-zero remainder is 6.
  3. Listing method: factors of 12: 1, 2, 3, 4, 6, 12; 18: 1, 2, 3, 6, 9, 18. The largest one they share is 6.
Numberpower of 2power of 3Prime factorization
122122 × 3
18122 × 32

How to find the GCF

  1. List factors: 12: 1, 2, 3, 4, 6, 12; 18: 1, 2, 3, 6, 9, 18 → GCF 6.
  2. Prime factors: keep the primes they share at the lowest power: 12 = 2² × 3, 18 = 2 × 3² → 2 × 3 = 6.
  3. Euclidean algorithm: 18 = 1 × 12 + 6, 12 = 2 × 6 + 0 → GCF 6. Fastest for big numbers.

Three numbers

GCF(24, 36, 60): 24 = 2³ × 3, 36 = 2² × 3², 60 = 2² × 3 × 5 → shared primes at their lowest powers: 2² × 3 = 12.

Where you need it

Simplifying fractions: 12/18 = (12 ÷ 6)/(18 ÷ 6) = 2/3. Splitting groups evenly: 12 boys and 18 girls make at most 6 equal teams. Factoring expressions: 12x + 18 = 6(2x + 3).

Common pairs

GCF of 12 and 18, GCF of 8 and 12, GCF of 6 and 9, GCF of 12 and 16, GCF of 16 and 20, GCF of 4 and 6, GCF of 15 and 20, GCF of 10 and 15, GCF of 9 and 12, GCF of 18 and 20

GCF table 2–20

More pairs: 24 and 36, 18 and 24, 36 and 48, 12 and 30, 24 and 30, 15 and 25, 16 and 24, 20 and 30, 30 and 45, 42 and 56, 48 and 60, 24 and 40, 36 and 60, 12 and 36, 18 and 27, 14 and 21, 28 and 42, 40 and 60, 25 and 35, 45 and 60, 32 and 48, 60 and 90, 27 and 36, 54 and 72, 30 and 42, 21 and 28, 16 and 40, 12 and 40, 18 and 30, 24 and 32, 12 and 42, 36 and 54, 48 and 72, 24 and 60, 30 and 50, 35 and 42, 40 and 48, 20 and 24, 12 and 21, 10 and 25, 6 and 21, 9 and 15, 8 and 28, 15 and 35, 18 and 45, 60 and 72, 36 and 90, 75 and 100, 50 and 75, 100 and 150

Frequently asked questions

What is the GCF?

The greatest common factor: the largest number that divides every given number evenly.

What is the GCF of 12 and 18?

6.

Are GCF, GCD and HCF the same?

Yes — greatest common factor, greatest common divisor and highest common factor all mean the same thing.

What if the GCF is 1?

The numbers are relatively prime (coprime), like 8 and 15.