GCF calculator (greatest common factor)
The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor, is the largest whole number that divides every number in your list with no remainder. Enter 2 to 10 whole numbers to get the GCF with prime factorization steps. For example, the GCF of 12 and 18 is 6.
GCF(12, 18) = 6
Step by step
- Break each number into prime factors
- Find the primes they all share, with the lowest power
: lowest power ; : lowest power .
- Multiply them
How the GCF calculator works
The calculator breaks each number into primes, keeps only the primes that every number shares, at the lowest power that appears, and multiplies them.
For two numbers it can also use the Euclidean algorithm, which is faster for big numbers: divide the larger by the smaller, then keep dividing the previous divisor by the remainder until the remainder is 0. The last non-zero remainder is the GCF.
- , so GCF .
Where you use the GCF
- Simplifying fractions: divide top and bottom by the GCF. . The fraction calculator does this automatically.
- Factoring expressions: .
- Splitting things into equal groups: 12 red and 18 blue beads make at most 6 identical bags.
Common mistakes
- Taking the highest power of a prime (that’s the LCM rule).
- Forgetting that the GCF of two primes, like 7 and 11, is 1.
Worked example: three numbers
GCF of , and :
- , ,
- Primes all three share, at the lowest power: and
Another way: list the factors
For small numbers, list every factor and pick the biggest one they share. Factors of 12: 1, 2, 3, 4, 6, 12. Factors of 18: 1, 2, 3, 6, 9, 18. The largest shared factor is 6. Listing is fine for small numbers, but prime factors or the Euclidean algorithm are much faster for large ones.
Quick facts
- The GCF is never bigger than the smallest number.
- If one number divides the other, the GCF is the smaller one: GCF(5, 20) = 5.
- GCF × LCM = the product of the two numbers: .
Frequently asked questions
What is the GCF of 12 and 18?
. Both share one 2 and one 3, and .
Is GCF the same as GCD?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same thing.
How do I use the GCF to simplify a fraction?
Divide the numerator and the denominator by their GCF. For , the GCF is 6, so it simplifies to .
What does a GCF of 1 mean?
The numbers share no common factor other than 1. They are called relatively prime or coprime, and a fraction made of them is already in lowest terms.