GCF Calculator
Find the greatest common factor of two or more whole numbers. Enter numbers separated by commas, spaces, or new lines.
Results
The GCF Calculator finds the largest positive integer that divides every entered integer without a remainder. The same value is also called the greatest common divisor, or GCD, and is central to reducing fractions and factoring expressions.
Euclid’s algorithm avoids long factor lists
Small numbers can be solved by listing factors. Prime factorization selects the shared primes with their lowest exponents. The Euclidean algorithm repeatedly replaces the larger number with the remainder until that remainder becomes zero.
The greatest common factor is the largest positive integer dividing every input without a remainder.
Enter the values in their mathematical roles
Enter two or more whole numbers, separating them as the tool requests. Signs do not change the positive GCF, so the absolute values are used. Include zero only with care: gcd(a,0)=|a|, while gcd(0,0) is not conventionally defined.
The governing relationship
The greatest common factor is the largest positive integer dividing every input without a remainder.
A compact example
The factors common to 18 and 24 include 1, 2, 3 and 6, so the GCF is 6.
Valid inputs and boundary cases
This calculator is intended for integers. Decimals should not be silently rounded into whole numbers. For several entries, find the GCF of the first pair and continue with each remaining value.
Read the answer in context
For nonzero integers the GCF is positive; conventions involving zero should be interpreted carefully.
An independent check
Divide every original integer by the proposed GCF and confirm each quotient is whole. Then check that no larger shared factor exists. Prime-factor overlap provides an independent verification for modest values.
Errors that change the answer
- Confusing GCF with LCM
- Selecting common primes with the highest exponents
- Treating non-integers as exact whole values
- Ignoring a remaining number in a multi-value list
- Reporting a negative GCF
Continue with a related calculator
Continue with the Proportion Calculator or LCM Calculator. For everyday arithmetic and order-of-operations checks, use the Basic Calculator.
What this numerical result cannot decide
The GCF identifies divisibility, not the greatest factor of only one number. In algebra, coefficients and variable powers must be handled together; a numeric GCF alone does not fully factor a polynomial.
A second way to understand the method
For 252 and 105, divide 252 by 105 to get remainder 42. Then 105 divided by 42 leaves 21, and 42 divided by 21 leaves zero. The last nonzero remainder is 21, so GCF(252,105)=21.
Use the GCF to reduce fractions
For 84/126, the greatest common factor is 42. Dividing both numerator and denominator by 42 gives 2/3. Because every common factor was removed at once, the result is fully reduced. Repeated smaller cancellations are valid but take more steps and make it easier to stop too early.
Factoring a collection into equal groups
If 48 red tiles and 60 blue tiles must form the largest number of identical groups with none left over, the number of groups is GCF(48,60)=12. Each group contains four red and five blue tiles. Here the GCF answers a grouping question, while the quotients describe the contents of each group.
More than two integers
For 36, 60, and 84, first find GCF(36,60)=12, then GCF(12,84)=12. A factor must divide every entry to remain in the result. Pairwise checking only selected numbers can produce a value that fails the full list. This stepwise method works for any finite collection and avoids constructing very long factor tables.
GCF FAQ
What is the GCF of coprime numbers?
It is 1 because they share no prime factor.
Is GCF the same as GCD?
Yes. Greatest common factor and greatest common divisor name the same positive integer.
Can the GCF equal one input?
Yes, when that input divides all the others.
For additional worked mathematics, see the free OpenStax Prealgebra 2e reference.