Greatest Common Factor (GCF) Calculator
GCF = greatest common divisor
How to Find the Greatest Common Factor
The greatest common factor (GCF), also called the greatest common divisor (GCD), is the largest positive integer that divides evenly into all given numbers with no remainder. For 12 and 18, the common factors are 1, 2, 3, and 6 — and the greatest is 6. The GCF is fundamental for simplifying fractions, finding common denominators, and solving problems involving equal grouping or tiling.
The most efficient algorithm for finding the GCF is the Euclidean algorithm, discovered by the ancient Greek mathematician Euclid around 300 BCE. To find GCF(48, 18): divide 48 by 18 to get remainder 12. Then divide 18 by 12 to get remainder 6. Then divide 12 by 6 to get remainder 0. When the remainder reaches 0, the last divisor is the GCF: 6. This method is fast even for very large numbers because each step reduces the problem size quickly.
An alternative approach is prime factorization. Factor each number into primes and multiply the common prime factors with their lowest exponents. For 48 = 2⁴ × 3 and 18 = 2 × 3², the common primes are 2 and 3. Take the lower exponent for each: 2¹ × 3¹ = 6. This method is intuitive for manual calculations and teaching but becomes cumbersome for large numbers compared to the Euclidean algorithm.
When finding the GCF of more than two numbers, compute pairwise: GCF(a, b, c) = GCF(GCF(a, b), c). For 24, 36, and 60: GCF(24, 36) = 12, then GCF(12, 60) = 12. The GCF of a set of numbers is the largest value that divides every member of the set evenly. If the GCF of two numbers is 1, they are called coprime (or relatively prime) — such as 8 and 15, which share no common factors other than 1.
Practical applications abound. Simplifying 12/18 to lowest terms requires dividing both by GCF(12, 18) = 6 to get 2/3. Tiling a floor that is 48 inches by 18 inches with the largest possible square tiles means finding GCF(48, 18) = 6 — use 6-inch tiles. In music theory, the GCF of two frequencies relates to their harmonic consonance. Enter two or more integers and this calculator returns their greatest common factor instantly using the Euclidean algorithm.
Examples
| Example | Result |
|---|---|
| GCF of 12 and 18 | 6 |
| GCF of 48 and 18 | 6 |
| GCF of 100 and 75 | 25 |
| GCF of 17 and 13 | 1 |
| GCF of 24 and 36 | 12 |
| GCF of 54 and 81 | 27 |
| GCF of 8 and 12 | 4 |
Frequently asked questions
6. The common factors of 12 and 18 are 1, 2, 3, and 6. The greatest is 6.
Yes. GCF (greatest common factor) and GCD (greatest common divisor) are different names for the same concept.
The numbers are coprime (relatively prime) — they share no common factors other than 1. Example: GCF(8, 15) = 1.