GCF Calculator (Greatest Common Factor)

This GCF calculator finds the greatest common factor, also called the greatest common divisor (GCD), of two or more whole numbers. Type the numbers separated by commas or spaces.

How the GCF is found

The calculator uses the Euclidean algorithm: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is zero. The last non-zero divisor is the GCF. For more than two numbers, it finds the GCF of the first two, then of that result and the next number, and so on.

Worked example

For 12, 18 and 30: the GCF of 12 and 18 is 6, and the GCF of 6 and 30 is 6. So the GCF is 6.

Frequently asked questions

What is the GCF used for?

Simplifying fractions is the most common use: divide the top and bottom by their GCF. 18/30 becomes 3/5 after dividing both by 6. See the fraction calculator.

What if the GCF is 1?

Then the numbers are coprime: they share no factor other than 1.

Scroll to Top