Bills, Percentages & Everyday Math · Math Foundations

How to Find the Greatest Common Factor

The greatest common factor is the largest whole number that divides every input. Use a factor list for small values and the Euclidean algorithm for larger ones.

The greatest common factor (GCF), also called the greatest common divisor (GCD), is the largest positive whole number that divides every input without a remainder. The GCF Calculator accepts two to ten positive whole numbers and shows the Euclidean steps, so you can check the arithmetic instead of trusting a single result.

Choose a method that fits the numbers

There are three useful ways to find a GCF:

  • List every factor when the numbers are small and easy to inspect.
  • Compare prime factorizations when you want to see exactly which factors are shared.
  • Use the Euclidean algorithm when the numbers are large or have many factors.

All three methods answer the same question. The choice changes the amount of work, not the result. GCF is a property of whole-number inputs; convert measurements to one unit before applying it.

Use a factor list for small numbers

For 24 and 36, list the positive factors of each number:

24: 1, 2, 3, 4, 6, 8, 12, 24
36: 1, 2, 3, 4, 6, 9, 12, 18, 36

The common factors are 1, 2, 3, 4, 6, and 12. The largest is 12, so GCF(24, 36) = 12. Listing factors is transparent, but it becomes slow when a number has many divisors. Do not stop at the first shared factor; it may not be the greatest one.

Use the Euclidean algorithm for larger numbers

The Euclidean algorithm repeatedly divides the larger number by the smaller number and keeps the remainder. The last nonzero remainder is the GCF.

For 84 and 126:

126 = 1 × 84 + 42
84  = 2 × 42 + 0
GCF = 42

The reason this works is that every divisor shared by 126 and 84 also divides their remainder, 42. Once the remainder reaches zero, the previous nonzero remainder is the largest divisor still shared by both numbers. The calculator displays this chain for each pair.

Extend the GCF to three or more numbers

Find the GCF of the first two numbers, then use that result with the next number. For 84, 126, and 210:

GCF(84, 126) = 42
GCF(42, 210) = 42

Therefore the GCF of all three inputs is 42. A number only qualifies if it divides every input; a factor shared by two numbers but not the third is not a common factor of the full set.

Check the result and use it to reduce

Divide every input by the proposed GCF. For 84, 126, and 210, the quotients are 2, 3, and 5, all whole numbers. If one quotient has a remainder, the candidate is not a common factor.

The GCF is also the reduction factor for a fraction or ratio. Divide both terms of 84/126 by 42 to get 2/3. Use the Fraction Calculator for fraction operations and the Ratio Calculator when the inputs represent a comparison. Reduction does not convert mismatched units or decide what a ratio means.

FAQs

Is GCF the same as GCD?

Yes. Greatest common factor and greatest common divisor name the same largest positive whole-number divisor. HCF is another name used in some textbooks.

Can the GCF be larger than the smallest input?

No. The GCF must divide the smallest input, so it cannot be larger than that input. For 12 and 30, the result cannot exceed 12 and is 6.

Does a GCF of 1 mean both numbers are prime?

No. It means the numbers are coprime: they share no factor greater than 1. For example, 8 and 15 are both composite but have a GCF of 1.

Can I use decimals in a GCF calculation?

This calculator uses positive whole numbers. Convert a measurement or decimal ratio to a consistent whole-number representation first, and keep the conversion visible so the result is not misread as a unit conversion.