Skip to content
SacaCuenta

GCF Calculator (Greatest Common Factor)

Find the greatest common factor (GCF) of two to six whole numbers, with the Euclidean algorithm worked out step by step and the prime factorization of each number.

FreeNo sign-upInstant resultsUpdated:

Calculator

Greatest common factor (GCF)

6

GCF(48, 36, 30)

Relatively prime?

No

All of them are divisible by 6

Euclidean algorithm

GCF(48, 36):

48 = 1 × 36 + 12

36 = 3 × 12 + 0

→ 12

GCF(12, 30):

30 = 2 × 12 + 6

12 = 2 × 6 + 0

→ 6

Prime factorization

48 = 2⁴ × 3

36 = 2² × 3²

30 = 2 × 3 × 5

The GCF is found in pairs: GCF(a, b, c) = GCF(GCF(a, b), c). Signs don't matter: absolute values are used.

For estimates only. Double-check the numbers before making important decisions.

What the GCF is

The greatest common factor of two or more numbers is the largest whole number that divides all of them with no remainder. It's also called the greatest common divisor (GCD) or highest common factor (HCF). If the GCF is 1, the numbers are relatively prime (coprime).

The Euclidean algorithm

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

Divide the larger number by the smaller one, then divide the divisor by the remainder, and keep going. The last nonzero remainder is the GCF. It's much faster than listing factors, especially for large numbers.

The prime factorization method

You can also multiply the prime factors the numbers have in common, each raised to its lowest power: 48 = 2⁴ × 3 and 36 = 2² × 3², so GCF = 2² × 3 = 12.

For small numbers, listing factors works too. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. The largest one they share is 6.

Common uses

  • Simplifying fractions: divide the numerator and denominator by their GCF. 36/48 → 3/4 (GCF 12).
  • Making equal groups: with 48 pencils and 36 erasers, you can make at most 12 identical kits, each with 4 pencils and 3 erasers.
  • Tiling: the largest square tile that exactly covers a 48 in × 36 in area is 12 in on each side.
  • Simplifying ratios: 48:36 reduces to 4:3.

Example

The GCF of 48, 36 and 30 is 6. The calculator works in pairs: first GCF(48, 36) = 12, then GCF(12, 30) = 6.

  1. 48 = 1 × 36 + 12
  2. 36 = 3 × 12 + 0 → GCF(48, 36) = 12
  3. 30 = 2 × 12 + 6
  4. 12 = 2 × 6 + 0 → GCF(12, 30) = 6

Common mistakes

  • Mixing up the GCF and the LCM: the GCF is never larger than the smallest number, while the LCM is never smaller than the largest.
  • Taking the common prime factors with their highest powers: that gives the LCM, not the GCF.

Frequently asked questions

Is the GCF the same as the GCD?

Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number.

What does it mean if the GCF is 1?

The numbers have no common factor other than 1, so they're relatively prime (coprime). For example, 8 and 15 have a GCF of 1, even though neither is prime.

What if one of the numbers is 0?

GCF(a, 0) = a, because every number divides 0. The GCF of only zeros is undefined.

Does it work with negative numbers?

Yes. The GCF is calculated from the absolute values, so the signs don't change the result.