GCF Calculator (Greatest Common Factor)
Find the greatest common factor of two or more numbers. Includes step-by-step Euclidean method and a list of all common factors.
Enter numbers
Enter at least two positive integers.
Greatest Common Factor
6
Step-by-step (Euclidean)
- Start with 12.
- gcd(12, 18) = 6
- gcd(6, 24) = 6
All common factors
1, 2, 3, 6
Frequently Asked Questions about the GCF Calculator (Greatest Common Factor)
What is the greatest common factor (GCF)?
The GCF, also called the greatest common divisor (GCD), is the largest positive integer that divides each of the given numbers without remainder.
How do I find the GCF by hand?
List the factors of each number, then pick the largest one they all share. For larger numbers, the Euclidean algorithm is faster: gcd(a, b) = gcd(b, a mod b), repeated until b reaches 0.
What is the GCF of 12 and 18?
6. The factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18. The largest one they share is 6.
Can I find the GCF of more than two numbers?
Yes. The GCF of three or more numbers is the GCF of any two of them, then the GCF of that result with the next number, and so on. Enter as many numbers as you want, separated by commas or spaces.
Is the GCF the same as the LCM?
No. The GCF is the largest number that divides all inputs. The LCM (least common multiple) is the smallest number that all inputs divide into. The product of GCF and LCM of two numbers equals the product of those numbers.
What if my numbers have no common factors other than 1?
Then their GCF is 1, and they are called coprime or relatively prime. For example, 8 and 15 are coprime: their only common factor is 1.
Does this calculator handle negative numbers?
Yes. The GCF is conventionally defined as a positive integer, so this calculator takes the absolute value of every input and ignores signs.