Find the greatest common factor of any numbers. This free GCF calculator (also GCD or HCF) returns the largest shared factor, lists all common factors, and shows the LCM too.
Enter two or more whole numbers. The GCF (also called GCD or HCF) is the largest number that divides every value with no remainder.
The GCF helps simplify fractions (divide top and bottom by it) and split things into equal groups. It uses whole numbers; decimals are rounded.
How the GCF Calculator Works
The greatest common factor (GCF, also called GCD or HCF) is the largest whole number that divides every number you enter with no remainder. This calculator finds it using the Euclidean algorithm, then uses that result to derive the least common multiple (LCM) and the full list of common factors.
Formula: For two numbers a and b, repeatedly replace (a, b) with (b, a mod b) until b = 0 — the remaining value of a is the GCF. For three or more numbers, the calculator applies this pairwise: GCF(n1, n2, n3, …) = GCF(GCF(n1, n2), n3), and so on. The LCM of two numbers is then LCM(a, b) = |a × b| ÷ GCF(a, b), which is likewise chained across every number entered. Any decimal input is rounded to the nearest whole number before these steps run.
- Numbers — two or more whole numbers, entered separated by commas, spaces, or new lines (this is the only input field)
Example Scenarios
| Numbers Entered | GCF | LCM |
|---|---|---|
| 24, 36 | 12 | 72 |
| 18, 24, 30 | 6 | 360 |
| 17, 13 | 1 (coprime) | 221 |
| 8, 12, 20 | 4 | 120 |
| 100, 75 | 25 | 300 |
| 7, 21, 49 | 7 | 147 |
GCF Calculator FAQ
What’s the difference between GCF, GCD, and HCF?
Nothing mathematically — they’re three names for the same value. GCF (greatest common factor) and GCD (greatest common divisor) are used interchangeably in the US, while HCF (highest common factor) is the more common term in UK and Indian curricula. This calculator’s result is identical under any of the three names.How do I find the GCF of three or more numbers at once?
Type all the numbers into the Numbers field, separated by commas, spaces, or new lines — for example “18, 24, 30”. The calculator finds the GCF of the first two, then reduces that result against each remaining number in turn, so it works for any count of numbers, not just two.Why is the GCF useful for simplifying fractions?
Dividing both the numerator and denominator of a fraction by their GCF reduces it to lowest terms in one step. For example, 24/36 shares a GCF of 12, so dividing both by 12 gives 2/3 directly, without needing to test smaller common factors one at a time.What does it mean when two numbers are “relatively prime”?
Two or more numbers are relatively prime (or coprime) when their GCF is exactly 1 — meaning they share no common factor larger than 1, even if neither number is itself prime. The calculator flags this automatically under “Relatively prime?” whenever the computed GCF equals 1.Can the GCF calculator handle decimal numbers?
You can type decimals, but the calculator rounds each one to the nearest whole number before computing, since GCF and LCM are only defined for integers. If you need exact decimal or fractional relationships, consider scaling your numbers to whole units first.What if I only enter one number?
The calculator needs at least two numbers to compare, since GCF describes a shared factor between values. With only one number entered, there’s nothing to compare it against, so add a second number to get a result.Related Calculators
Once you have a GCF, the LCM calculator is handy for the reverse problem — finding the smallest shared multiple instead. If you’re simplifying fractions by hand, try the fraction simplifier to reduce numerator/denominator pairs directly, and the prime number checker is useful for confirming whether a relatively-prime result actually involves prime numbers.