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
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.
- Type or paste your whole numbers into the box.
- Read the greatest common factor.
- Check the prime factors of each number and the ones they share.
- 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
Sources: OpenStax, Elementary Algebra 2e, 7.1 Greatest Common Factor and Factor by Grouping