GCF Calculator

: Find the greatest common factor of two or more numbers or fractions, with the prime factorization, every common factor and Euclid's steps
Whole numbers or fractions
Two or more whole numbers or fractions (3/4), separated by commas or spaces. No thousands separators.
Exact for whole numbers of any size up to 60 digits; prime factorizations are shown up to 10¹⁸.
Result
GCF (greatest common factor)
12
LCM (least common multiple)
360
Numbers
24, 36, 60
Common factors (6)
1, 2, 3, 4, 6, 12
Every number that divides all of them: the factors of the GCF.
Prime factorization
NumberPrime factors
242³ × 3
362² × 3²
602² × 3 × 5
Prime powers: the GCF takes the lowest power of each prime
Prime243660GCFLCM
23222²2³
312133²
5001—5
Euclid's algorithm
Step: a = q × b + r
36 = 1 × 24 + 12
24 = 2 × 12 + 0
60 = 5 × 12 + 0

The greatest common factor (GCF) is the largest whole number that divides every number in a list without a remainder; it is also called the greatest common divisor (GCD) or highest common factor (HCF). This GCF calculator finds it for two or more numbers or fractions, and shows how: the prime factorization of each number, every common factor, and the steps of Euclid's algorithm. It gives the least common multiple (LCM) as well, and runs in your browser, so nothing you type is sent anywhere.

  1. Type two or more numbers in Numbers, separated by commas or spaces, such as 24, 36, 60. Fractions such as 2/3 work too.
  2. Read the GCF at the top, the LCM under it and the list of common factors.
  3. Check the working in the tables: each number's prime factorization, the lowest power of each shared prime, and Euclid's division steps.
  4. Use Copy all, or Download for a CSV or text file with the figures and tables.

The GCF of 24, 36 and 60 by prime factorization: keep each prime the numbers share, at its lowest power.

Input
24, 36, 60
Output
24 = 2³ × 3
36 = 2² × 3²
60 = 2² × 3 × 5

Shared primes at their lowest power: 2² × 3
GCF = 12
Common factors: 1, 2, 3, 4, 6, 12
LCM = 360

How do you find the GCF of two numbers?

List the prime factors of both and multiply the ones they share: 48 = 2⁴ × 3 and 180 = 2² × 3² × 5 share 2² × 3, so the GCF is 12. For big numbers Euclid's algorithm is faster: divide, keep the remainder, repeat until it is 0.

Is the GCF the same as the GCD and the HCF?

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

What is the GCF of 8 and 9?

1. 8 = 2³ and 9 = 3² share no prime, so their only common factor is 1 and they are called coprime, or relatively prime.

How are the GCF and LCM related?

For two numbers, GCF × LCM = the product of the numbers. For 12 and 18: 6 × 36 = 216 = 12 × 18. This does not hold for three or more numbers.

Can the GCF be bigger than the smallest number?

No. The GCF divides every number, so it is at most the smallest one (ignoring 0); it equals the smallest number when that number divides all the others, as with 6, 12 and 18.

Runs entirely in your browser. Nothing is uploaded.