The greatest common factor (GCF) of a set of numbers is the largest number that divides all of them exactly. You need it to reduce fractions to lowest terms, simplify ratios, factor algebraic expressions and split things into the largest possible equal groups. This calculator finds the GCF of two to twenty numbers and shows the work using whichever of the three standard methods you choose.
How to use the GCF calculator
- Type two or more whole numbers separated by commas or spaces, such as
36, 60, 84. - Choose the method to display: prime factorization, the Euclidean algorithm or listing factors. The answer is the same; only the steps differ.
- The tape shows the GCF, the least common multiple and each number divided by the GCF (the “reduced” set).
Three ways to find the GCF
1. Listing factors
Write every factor of each number and pick the largest one they share. Good for small numbers:
36: 1, 2, 3, 4, 6, 9, 12, 18, 36
60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
84: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84
Common factors: 1, 2, 3, 4, 6, 12 → GCF = 12
2. Prime factorization
36 = 2² × 3², 60 = 2² × 3 × 5, 84 = 2² × 3 × 7. Every number contains 2² and 3¹, and nothing else is shared, so GCF = 4 × 3 = 12.
3. The Euclidean algorithm
Divide the larger number by the smaller, then replace the larger with the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF:
60 = 1 × 36 + 24
36 = 1 × 24 + 12
24 = 2 × 12 + 0 → GCF(36, 60) = 12
This is by far the fastest method for big numbers and needs no factoring at all. The Euclid’s algorithm calculator shows the full table and the extended version.
Which method should you use?
| Method | Best for | Drawback |
|---|---|---|
| Listing factors | Small numbers, first lessons | Slow and error-prone above about 100 |
| Prime factorization | Seeing why the answer works; finding the LCM at the same time | Factoring large numbers is hard |
| Euclidean algorithm | Large numbers, mental shortcuts | Less visual |
Using the GCF
- Simplifying fractions: divide the top and bottom by their GCF. 36/84 ÷ 12/12 = 3/7. The simplify fractions calculator does this in one step.
- Simplifying ratios: 36 : 60 : 84 becomes 3 : 5 : 7 — see the ratio simplifier.
- Equal groups: with 36 apples, 60 oranges and 84 pears, the most identical fruit baskets you can make with nothing left over is 12, each holding 3 apples, 5 oranges and 7 pears.
- Factoring expressions: 12x² + 18x = 6x(2x + 3), because the GCF of 12 and 18 is 6.
Special cases
- GCF with 1: always 1.
- GCF with 0: every number divides 0, so GCF(a, 0) = a. GCF(0, 0) is not defined.
- Negative numbers: the GCF is taken as positive; signs don’t affect divisibility.
- One number divides another: the GCF is the smaller number — GCF(12, 84) = 12.
To list every shared factor rather than just the greatest, use the common factors calculator. For the smallest shared multiple, see the LCM calculator.
Frequently asked questions
What is the greatest common factor?
The largest whole number that divides every number in a set with no remainder. The GCF of 36, 60 and 84 is 12. It is also called the greatest common divisor (GCD) or highest common factor (HCF).
How do I find the GCF using prime factorization?
Factor each number into primes, keep only the primes that appear in every factorization, and give each one its smallest exponent. For 36 = 2² × 3², 60 = 2² × 3 × 5 and 84 = 2² × 3 × 7, the shared part is 2² × 3 = 12.
How do I find the GCF of three or more numbers?
Find the GCF of the first two, then the GCF of that result and the third number, and so on. GCF(36, 60) = 12 and GCF(12, 84) = 12, so GCF(36, 60, 84) = 12.
What does it mean if the GCF is 1?
The numbers are relatively prime (coprime): they share no factor other than 1. They don't have to be prime themselves — 8 and 15 are coprime even though neither is prime.
How are the GCF and LCM related?
For two numbers, GCF × LCM equals the product of the numbers. For 12 and 18, the GCF is 6 and the LCM is 36, and 6 × 36 = 12 × 18 = 216.