How to use the GCF calculator
Type two or more whole numbers separated by commas or spaces. You get the greatest common factor, the prime factorization of every number, the primes they all share, Euclid's algorithm written out for the first pair, and each number divided by the GCF — the reduced numbers you would use after simplifying. The LCM of the same set appears in the first row.
GCF, GCD and HCF: one idea, three names
The greatest common factor of a set of whole numbers is the largest number that divides every one of them with no remainder. US textbooks say GCF, computer science and number theory say greatest common divisor (GCD), and British and Indian schools say highest common factor (HCF). They are the same number. The factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 48; the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36; the largest number on both lists is 12.
Euclid's algorithm step by step
Listing factors gets slow fast. Euclid's method, over 2,000 years old, needs only division: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is 0. The last nonzero remainder is the GCF.
- 1071 = 2 × 462 + 147
- 462 = 3 × 147 + 21
- 147 = 7 × 21 + 0 → GCF(1071, 462) = 21
It works because any number that divides both a and b also divides a − q × b, the remainder, so each step keeps the same set of common divisors while shrinking the numbers. For three or more numbers, find the GCF of the first two, then the GCF of that result and the next number: GCF(48, 36) = 12, then GCF(12, 60) = 12.
Prime factorization method
Factor each number into primes and keep only the primes that appear in every number, each at its lowest power: 48 = 2⁴ × 3, 36 = 2² × 3², 60 = 2² × 3 × 5. All three contain 2 (lowest power 2²) and 3 (lowest power 3¹); 5 appears only in 60, so it is dropped. GCF = 2² × 3 = 12. The LCM calculator uses the same factorizations the other way around, keeping every prime at its highest power.
Simplifying fractions and ratios
Dividing the numerator and denominator by their GCF puts a fraction in lowest terms in one step: 36/48 → GCF 12 → 3/4. The same move simplifies a ratio (36 : 48 = 3 : 4) — see the ratio calculator — and the fraction calculator applies it automatically after every operation.
Worked examples
Equal kits: you have 48 pencils and 36 erasers and want identical kits with nothing left over. The largest possible number of kits is GCF(48, 36) = 12, each holding 48 ÷ 12 = 4 pencils and 36 ÷ 12 = 3 erasers.
Largest square tile: a 60 in × 36 in floor should be covered with whole square tiles and no cuts. The biggest tile is GCF(60, 36) = 12 inches, and the floor takes 5 × 3 = 15 of them.
GCF and LCM together: for two numbers, a × b = GCF × LCM. 48 × 36 = 1,728 and 12 × 144 = 1,728, which confirms both results at once. The rule is for pairs only; it fails for three numbers (48 × 36 × 60 ≠ 12 × 720).
Frequently asked questions
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 shared factor is 6. By primes: 12 = 2² × 3, 18 = 2 × 3², common part 2 × 3 = 6.
What does it mean if the GCF is 1?
The numbers are coprime (relatively prime): they share no factor other than 1. That happens for two different primes like 17 and 5, but also for composite pairs like 8 and 9. A fraction whose numerator and denominator are coprime is already in lowest terms.
Is the GCF the same as the GCD and the HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are different names for the same number, used in different countries and subjects.
Can the GCF be larger than one of the numbers?
No. The GCF can never exceed the smallest number in the set, and it equals that number exactly when the smallest number divides all the others — GCF(12, 36, 60) = 12.
How do I find the GCF of three or more numbers?
Take two numbers at a time: GCF(a, b, c) = GCF(GCF(a, b), c). Or factor each number into primes and multiply the primes that appear in every factorization at their lowest powers.
Last updated: October 9, 2026