Home · Math · GCF Calculator

Greatest Common Factor Calculator

Find the greatest common factor (GCF)—also known as the greatest common divisor (GCD)—and the least common multiple (LCM) of two or more positive integers. Separate your numbers with commas, spaces, or new lines. Simplifying fractions or finding common factors becomes much easier when you know the GCF.

Calculate GCF & LCM

Enter at least two positive whole numbers. Supported separators: commas, spaces, tabs, or newlines.

Results

GCF (GCD)
LCM
Enter values and press Calculate.

How to find the Greatest Common Factor

The GCF of a set of numbers is the largest positive integer that divides all the numbers in the set without leaving a remainder. Here are the most common methods for finding the GCF:

  • List the factors: List all factors for each number. Find the factors that are common to all lists, and select the largest. Example: For 12 and 18, factors of 12 are {1, 2, 3, 4, 6, 12} and factors of 18 are {1, 2, 3, 6, 9, 18}. The common factors are 1, 2, 3, and 6, so GCF(12, 18) = 6.
  • Prime factorization: Write the prime factorization of each number. Identify the common prime factors and raise each to its lowest exponent in the groups, then multiply. For example, 12 = 2² × 3 and 18 = 2 × 3². The common primes are 2 and 3. The lowest exponent of 2 is 1 (from 2¹), and the lowest exponent of 3 is 1 (from 3¹). Thus, GCF = 2¹ × 3¹ = 6.
  • Euclidean algorithm: For two numbers, repeatedly divide the larger number by the smaller number and replace the larger number with the remainder, until the remainder is zero. The last non-zero divisor is the GCF.

GCF vs. LCM

While GCF finds the largest factor that divides the numbers, LCM finds the smallest multiple that is divisible by them. They are related by the formula: GCF(a, b) × LCM(a, b) = a × b. For more than two numbers, this tool calculates GCF step-by-step across the entire group. If you're looking specifically to solve fraction operations, you might also find our LCM Calculator or Fraction Calculator helpful.

Units, rounding, and limits

This tool handles positive integers only. Fractions and decimals are not supported since GCF is defined for integers. Very large numbers are calculated using high-precision BigNumber arithmetic up to 14 decimal digits.

FAQ

What is the Greatest Common Factor (GCF)?

The GCF (greatest common factor) is the largest integer that divides all numbers in a given set without a remainder. It is also commonly called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF).

Can the GCF be larger than the numbers?

No. By definition, a factor of a number must be less than or equal to the number itself. Thus, the GCF of a set of numbers is always less than or equal to the smallest number in the set.

What happens if the GCF is 1?

If the GCF of two or more numbers is 1, the numbers are said to be **coprime** or **relatively prime**. For example, 8 and 15 have no common factors other than 1, so they are coprime.

Disclaimer. RapidRatio is informational only. It is not financial, tax, business, or professional advice. Verify results and assumptions with qualified professionals before making decisions.