Please provide numbers separated by a comma "," and click the "Calculate" button to find the greatest common factor.
The greatest common factor calculator finds the largest whole number that divides evenly into two or more numbers, and it shows the full working — the prime factorization of each number and how those factorizations combine to produce the answer. Just enter your numbers separated by commas and click Calculate. Whether you are simplifying a fraction, solving a homework problem, or dividing things into equal groups, the GCF is the number you need, and this tool finds it instantly for any set of integers.
The greatest common factor goes by several names. You will also see it called the greatest common divisor (GCD), the highest common factor (HCF), or the greatest common denominator. They all mean the same thing: the biggest number that is a factor of every number in your set.
In mathematics, the greatest common factor of two or more non-zero integers is the largest positive integer that divides each of them without leaving a remainder. For example, 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 factors they share — the common factors — are 1, 2, 3, and 6, and the greatest of these is 6. So the GCF of 12 and 18 is 6.
The concept extends naturally to any number of integers. The GCF of a whole set is the largest number that divides every member of the set. If the only factor all the numbers share is 1, they are said to be relatively prime or coprime, and their GCF is 1.
This calculator uses the prime factorization method, which is both reliable and instructive because it shows exactly where the answer comes from. The process has three steps:
For the calculator's default set — 330, 75, 450, and 225 — the prime factorizations are 330 = 2×3×5×11, 75 = 3×5×5, 450 = 2×3×3×5×5, and 225 = 3×3×5×5. The prime 3 appears in all four (at least once), and the prime 5 appears in all four (at least once), while 2 and 11 are missing from some. So the GCF is 3 × 5 = 15.
The most basic method is to list all the factors of each number and pick the largest one they share. This works well for small numbers but becomes impractical as the numbers get large, since listing every factor of a big number is time-consuming.
For two numbers, the Euclidean algorithm is the fastest hand method. You divide the larger number by the smaller and take the remainder, then repeat with the smaller number and that remainder, continuing until the remainder is zero. The last non-zero remainder is the GCF. For example, to find the GCF of 48 and 18: 48 ÷ 18 leaves 12, then 18 ÷ 12 leaves 6, then 12 ÷ 6 leaves 0, so the GCF is 6. To find the GCF of more than two numbers, you can apply the algorithm repeatedly — find the GCF of the first two, then the GCF of that result with the next number, and so on.
All these methods give the same answer; prime factorization is used here because it makes the reasoning visible.
The greatest common factor shows up constantly, often without being named:
The greatest common factor has a close companion, the least common multiple (LCM) — the smallest number that every number in the set divides into. The two are linked by a neat formula for any pair of numbers: GCF(a, b) × LCM(a, b) = a × b. This means if you know one, you can quickly find the other. For 12 and 18, the GCF is 6, so the LCM is (12 × 18) ÷ 6 = 36. While the GCF is used to simplify fractions, the LCM is used to add and subtract fractions with different denominators by finding a common denominator.
Prime factorization is the backbone of the method used here, so it is worth understanding. A prime number is a whole number greater than 1 whose only factors are 1 and itself — 2, 3, 5, 7, 11, 13, and so on. The fundamental theorem of arithmetic states that every integer greater than 1 is either prime or can be written as a product of primes in exactly one way (ignoring order). This uniqueness is what makes prime factorization such a powerful tool: it reveals the essential building blocks of a number, and comparing those building blocks across several numbers immediately shows what they have in common.
To factor a number by hand, divide it by the smallest prime that goes in evenly, then keep dividing the result by primes until you are left with 1. For 330: 330 ÷ 2 = 165, 165 ÷ 3 = 55, 55 ÷ 5 = 11, and 11 is prime, so 330 = 2 × 3 × 5 × 11.
Suppose you want the GCF of 48 and 60 using the prime factorization method. First, factor each number: 48 = 2 × 2 × 2 × 2 × 3 (that is, 24 × 3), and 60 = 2 × 2 × 3 × 5 (that is, 22 × 3 × 5). Next, identify the primes they share and take the lowest power of each: both contain the prime 2, but 48 has four of them and 60 has only two, so you take 22; both contain a single 3, so you take 3; the prime 5 appears only in 60, so it is not common and is left out. Finally, multiply the shared factors: 2 × 2 × 3 = 12. So the GCF of 48 and 60 is 12 — the largest number that divides both evenly. You can verify it: 48 ÷ 12 = 4 and 60 ÷ 12 = 5, both whole numbers.
The greatest common factor is more practical than it might first appear. Imagine you are organizing a charity event and have 24 bottles of water and 36 snacks, and you want to make identical goodie bags with nothing left over. The GCF of 24 and 36 is 12, so you can make 12 bags, each containing 2 bottles and 3 snacks. The same logic applies to arranging students into equal teams, splitting a harvest into equal baskets, or cutting materials into the largest equal pieces without waste. Any time you need to divide two or more quantities into the largest possible equal groups, the GCF gives the answer.
In the kitchen, the GCF helps scale recipes down to their simplest ratio. In woodworking and construction, it finds the largest square tile or block that fits evenly across given dimensions. In music, it appears in simplifying time signatures and rhythmic ratios. And in mathematics classrooms everywhere, it is the essential first step in reducing fractions and factoring expressions.
A few useful properties help build intuition for how the GCF behaves:
The reason the prime factorization method always works comes back to the fundamental theorem of arithmetic: every integer has one and only one prime factorization. This means the "genetic code" of each number is unique, and the factors two numbers have in common are exactly the primes that appear in both breakdowns. There is no ambiguity and no number can be missed. While the listing method can become impractical and the Euclidean algorithm, though fast, hides the reasoning, prime factorization lays the logic bare — which is why this calculator uses it and shows each factorization step. For very large numbers, factorization by hand becomes difficult, but the principle remains exact, and the calculator handles the arithmetic for you.
It is the largest whole number that divides evenly into two or more given numbers. It is also called the greatest common divisor (GCD) or highest common factor (HCF).
Factor each number into primes, find the prime factors common to all of them (using the smallest power that appears in every number), and multiply those common factors together. The calculator above does this and shows each step.
Then their only common factor is 1, and the GCF is 1. Such numbers are called relatively prime or coprime.
The GCF is the largest number that divides into all the given numbers, while the LCM is the smallest number that all of them divide into. For two numbers, GCF × LCM equals the product of the numbers.
Divide both the numerator and the denominator by their GCF. For example, 18/24 has a GCF of 6, so dividing both by 6 gives the simplified fraction 3/4.
Yes. Enter as many numbers as you like, separated by commas. The GCF of a set is the largest number that divides every member of the set, and the calculator handles any number of inputs.
This Greatest Common Factor Calculator is provided for educational and general informational purposes. It works with positive whole numbers and shows the prime factorization method for finding the GCF.