GCF Calculator (Greatest Common Factor)

Find the largest number that divides every number in your list exactly.

Last updated 2026-11-26 · How we calculate this

Enter Your Numbers

Type or paste 2 to 20 whole numbers from 1 to 1,000,000, separated by commas, spaces or new lines. Write large numbers without commas (1000, not 1,000).

Greatest Common Factor

Enter at least two whole numbers to see their greatest common factor.

The calculator takes whole numbers from 1 to 1,000,000, with no zeros, decimals or negative numbers. For negative numbers, find the GCF of the numbers without their minus signs: the greatest common factor is always given as a positive number. Write large numbers without commas (1000, not 1,000).

Quick Answer

The greatest common factor (GCF) is the largest whole number that divides every number in a set with no remainder. Break each number into primes and multiply the primes they all share, using the lowest power of each. For 24, 36 and 60 the shared primes are 2² × 3, so the GCF is 12.

How to Use This Calculator

Type or paste two or more whole numbers into the box, separated by commas, spaces or new lines. The calculator finds the greatest common factor and shows how: the prime factors of each number, the primes every number shares, and the full list of factors they have in common. Up to 20 numbers can go in at once, which helps with simplifying fractions, splitting items into equal groups and factoring in algebra.

  1. Type or paste your whole numbers into the box.
  2. Read the greatest common factor.
  3. Check the prime factors of each number and the ones they share.
  4. Use the list of common factors if you need a smaller equal split.

The Formula

GCF = the primes every number shares, each at its lowest power, multiplied together

A factor of a number can only be built from that number's own primes. A number that divides all of the numbers can therefore use only primes they all contain, and no more copies of each than the number with the fewest. 24 has three 2s while 36 and 60 have two, so the GCF can have at most two 2s; all three have one 3, and only 60 has a 5, so the 5 is left out. Multiplying what is left, 2² × 3, gives the largest shared factor, and every other common factor divides into it.

Worked Example

The opening list: 24 = 2³ × 3, 36 = 2² × 3² and 60 = 2² × 3 × 5. The primes all three share are 2² and 3, so the GCF is 4 × 3 = 12. The common factors are 1, 2, 3, 4, 6 and 12.

18 and 27: 18 = 2 × 3² and 27 = 3³. They share only 3², so the GCF is 9, and the fraction 18/27 simplifies to 2/3.

Party bags: with 48 pencils and 36 erasers, the GCF of 48 and 36 is 12, so you can make 12 identical bags, each with 4 pencils and 3 erasers and nothing left over.

8 and 15: 8 = 2³ and 15 = 3 × 5 share no prime at all, so the GCF is 1. Numbers like this are called relatively prime.

Frequently Asked Questions

Are GCF, GCD and HCF the same thing?

Yes, they are three names for one idea. Greatest common factor is the usual term in US schools, greatest common divisor (GCD) is common in higher math and programming, and highest common factor (HCF) is what most UK, Australian and Indian textbooks use. Excel and Google Sheets call the function GCD.

How does the division method work?

Divide the larger number by the smaller and keep the remainder, then divide the smaller number by that remainder, and repeat until the remainder is 0. The last number you divided by is the GCF. For 48 and 36: 48 ÷ 36 leaves 12, then 36 ÷ 12 leaves 0, so the GCF is 12. This method, known as Euclid's algorithm, stays quick even for very large numbers.

What does a GCF of 1 mean?

The numbers share no factor except 1, so they are called relatively prime, or coprime. Neither number has to be prime itself: 8 and 15 are both composite but still share nothing. A fraction whose top and bottom are relatively prime, such as 8/15, is already in its simplest form.

How is the GCF used to simplify fractions?

Divide the top and bottom by their GCF in one step and the fraction lands straight in simplest form. For 36/60 the GCF is 12, giving 3/5. Dividing by a smaller shared factor, such as 6, also works but needs a second step (6/10, then 3/5). The Simplify Fractions Calculator does this for a single fraction, including mixed numbers.

How do I solve equal-groups word problems?

When a question asks for the largest number of identical groups, or the longest equal pieces something can be cut into, it is asking for the GCF. Cutting a 42-inch board and a 56-inch board into equal pieces, as long as possible with no waste, gives 14-inch pieces, because 14 is the GCF of 42 and 56. If the question asks when things next line up, it needs the least common multiple instead.

Can the GCF be bigger than the smallest number?

No. A factor of a number can never be bigger than the number itself, so the GCF is at most the smallest number in the list. It equals the smallest number exactly when that number divides all the others, as with 7, 14 and 35, where the GCF is 7.

Sources: OpenStax, Elementary Algebra 2e, 7.1 Greatest Common Factor and Factor by Grouping