What the greatest common factor is
The greatest common factor of a set of whole numbers is the largest positive integer that divides every number in the set. It is also called the greatest common divisor. For 24 and 36, that number is 12: 12 divides both, and 13 does not divide either.
OpenStax Prealgebra treats a factor as a whole number that divides another whole number with no remainder.
Euclid’s algorithm
The page does not search downward from the smaller number. Euclid’s algorithm replaces the pair with the remainder. For 24 and 36, 36 divided by 24 leaves 12, and 24 divided by 12 leaves 0. The last nonzero remainder is 12.
For more than two numbers, the same step is repeated. The greatest common factor of 8, 12, and 20 is the greatest common factor of 8 and 12, which is 4, and then of 4 and 20, which is still 4. The order of the inputs does not change the result. Repeating a number does not change it either: the greatest common factor of 9 and 9 is 9. Two numbers with no common factor greater than 1, such as 17 and 29, have greatest common factor 1.
With exactly two numbers, the page also reduces their ratio. 24:36 divided by 12 is 2:3. That reduced ratio is not shown for three or more numbers, because a single ratio is a two-number statement.
What this page does not do
It does not find the least common multiple. That question is on the LCM calculator. It does not add fractions. That question is on the fraction calculator. A ratio of two quantities that are not these integers belongs on the ratio calculator.
Each input must be a whole number from 1 to 1,000,000,000. Zero, a negative, a decimal, a comma, and scientific notation are rejected rather than coerced.
Frequently asked questions
Is the GCF the same as the GCD?
Yes. Greatest common factor and greatest common divisor name the same positive
integer on this page.
Can the factor be larger than one of the numbers?
No. A common factor cannot be larger than the smallest positive input.
Are these numbers sent to analytics?
No. Analytics may record that this calculator ran. The numbers and the factor
stay in this browser.
Sources & review
- Prealgebra 2e, 2.5 Prime Factorization and the Least Common Multiple — OpenStax
- Prealgebra 2e, 2.4 Find Multiples and Factors — OpenStax
Last reviewed: . The formula is reproduced above so you can check the math independently.
Exact integer arithmetic for the numbers you enter. Not a prime factorization worksheet.