The greatest common factor (GCF) is the largest whole number that divides two or more numbers with no remainder. There are three classic ways to find it — listing factors, prime factorization, and the Euclidean algorithm — and this guide shows all three with worked examples.
Try any of them instantly in the GCD / GCF Calculator, which shows every step.
GCF, GCD and HCF are the same
Greatest common factor, greatest common divisor and highest common factor are three names for one idea: the biggest number dividing all your inputs evenly.
Method 1: List the factors
Write every factor of each number and pick the largest they share. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. The largest shared factor is 12. Great for small numbers; use the Factors Calculator to list them, or the standalone GCF calculator at gcfcalculator.xyz to compare the shared factors of two or more numbers side by side.
Method 2: Prime factorization
Factor each number into primes and multiply the lowest power of each shared prime. 24 = 2³ × 3 and 36 = 2² × 3²; the shared primes give 2² × 3 = 12. See prime factorization for the breakdown.
Method 3: Euclidean algorithm
Replace the larger number with its remainder when divided by the smaller, and repeat until the remainder is 0. gcd(36, 24) → gcd(24, 12) → gcd(12, 0) = 12. This is the fastest method for big numbers — see the Euclidean algorithm guide.
Which method to choose
- Small numbers: list factors.
- Want primes/LCM too: prime factorization.
- Large numbers: the Euclidean algorithm.
Remember the link GCF × LCM = a × b, so you can get the LCM for free.
- GCF = largest number dividing all inputs evenly.
- Three methods: listing, prime factorization, Euclid.
- Euclid is fastest for large numbers.
- GCF × LCM = product of the numbers.
GCD / GCF Calculator
Find the greatest common factor of two or more numbers with full step-by-step working.
Open the GCD / GCF CalculatorFrequently asked questions
What is the greatest common factor?
The largest whole number that divides two or more numbers with no remainder. It is also called the GCD or HCF.
What is the fastest way to find the GCF of large numbers?
The Euclidean algorithm — repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is 0.
How are the GCF and LCM related?
GCF times LCM equals the product of the two numbers, so knowing one gives the other.
Math educators and engineers building free, accurate calculators with step-by-step solutions, visual diagrams and AI insights.
Related articles
How to Find the GCD Using the Euclidean Algorithm
Find the greatest common divisor in just a few steps.
Find the GCF Using Prime Factorization
Take the lowest power of each shared prime — and get the LCM too.
LCM vs GCF: What Is the Difference?
When to use the least common multiple versus the greatest common factor.