GCF Calculator
Find the greatest common factor (GCF) of two or more whole numbers. Type the numbers, press Calculate, and the answer shows the work three ways: listing factors, a factor tree and the Euclidean algorithm.
GCF Calculator: Greatest Common Factor
What is the greatest common factor?
The greatest common factor (GCF) of two or more whole numbers is the largest number that divides evenly into all of them. The GCF of 84 and 60 is 12: both divide by 12 with nothing left over, and no larger number does that. It's also called the greatest common divisor (GCD) or highest common factor (HCF).
How to find the GCF: three methods
1. List the factors
Write out every factor of each number and pick the largest one they share.
18: 1, 2, 3, 6, 9, 18 24: 1, 2, 3, 4, 6, 8, 12, 24 Common: 1, 2, 3, 6 → GCF = 6This is quick for small numbers, but slow once numbers have many factors.
2. Prime factorization (factor tree)
Break each number into primes, then multiply the primes they have in common, counting each one as many times as it appears in both.
84 = 2 × 2 × 3 × 7 60 = 2 × 2 × 3 × 5 Shared: 2 × 2 × 3 = 123. The Euclidean algorithm
Divide the larger number by the smaller and keep the remainder. Then divide the previous divisor by that remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF. It needs no factoring, so it's the fastest method for big numbers.
1071 = 2 × 462 + 147 462 = 3 × 147 + 21 147 = 7 × 21 + 0 → GCF = 21Which method should you use?
| Method | Best for | Example |
|---|---|---|
| Listing factors | Small numbers (under about 50) | GCF(18, 24) = 6 |
| Prime factorization | Homework that asks for a factor tree; three or more numbers | GCF(84, 60) = 12 |
| Euclidean algorithm | Large numbers | GCF(1071, 462) = 21 |
Simplifying fractions with the GCF
To reduce a fraction to lowest terms, divide the top and bottom by their GCF. For 48/180, GCF(48, 180) = 12, so 48 ÷ 12 = 4 and 180 ÷ 12 = 15, giving 4/15. The same trick simplifies ratios: see the ratio calculator.
GCF of common number pairs
| Numbers | GCF | Numbers | GCF |
|---|---|---|---|
| 12 and 18 | 6 | 36 and 48 | 12 |
| 15 and 25 | 5 | 42 and 56 | 14 |
| 16 and 24 | 8 | 45 and 75 | 15 |
| 20 and 30 | 10 | 48 and 180 | 12 |
| 24 and 36 | 12 | 60 and 90 | 30 |
| 27 and 36 | 9 | 84 and 60 | 12 |
Need the smallest number they both divide into instead? That's the least common multiple: use the LCM calculator.
Frequently asked questions
Is GCF the same as GCD?
Yes. The greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number: the largest whole number that divides evenly into all of the numbers.
What is the GCF of two prime numbers?
Always 1, because a prime number's only factors are 1 and itself. Numbers whose GCF is 1, such as 8 and 15, are called relatively prime or coprime, even when they aren't prime themselves.
Can the GCF be one of the numbers?
Yes. If one number divides evenly into the other, the smaller number is the GCF. For example, GCF(12, 36) = 12.
How is the GCF related to the LCM?
For two numbers, GCF × LCM = the two numbers multiplied together. For 84 and 60: 12 × 420 = 5,040 = 84 × 60. So once you know one, you can find the other by dividing.
See also
- LCM Calculator: Least common multiple of two or more numbers, with steps.
- Ratio Calculator: Simplify ratios, convert to 1:n, and split a total in a ratio.
- Proportion Calculator: Solve A/B = C/D for the missing number, with steps.
- Percentage Calculator: Percent of a number, percent change, and increase or decrease by a percent.
Last updated: November 16, 2026