Use this free calculator to find the greatest common factor (GCF) of two or more numbers. Type your numbers, separated by commas or spaces, and click Calculate. You get the GCF (also called the greatest common divisor, GCD, or highest common factor, HCF), the lists of factors, the prime factorization, the Euclidean algorithm steps, and the least common multiple (LCM). No signup needed.
Separate with commas, spaces or line breaks. GCF is also called GCD or HCF.
Works with whole numbers and uses exact integer arithmetic. Factor lists and prime factorizations are shown for numbers up to 1,000,000,000,000. Check your own work for homework or exams.
The greatest common factor of two or more numbers is the largest number that divides all of them exactly, with no remainder. It has several names:
They all mean the same thing. For 12 and 18, the common factors are 1, 2, 3, and 6, and the greatest is 6.
This method is fast, even for very large numbers.
Euclidean algorithm: GCF(a, b) = GCF(b, a mod b), until the remainder is 0
GCF of more than two numbers: GCF(a, b, c) = GCF(GCF(a, b), c)
Relationship with the LCM: LCM(a, b) = (a × b) ÷ GCF(a, b)
Simplifying a fraction: divide the numerator and the denominator by their GCF
Find the GCF of 12 and 18.
Find the GCF of 36 and 60.
Find the GCF of 252 and 105.
Find the GCF of 1,071 and 462.
Find the GCF of 24, 36, and 60.
Find the GCF of 17 and 28.
When the GCF is 1, the numbers are called coprime (or relatively prime). They can be different, and they do not have to be prime themselves.
For 12 and 18, the GCF is 6.
For 48 and 180, the GCF is 12 and the LCM is (48 × 180) ÷ 12 = 720.
Simplify 48/180.
Dividing by the GCF gives the fraction in lowest terms in one step.
Simplify the ratio 24 : 36.
You have 24 apples and 36 oranges. You want identical gift bags with no fruit left over. What is the largest number of bags?
A floor is 120 cm by 84 cm. What is the largest square tile that fits with no cutting?
| GCF | LCM | |
|---|---|---|
| Stands for | Greatest common factor | Least common multiple |
| What it is | The largest number that divides all the numbers | The smallest number that all the numbers divide |
| Size | Less than or equal to the smallest number | Greater than or equal to the largest number |
| Used for | Simplifying fractions, equal groups | Adding fractions, repeating events |
| Example for 12 and 18 | 6 | 36 |
The largest number that divides two or more numbers exactly, with no remainder. The GCF of 12 and 18 is 6.
Yes. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) are three names for the same thing.
List the factors of each number and pick the largest one they share, use prime factorization, or use the Euclidean algorithm. For 12 and 18, the GCF is 6.
A fast method that repeatedly replaces the larger number with the remainder after dividing by the smaller number, until the remainder is 0. The last non-zero remainder is the GCF.
Find the GCF of the first two numbers, then find the GCF of that result and the third number. For 24, 36, and 60, the GCF is 12.
1, if they are different primes. If they are the same prime, the GCF is that prime.
The number itself. GCF(0, 9) = 9.
The numbers are coprime (relatively prime). They share no factors other than 1.
Divide the top and the bottom by their GCF. For 48/180, the GCF is 12, so the fraction simplifies to 4/15.
For two numbers, LCM × GCF = the product of the numbers. For 12 and 18, 36 × 6 = 216 = 12 × 18.
No. The GCF is never larger than the smallest of the numbers (ignoring 0).
Yes. It is free, with no registration and no limits.
It uses exact integer arithmetic, so the result is exact for whole numbers.
A few of the most-used tools in each hub.
This calculator is for general informational and educational purposes only. It works with whole numbers. Check your own work when you use the results for homework, exams, or other important tasks.