GCF Calculator (Greatest Common Factor)

Greatest common factor (GCD, HCF) of two or more numbers, with steps.

The GCF is the largest number that divides all the numbers evenly. GCF(24, 36) = 12: 24 = 2³ × 3 and 36 = 2² × 3², so the shared factors are 2² × 3 = 12.

Free, runs in your browser. Nothing you enter is uploaded.

How to use it

  1. Enter two or more whole numbers separated by commas.
  2. Read the GCF and the LCM.
  3. Check the prime factorization table to see the steps.

What you enter

What you get

Formula

GCF = product of shared primes at their lowest powers | Euclid: gcd(a, b) = gcd(b, a mod b)

Worked example

Input: 24, 36

Result: GCF = 12

12 is the largest number that divides both; 24/36 simplifies to 2/3.

Questions

How do you find the greatest common factor?

Write each number as a product of primes and multiply the primes they share, using the lowest power of each. Or use Euclid's algorithm: repeatedly replace the larger number by the remainder until it is zero.

Are GCF, GCD and HCF the same?

Yes. They are three names for the same number.

What is the GCF of two prime numbers?

1, unless they are the same prime. Numbers with a GCF of 1 are called coprime.

How are GCF and LCM related?

For two numbers, GCF × LCM = a × b. GCF(24, 36) × LCM(24, 36) = 12 × 72 = 864 = 24 × 36.

Limitations

References

More STEM & Mathematics

All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.