GCF Calculator (Greatest Common Factor)

Enter two or more whole numbers in the Numbers field (separated by commas or spaces) and the GCF Calculator finds the Greatest Common Factor — the largest positive integer that divides evenly into all your numbers. Results include the GCF value along with a step-by-step prime factorization breakdown shown in the solution table.

Enter two or more whole numbers separated by commas or spaces.

Results

Greatest Common Factor (GCF)

--

Numbers Entered

--

Least Common Multiple (LCM)

--

Coprime Numbers?

--

Results Table

Frequently Asked Questions

What is the Greatest Common Factor (GCF)?

The Greatest Common Factor (GCF) — also known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest positive integer that divides evenly into a set of numbers with zero remainder. For example, the GCF of 8, 12, and 20 is 4 because 4 is the largest number that divides all three exactly.

How do you find the GCF using prime factorization?

Break each number down into its prime factors, then identify the prime factors that all numbers share. Multiply those common prime factors together to get the GCF. For example, GCF(16, 88, 104): 16 = 2×2×2×2, 88 = 2×2×2×11, 104 = 2×2×2×13 — the common factors are 2×2×2 = 8, so GCF = 8.

How do you find the GCF using Euclid's Algorithm?

Euclid's Algorithm works by repeatedly subtracting the smaller number from the larger (or using modulo) until both numbers are equal. For example, GCF(72, 40): 72 − 40 = 32, then 40 − 32 = 8, then 32 − 8 = 24, 24 − 8 = 16, 16 − 8 = 8, 8 − 8 = 0. So GCF(72, 40) = 8.

What is the GCF of 8 and 12?

The GCF of 8 and 12 is 4. The factors of 8 are 1, 2, 4, 8 and the factors of 12 are 1, 2, 3, 4, 6, 12. The largest factor they share is 4.

What are coprime numbers?

Two numbers are coprime (or relatively prime) when their GCF equals 1 — meaning they share no common factors other than 1. For example, 8 and 15 are coprime because GCF(8, 15) = 1. Coprime numbers don't need to be prime themselves.

What is the GCF of 30 and 54?

The GCF of 30 and 54 is 6. Prime factorization: 30 = 2×3×5 and 54 = 2×3×3×3. The common prime factors are 2 and 3, so GCF = 2×3 = 6.

What is the Greatest Common Factor of 0?

Any non-zero whole number is a factor of 0, because k × 0 = 0 for any whole number k. Therefore GCF(0, n) = n for any non-zero integer n. However, GCF(0, 0) is undefined since every positive integer divides 0.

Can I find the GCF of more than two numbers?

Yes. To find the GCF of more than two numbers, you can apply the GCF operation sequentially: GCF(a, b, c) = GCF(GCF(a, b), c). This calculator supports two or more numbers entered at once, applying this principle automatically.

More Math Tools