Online Calculators and Tools | Calculators Toolbox
This GCF calculator finds the greatest common factor (HCF/GCD) of two or more numbers, with every step shown.
Our free GCF calculator finds the greatest common factor of two or more whole numbers in an instant. It shows the Euclidean algorithm step by step for two numbers, prime factorizations for longer lists, and the LCM as a bonus.
A factor is a whole number that divides another exactly, with nothing left over. The factors of 12 are 1, 2, 3, 4, 6 and 12; the factors of 18 are 1, 2, 3, 6, 9 and 18. The numbers on both lists (1, 2, 3 and 6) are the common factors, and the largest of them, 6, is the greatest common factor.
You'll see the same idea under several names. Americans usually say GCF, British and Indian textbooks use HCF (highest common factor), and mathematicians and programmers call it GCD (greatest common divisor). They all mean exactly the same thing, and this GCF calculator works for all of them.
The fastest method for two numbers is the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of dividing it by the smaller one.
For 180 and 48: 180 = 48 × 3 + 36, then 48 = 36 × 1 + 12, then 36 = 12 × 3 + 0. The last non-zero remainder, 12, is the GCF. Three short divisions instead of listing dozens of factors.
Divide the top and bottom of 84/126 by their GCF, 42, to get 2/3 in one step.
With 48 pencils and 36 erasers, the largest number of identical kits is GCF(48, 36) = 12, each with 4 pencils and 3 erasers.
The largest square tile that fits a 120 × 84 inch room exactly has sides of GCF(120, 84) = 12 inches.
A class of 24 boys and 30 girls forms 6 equal mixed teams, each with 4 boys and 5 girls.
The ratio 45 : 60 simplifies to 3 : 4 by dividing both terms by their GCF of 15.
RSA encryption relies on the Euclidean algorithm to check that key numbers are coprime.
Write every factor of each number and pick the largest one they share. It's easy to understand and fine for small numbers.
Example: 16: 1, 2, 4, 8, 16 · 24: 1, 2, 3, 4, 6, 8, 12, 24 → GCF = 8.
Break each number into primes and multiply only the primes they all share, using the lowest power of each.
Example: 60 = 2² × 3 × 5, 90 = 2 × 3² × 5 → 2 × 3 × 5 = 30.
Divide the larger number by the smaller, keep the remainder, and repeat with the smaller number and the remainder. When the remainder reaches 0, the last divisor is the GCF. It's the quickest method for big numbers.
Example: 252, 105 → 42 → 21 → 0. GCF = 21.
For two numbers, GCF = (a × b) ÷ LCM. If you already know the LCM from the LCM calculator, this is a one-line calculation.
Example: (12 × 18) ÷ 36 = 6.
| Numbers | Common factors | GCF | LCM |
|---|---|---|---|
| 8, 12 | 1, 2, 4 | 4 | 24 |
| 15, 25 | 1, 5 | 5 | 75 |
| 18, 27 | 1, 3, 9 | 9 | 54 |
| 24, 36 | 1, 2, 3, 4, 6, 12 | 12 | 72 |
| 42, 56 | 1, 2, 7, 14 | 14 | 168 |
| 35, 64 | 1 | 1 | 2,240 |
| 48, 180 | 1, 2, 3, 4, 6, 12 | 12 | 720 |
| 24, 36, 60 | 1, 2, 3, 4, 6, 12 | 12 | 360 |
A florist has 72 roses and 54 tulips and wants to make identical bouquets with nothing left over. What's the greatest number of bouquets she can make?
Enter 72, 54 into the GCF calculator to see these exact steps in the explanation box.
The method, described by the Greek mathematician Euclid around 300 BCE, rests on one simple fact: any number that divides both a and b also divides their difference, and therefore the remainder when a is divided by b. So GCF(a, b) is the same as GCF(b, remainder), and the numbers shrink with every step. It's one of the oldest algorithms still in everyday use, running inside calculators, computer algebra systems and encryption software around the world.
A quick way to decide: if the problem is about splitting things into the largest equal groups or cutting into the biggest identical pieces, you need the GCF. If it's about events happening together again or finding the smallest amount that works for everyone, you need the LCM. Splitting 48 pencils and 36 erasers into kits is a GCF problem; working out when two buses next leave at the same time is an LCM problem.
Our GCF calculator handles two numbers or a long list, shows the Euclidean algorithm or prime factorization so you can follow the logic, flags coprime numbers, and gives the LCM at the same time. It's quick, free and works on any device, so it suits fraction homework, ratio problems and anyone who needs the greatest common factor without the guesswork.
The greatest common factor is the largest whole number that divides every number in a set without a remainder. The GCF of 12 and 18 is 6.
Yes. Greatest common factor, highest common factor and greatest common divisor are three names for the same value.
Use the Euclidean algorithm. Divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF.
It means the numbers are coprime, or relatively prime. They share no common factor other than 1, like 8 and 15.
Find the GCF of the first two numbers, then find the GCF of that result and the next number, and so on. The GCF calculator accepts any number of values at once.
Divide both the numerator and the denominator by their GCF. For 30/45, the GCF is 15, so the fraction simplifies to 2/3.