Greatest Common Factor (GCF) Calculator
GCF = 0
| Number | Factors |
|---|---|
| Common Factors |
How the Greatest Common Factor Is Calculated
The greatest common factor (GCF) — also called the greatest common divisor (GCD) — of a set of numbers is the largest positive integer that divides each of them with no remainder. This calculator finds it using the Euclidean algorithm: for two numbers a and b, repeatedly replace the larger number with the remainder of dividing it by the smaller one (GCF(a, b) = GCF(b, a mod b)) until the remainder is zero — the last nonzero value is the GCF. For three or more numbers, the GCF is found pairwise: GCF(a, b, c) = GCF(GCF(a, b), c), and so on. The full list of common factors shown above is simply every divisor of that GCF, since any number dividing all the inputs must also divide their greatest common factor.
GCF vs. LCM: Two Different Questions
The GCF answers "what's the biggest number that fits evenly into all of these?" while the least common multiple (LCM) answers the opposite question: "what's the smallest number that all of these fit evenly into?" The two are linked for any two numbers by the identity GCF(a, b) × LCM(a, b) = a × b, which is exactly how the LCM is derived here. If you only need the multiple side of that relationship, the LCM calculator covers it directly. GCF is most often used to simplify fractions to lowest terms — dividing both the numerator and denominator by their GCF — a step the fraction calculator performs automatically.
A Common Misconception
The GCF of a set of numbers is never larger than the smallest number in the set, and it equals 1 whenever the numbers share no prime factors at all — this doesn't mean there's an error, it means the numbers are "coprime." Also note that listing prime factors is a different (though related) task from listing all factors: prime factorization breaks a number down into only its prime building blocks, while the "Factors" column above lists every divisor, prime or not. For breaking a single number into its prime building blocks, see the prime factorization calculator.
Frequently Asked Questions
What is the difference between GCF and GCD?
Nothing mathematically - GCF (greatest common factor) and GCD (greatest common divisor) are two names for the exact same value: the largest positive integer that divides every number in the set with no remainder.
How is the GCF of more than two numbers calculated?
The calculator applies the Euclidean algorithm to the first two numbers to get their GCF, then finds the GCF of that result with the next number, and repeats until all numbers have been included. The final value is the GCF of the whole set.