Greatest Common Factor Calculator
Enter two or more positive whole numbers, separated by commas or spaces. The calculator returns their greatest common factor (GCF), also called the greatest common divisor (GCD), which is the largest number that divides all of them evenly. It keeps every digit, so long numbers come out exact.
How to use the Greatest Common Factor Calculator
- Enter your numbers in the Greatest Common Factor Calculator above.
- Press the Find GCF button to see the result.
- To try other numbers, change any value and press the button again.
The Euclidean algorithm
GCD(a, b) = GCD(b, a mod b), repeat until remainder = 0
Divide the larger number by the smaller, replace the pair with the divisor and the remainder, and repeat until the remainder is 0. The last divisor is the GCF. For more than two numbers the calculator takes the GCF of the first two, then of that result and the next number, and so on. It works on whole numbers with any number of digits, and each step is exact.
Worked example
GCD(48, 18): 48 mod 18 = 12 → GCD(18, 12); 18 mod 12 = 6 → GCD(12, 6); 12 mod 6 = 0 → GCD = 6. GCD of 24, 36, 60: GCD(24,36)=12; GCD(12,60)=12.
Frequently asked questions
What can I enter?
Two or more positive whole numbers, separated by commas or spaces. A decimal, a negative number, 0 or a word gets a message that names the entry to fix, and no result.
When do I use GCF?
Simplifying fractions (divide numerator and denominator by GCF), reducing ratios, factoring polynomials, cryptography (RSA uses related concepts), partitioning into equal groups.
What if GCD equals 1?
The numbers are "coprime" or "relatively prime" — they share no common factors other than 1. Important in number theory and cryptography.
How does this relate to LCM?
For two numbers: GCF × LCM = product of the two numbers. Knowing one tells you the other given the product.