This free GCF calculator finds the greatest common factor of two or more whole numbers and shows the full working. Type up to ten numbers separated by commas, press the button, and you get the GCF together with three worked methods: prime factorization, the Euclidean algorithm and a list of every factor with the common ones highlighted. The calculator also tells you the least common multiple and whether the numbers are relatively prime, so you can check homework, simplify fractions or solve word problems in one place. The greatest common factor is also called the greatest common divisor (GCD) or the highest common factor (HCF); all three names mean the same number.
How to use the GCF calculator
- Enter your numbers. Type two to ten positive whole numbers, such as
24, 36, 60. Commas, spaces or semicolons all work as separators. - Press "Find the GCF". You can also press Enter in the box.
- Read the answer. The large figure is the greatest common factor. Under it you will see the least common multiple, whether the numbers are coprime, and how many common factors they share.
- Study the steps. The prime factorization table, the Euclidean algorithm lines and the factor lists show exactly how the answer was reached, so you can copy the method your teacher asks for.
The calculator handles numbers up to one trillion. For very large numbers the factor list is hidden because it would be too long, but the prime factorization and the Euclidean algorithm still show every step.
What is the greatest common factor?
A factor of a number divides it exactly, with no remainder. The factors of 12 are 1, 2, 3, 4, 6 and 12. A common factor of two numbers is a number that is a factor of both. The greatest common factor is the largest of those shared factors. For 12 and 18, the factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18. The common factors are 1, 2, 3 and 6, so the GCF of 12 and 18 is 6.
Every pair of whole numbers has at least one common factor, the number 1. When 1 is the only common factor, the GCF is 1 and the numbers are called relatively prime or coprime. For example, 8 and 15 are coprime even though neither of them is a prime number.
Three ways to find the GCF
1. Listing factors
Write out all the factors of each number, circle the ones that appear in every list and pick the largest. This is the method most students learn first, and it is easy to check. It works well for small numbers but becomes slow once the numbers have many factors.
Example: GCF of 24 and 36. Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. Common factors: 1, 2, 3, 4, 6, 12. The GCF is 12.
2. Prime factorization
Break each number into its prime factors, often with a factor tree. Then multiply together the primes that every number shares, using the lowest power of each prime that appears.
36 = 2² × 3²
60 = 2² × 3 × 5
GCF = 2² × 3 = 12
The prime 5 is left out because it does not divide 24 or 36, and 2 is used only to the power 2 because that is the smallest power of 2 in the list. This method also gives you the LCM for free: multiply the highest power of every prime that appears.
3. The Euclidean algorithm
The Euclidean algorithm is the fastest method for large numbers, and it is how computers calculate the GCD. Divide the larger number by the smaller one, keep the remainder, then divide the previous divisor by that remainder. Repeat until the remainder is zero. The last non-zero remainder is the GCF.
1071 = 462 × 2 + 147
462 = 147 × 3 + 21
147 = 21 × 7 + 0
GCF = 21
It works because any number that divides both 1071 and 462 must also divide their difference, and so it divides the remainder 147. The pair of numbers keeps shrinking while the GCF stays the same, until one of them reaches zero.
How to find the GCF of three or more numbers
Find the GCF of the first two numbers, then find the GCF of that result and the third number, and continue through the list. In symbols, GCF(a, b, c) = GCF(GCF(a, b), c). For 24, 36 and 60: GCF(24, 36) = 12, then GCF(12, 60) = 12. The calculator does exactly this, and shows each Euclidean step for every pair. With prime factorization you simply include all the numbers in the table and keep only the primes that appear in every row.
GCF examples and quick reference table
| Numbers | Prime factors | GCF |
|---|---|---|
| 8 and 12 | 2³; 2² × 3 | 4 |
| 12 and 18 | 2² × 3; 2 × 3² | 6 |
| 15 and 25 | 3 × 5; 5² | 5 |
| 16 and 24 | 2⁴; 2³ × 3 | 8 |
| 18 and 27 | 2 × 3²; 3³ | 9 |
| 20 and 30 | 2² × 5; 2 × 3 × 5 | 10 |
| 24 and 36 | 2³ × 3; 2² × 3² | 12 |
| 36 and 48 | 2² × 3²; 2⁴ × 3 | 12 |
| 42 and 56 | 2 × 3 × 7; 2³ × 7 | 14 |
| 48 and 180 | 2⁴ × 3; 2² × 3² × 5 | 12 |
| 8 and 15 | 2³; 3 × 5 | 1 (coprime) |
| 12, 18 and 30 | 2²×3; 2×3²; 2×3×5 | 6 |
Why the greatest common factor matters
Simplifying fractions
To reduce a fraction to lowest terms, divide the numerator and denominator by their GCF. The GCF of 36 and 48 is 12, so 36/48 = (36 ÷ 12)/(48 ÷ 12) = 3/4. Dividing by the GCF gets you to the simplest form in one step, instead of dividing by 2 again and again. Our fraction calculator does this automatically after every operation.
Simplifying ratios
Ratios work the same way. A mix of 450 ml of concentrate to 1,200 ml of water has a GCF of 150, so the ratio simplifies to 3:8. Try the ratio calculator to scale it up or down.
Factoring algebraic expressions
In algebra you "factor out the GCF" before doing anything else. In 12x² + 18x, the GCF of the coefficients is 6 and both terms contain x, so 12x² + 18x = 6x(2x + 3).
Everyday word problems
GCF problems usually ask for the largest equal groups you can make with nothing left over. If a teacher has 48 pencils and 36 erasers and wants identical kits, the GCF of 48 and 36 is 12, so she can make 12 kits, each with 4 pencils and 3 erasers. The same idea tells a tiler the largest square tile that fits a 240 cm by 180 cm floor without cutting (60 cm), or a florist the most identical bouquets she can make from 30 roses and 45 tulips (15 bouquets).
GCF vs LCM: what is the difference?
The GCF is the largest number that divides into all of your numbers. The least common multiple (LCM) is the smallest number that all of your numbers divide into. The GCF is never bigger than the smallest number in the set, while the LCM is never smaller than the largest number. For two numbers they are linked by a neat formula:
For 12 and 18: GCF = 6, LCM = 36, and 6 × 36 = 216 = 12 × 18. A quick rule for word problems: if the question is about splitting things into the largest equal groups, use the GCF; if it is about when repeating events line up again, use the LCM.
Properties of the GCF worth knowing
- The GCF of a number and itself is the number: GCF(n, n) = n.
- The GCF of any number and 1 is 1.
- If one number divides the other, the smaller number is the GCF. GCF(7, 42) = 7.
- Two consecutive whole numbers are always coprime, so GCF(n, n + 1) = 1.
- Two different prime numbers always have a GCF of 1.
- The GCF divides the sum and difference of the numbers, which is why the Euclidean algorithm works.
- The order of the numbers never changes the answer.
Common mistakes when finding the GCF
- Confusing GCF with LCM. If your answer is larger than the smallest number, you have found a multiple, not a factor.
- Using the highest powers in prime factorization. For the GCF use the lowest power of each shared prime; highest powers give the LCM.
- Including primes that are not shared. A prime must divide every number in the set to be part of the GCF.
- Stopping too early when listing factors. Pair factors from both ends (1 and 36, 2 and 18, 3 and 12, 4 and 9, 6 and 6) so none are missed.
- Forgetting that the GCF can be 1. Coprime numbers have no larger common factor, and that is a valid answer.
Find the GCF in Excel, Google Sheets and on a calculator
Spreadsheets have a built-in function. Type =GCD(24,36,60) to get 12, or point it at a range such as =GCD(A2:A10). The matching function for the least common multiple is =LCM(). Most scientific calculators do not have a GCF key, but some graphing calculators do: on a TI-84, press MATH, go to the NUM menu and choose gcd(. Python users can call math.gcd(24, 36, 60). For a step-by-step explanation you can follow on paper, read our guide on how to find the greatest common factor.
About this calculator and your privacy
This calculator runs entirely in your web browser. The numbers you type are never sent to a server, stored or shared, and you do not need an account. Results update when you press the calculate button, and the reset button clears them. We review the formulas whenever published guidelines or tax figures change, and the page was last reviewed in November 2026. If you spot a number that looks wrong, or would like another feature added, please contact us and include your inputs so we can reproduce the issue. Remember that every calculator is a simplification of real life: treat the output as a starting point for planning and check important decisions with a qualified professional.
Frequently asked questions
What is the GCF of two numbers?
The GCF (greatest common factor) of two numbers is the largest whole number that divides both of them with no remainder. For 12 and 18 it is 6, because 6 is the largest number on both factor lists.
How do you find the GCF?
List the factors of each number and choose the largest one they share, or multiply the shared prime factors using the lowest power of each, or use the Euclidean algorithm by dividing repeatedly and keeping the last non-zero remainder.
Is GCF the same as GCD and HCF?
Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the same number.
What is the GCF of 24 and 36?
The GCF of 24 and 36 is 12. 24 = 2³ × 3 and 36 = 2² × 3², so the shared part is 2² × 3 = 12.
What does it mean if the GCF is 1?
A GCF of 1 means the numbers share no common factor other than 1. They are called relatively prime or coprime, like 8 and 15.
How do you find the GCF of three numbers?
Find the GCF of the first two numbers, then find the GCF of that answer and the third number. For 12, 18 and 30: GCF(12, 18) = 6 and GCF(6, 30) = 6.
Can the GCF be larger than the numbers?
No. The GCF is always less than or equal to the smallest number in the set. If one number divides all the others, it is the GCF.
How is the GCF used to simplify fractions?
Divide the numerator and the denominator by their GCF. For 18/24 the GCF is 6, so the fraction simplifies to 3/4 in one step.
This GCF calculator is a free educational tool. It works with positive whole numbers up to one trillion. Check homework answers against your teacher's preferred method, because some classes require the steps to be shown in a specific way.