GCF Calculator: Greatest Common Factor with Steps
Find the greatest common factor (also called GCD or HCF) of two or more whole numbers. See the Euclidean algorithm steps and the prime factorization. The LCM is shown too. Free, runs in your browser.
How to use the GCF Calculator
- Type two or more whole numbers separated by commas or spaces, for example 48, 18.
- The GCF appears at once, with the LCM beside it.
- Read the Euclidean algorithm steps to see how the GCF was found.
- Check the prime factorization table to see the common primes.
Frequently asked questions
What is the greatest common factor (GCF)?
The GCF of two or more whole numbers is the largest whole number that divides all of them exactly. It is also called the greatest common divisor (GCD) or highest common factor (HCF). The GCF of 12 and 18 is 6.
How do I find the GCF with the Euclidean algorithm?
Divide the larger number by the smaller and keep the remainder. Then divide the smaller number by that remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF. For 48 and 18: 48 = 2 x 18 + 12, 18 = 1 x 12 + 6, 12 = 2 x 6 + 0, so the GCF is 6.
How do I find the GCF with prime factorization?
Write each number as a product of primes, then multiply the primes they share, using the smallest exponent of each. 12 = 2^2 x 3 and 18 = 2 x 3^2, so the GCF is 2 x 3 = 6.
How do I use the GCF to simplify a fraction?
Divide the numerator and the denominator by their GCF. For 18/48 the GCF is 6, so the fraction simplifies to 3/8.
What if the GCF is 1?
Numbers whose GCF is 1 are called coprime or relatively prime, such as 8 and 15. They share no prime factors.
What is the link between GCF and LCM?
For two numbers, LCM(a, b) = a x b / GCF(a, b). That is why this calculator shows the LCM next to the GCF.