GCF Calculator: Find Greatest Common Factor With Steps

Calculate the greatest common factor of two or more numbers. Learn GCF formulas, prime factorization, Euclidean algorithm, examples, FAQs, and uses.
Greatest Common Factor (GCF) Calculator
Free online math tool

GCF Calculator: Greatest Common Factor, Formula, Steps & Examples

Use this GCF calculator to find the greatest common factor of two or more positive whole numbers. Enter your numbers separated by commas, spaces, or line breaks, and the calculator will return the largest number that divides all of them evenly.

The greatest common factor is also called the GCD, meaning greatest common divisor, or the HCF, meaning highest common factor. These names usually mean the same thing: the biggest whole number that is a factor of every number in the set.

Find GCF Also called GCD Also called HCF Multiple numbers Prime factorization Euclidean algorithm

This calculator is designed for positive whole numbers. For example: 12, 18, 24.

GCF Calculator

Separate numbers with commas, spaces, or line breaks.
Result
GCF = 6
The greatest common factor of 12, 18, and 24 is 6.
GCF means the greatest positive number that divides every given number evenly.

What Is the Greatest Common Factor?

The greatest common factor, or GCF, is the largest positive whole number that divides two or more numbers without leaving a remainder. It is a measure of shared divisibility. If a number is a factor of every number in a set, it is called a common factor. The greatest of those common factors is the GCF.

For example, the factors of 18 are 1, 2, 3, 6, 9, and 18. The factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24. The common factors are 1, 2, 3, and 6. The largest common factor is 6, so:

\[ \mathrm{GCF}(18,24)=6 \]

This means that 6 is the greatest number that divides both 18 and 24 evenly. It also means that if you want to split 18 objects and 24 objects into the greatest possible number of identical groups, you can make 6 groups.

In different countries and textbooks, GCF may be written as GCD or HCF. GCD stands for greatest common divisor. HCF stands for highest common factor. The calculation is the same. If a problem asks for GCF, GCD, or HCF, it is normally asking for the largest shared divisor.

GCF Formula and Meaning

The GCF does not have only one formula because there are several valid methods for finding it. The core definition is:

\[ \mathrm{GCF}(a,b)=\text{the greatest positive integer that divides both }a\text{ and }b \]

If a number \(d\) divides both \(a\) and \(b\), then \(d\) is a common factor. The GCF is the largest possible value of \(d\).

\[ d\mid a \quad \text{and} \quad d\mid b \]

The symbol \(\mid\) means “divides.” So \(d\mid a\) means that \(a\) can be divided by \(d\) with no remainder.

For two numbers, the GCF is also connected to the LCM:

\[ \mathrm{GCF}(a,b)\times \mathrm{LCM}(a,b)=a\times b \]

Rearranging this gives:

\[ \mathrm{GCF}(a,b)=\frac{a\times b}{\mathrm{LCM}(a,b)} \]

This formula is useful when you already know the least common multiple. However, in most GCF problems, it is more direct to use listing factors, prime factorization, or the Euclidean algorithm.

How to Use the GCF Calculator

This GCF calculator is made for quick answers and for learning. It works with two or more positive whole numbers. The calculator applies an efficient greatest common divisor method behind the scenes, then displays a clear result.

  1. Enter your numbers. Type two or more positive whole numbers into the input box. You can separate them with commas, spaces, or line breaks.
  2. Check the input. Use whole numbers only. This calculator does not accept decimals, negative numbers, zero, or letters.
  3. Click Calculate GCF. The calculator finds the greatest common factor of all entered numbers.
  4. Read the result. The result tells you the largest number that divides all the given numbers evenly.
  5. Use the examples below to show work. For schoolwork, you may need to write the factor-list method, prime factorization method, or Euclidean algorithm steps.

Quick rule: Use GCF when you need the largest shared divisor, the biggest equal group size, the number used to simplify a fraction, or the common factor pulled out of an algebraic expression.

Method 1: Find GCF by Listing Factors

The listing method is the most visual way to understand GCF. It works best for small numbers. You list every factor of each number, identify the common factors, and choose the greatest one.

Example: Find \(\mathrm{GCF}(18,24)\).

\[ \mathrm{Factors\ of\ }18: 1,2,3,6,9,18 \]
\[ \mathrm{Factors\ of\ }24: 1,2,3,4,6,8,12,24 \]

The common factors are:

\[ 1,2,3,6 \]

The greatest common factor is:

\[ \mathrm{GCF}(18,24)=6 \]

This method is simple and easy to explain, but it can be slow for large numbers. If the numbers are large, prime factorization or the Euclidean algorithm is usually better.

Method 2: Find GCF by Prime Factorization

Prime factorization breaks each number into prime factors. A prime number has exactly two positive factors: 1 and itself. Examples include 2, 3, 5, 7, 11, and 13. Once each number is written as a product of primes, the GCF is found by taking the shared prime factors with the smallest exponents.

Example: Find the GCF of 12, 18, and 24.

\[ 12=2^2\times3 \]
\[ 18=2\times3^2 \]
\[ 24=2^3\times3 \]

The prime factors that appear in all three numbers are 2 and 3. The smallest power of 2 appearing in all three numbers is \(2^1\). The smallest power of 3 appearing in all three numbers is \(3^1\). Therefore:

\[ \mathrm{GCF}(12,18,24)=2^1\times3^1=6 \]

Prime factorization is useful because it shows exactly why the GCF is what it is. It also helps students understand the relationship between GCF and LCM. GCF uses shared prime factors with the lowest exponents, while LCM uses all prime factors with the highest exponents.

Method 3: Find GCF Using the Euclidean Algorithm

The Euclidean algorithm is a fast method for finding the GCF of two numbers. It uses repeated division and remainders. The method is based on the fact that the greatest common factor of two numbers does not change if the larger number is replaced by its remainder after division by the smaller number.

\[ \mathrm{GCF}(a,b)=\mathrm{GCF}(b,a\ \mathrm{mod}\ b) \]

Example: Find \(\mathrm{GCF}(48,180)\).

\[ 180=48\times3+36 \]
\[ 48=36\times1+12 \]
\[ 36=12\times3+0 \]

The last nonzero remainder is 12, so:

\[ \mathrm{GCF}(48,180)=12 \]

This algorithm is efficient because it avoids listing all factors. It is especially helpful when numbers are large. Many digital calculators use a version of the Euclidean algorithm because it is reliable and fast.

How to Find the GCF of More Than Two Numbers

To find the GCF of more than two numbers, calculate the GCF pair by pair. Start with the first two numbers, then use that result with the next number, and continue until all numbers have been included.

\[ \mathrm{GCF}(a,b,c)=\mathrm{GCF}(\mathrm{GCF}(a,b),c) \]

Example: Find \(\mathrm{GCF}(12,18,24)\).

\[ \mathrm{GCF}(12,18)=6 \]
\[ \mathrm{GCF}(6,24)=6 \]

Therefore:

\[ \mathrm{GCF}(12,18,24)=6 \]

This is exactly how a calculator can handle a long list of numbers. It reduces the list step by step until one final greatest common factor remains.

Worked GCF Examples

Example 1: Find the GCF of 20 and 30

First list the factors:

\[ \mathrm{Factors\ of\ }20: 1,2,4,5,10,20 \]
\[ \mathrm{Factors\ of\ }30: 1,2,3,5,6,10,15,30 \]

The common factors are 1, 2, 5, and 10. The greatest one is 10.

\[ \mathrm{GCF}(20,30)=10 \]

Example 2: Find the GCF of 36 and 60

Use prime factorization:

\[ 36=2^2\times3^2 \]
\[ 60=2^2\times3\times5 \]

The shared prime factors are \(2^2\) and \(3^1\). Therefore:

\[ \mathrm{GCF}(36,60)=2^2\times3=12 \]

Example 3: Find the GCF of 45, 75, and 105

Write the prime factorization of each number:

\[ 45=3^2\times5 \]
\[ 75=3\times5^2 \]
\[ 105=3\times5\times7 \]

The prime factors shared by all three numbers are 3 and 5. Use the smallest exponent for each shared prime:

\[ \mathrm{GCF}(45,75,105)=3\times5=15 \]

Example 4: Use GCF to simplify a fraction

Simplify:

\[ \frac{48}{180} \]

Find the GCF of 48 and 180:

\[ \mathrm{GCF}(48,180)=12 \]

Divide numerator and denominator by 12:

\[ \frac{48}{180}=\frac{48\div12}{180\div12}=\frac{4}{15} \]

The simplified fraction is \(\frac{4}{15}\).

GCF, GCD, and HCF: Are They the Same?

Yes, in most school mathematics contexts, GCF, GCD, and HCF mean the same thing. They all refer to the greatest number that divides the given numbers evenly.

Term Full Form Meaning
GCF Greatest Common Factor The greatest factor shared by all given numbers.
GCD Greatest Common Divisor The greatest divisor shared by all given numbers.
HCF Highest Common Factor The highest factor shared by all given numbers.

The word “factor” and the word “divisor” are closely connected. If 6 is a factor of 24, then 6 also divides 24 evenly. So whether a textbook says GCF, GCD, or HCF, the calculation method is usually the same.

When Should You Use GCF?

GCF is useful whenever you need the largest shared divisor. This happens in arithmetic, fractions, algebra, geometry, grouping problems, ratio problems, and real-life organization tasks.

One of the most common uses is simplifying fractions. A fraction is in simplest form when the numerator and denominator have a GCF of 1. For example, \(\frac{18}{24}\) can be simplified because the GCF of 18 and 24 is 6:

\[ \frac{18}{24}=\frac{18\div6}{24\div6}=\frac{3}{4} \]

Another use is grouping. Suppose you have 24 pencils and 36 pens and want to make identical packs with no leftovers. The GCF of 24 and 36 is 12, so you can make 12 identical packs. Each pack has:

\[ 24\div12=2\ \mathrm{pencils} \]
\[ 36\div12=3\ \mathrm{pens} \]

GCF is also used in algebraic factoring. For example:

\[ 12x+18=6(2x+3) \]

Here, 6 is the GCF of 12 and 18, so it can be factored out of both terms.

GCF vs LCM

GCF and LCM are closely related but answer opposite questions. GCF looks for the largest shared factor. LCM looks for the smallest shared multiple. GCF is about dividing numbers into equal parts. LCM is about finding a shared repeated value.

Comparison GCF LCM
Full name Greatest Common Factor Least Common Multiple
Main question What is the largest shared divisor? What is the smallest shared multiple?
Direction Looks downward at factors Looks upward at multiples
Use case Simplify, group, factor Common denominators, cycles, schedules
Example with 12 and 18 \(\mathrm{GCF}(12,18)=6\) \(\mathrm{LCM}(12,18)=36\)

For two positive integers, GCF and LCM are connected by:

\[ \mathrm{GCF}(a,b)\times \mathrm{LCM}(a,b)=a\times b \]

This relationship is useful because once you know the GCF, you can calculate the LCM, and once you know the LCM, you can calculate the GCF.

Common Mistakes with GCF

Mistake 1: Choosing the smallest common factor

The smallest common factor of positive whole numbers is usually 1. GCF asks for the greatest common factor, not the first common factor.

Mistake 2: Confusing GCF with LCM

GCF divides the numbers. LCM is a multiple of the numbers. If the answer is larger than all the numbers, it is probably an LCM, not a GCF.

Mistake 3: Missing a shared prime factor

In prime factorization, use only prime factors that appear in every number. Then take the smallest exponent of each shared prime.

Mistake 4: Thinking relatively prime numbers have no GCF

Relatively prime numbers still have a GCF. Their GCF is 1 because 1 divides every positive integer.

GCF Reference Table

Use this table to check common GCF values and understand why each answer makes sense.

Numbers GCF Reason
12 and 18 6 Both numbers are divisible by 6, and no larger number divides both.
20 and 30 10 The common factors are 1, 2, 5, and 10.
36 and 60 12 \(36=2^2\times3^2\) and \(60=2^2\times3\times5\).
45, 75, and 105 15 All three numbers share \(3\times5\).
9 and 28 1 They are relatively prime, so the only common positive factor is 1.
48 and 180 12 The Euclidean algorithm gives the last nonzero remainder as 12.

FAQ: GCF Calculator

What does this GCF calculator do?

It calculates the greatest common factor of two or more positive whole numbers. The result is the largest whole number that divides all entered numbers evenly.

What is GCF?

GCF means greatest common factor. It is the greatest positive number that is a factor of every number in the set.

Is GCF the same as GCD?

Yes. GCF means greatest common factor, and GCD means greatest common divisor. In most school mathematics contexts, they refer to the same value.

Is GCF the same as HCF?

Yes. HCF means highest common factor. It is another name for GCF.

How do I find the GCF by prime factorization?

Write each number as a product of prime factors. Then choose only the prime factors that appear in every number, using the smallest exponent for each shared prime.

What is the GCF of relatively prime numbers?

The GCF of relatively prime numbers is 1. They do not share any factor greater than 1.

Can the GCF be larger than the smallest number?

No. The GCF cannot be larger than the smallest number in the set because it must divide every number evenly.

How is GCF used in fractions?

GCF is used to simplify fractions. Divide the numerator and denominator by their GCF to reduce the fraction to simplest form.

Related Calculators and Guides

Continue with related tools if your GCF calculation is part of a larger fraction, algebra, or number theory problem.

More Sly academy Content

Calculate Your AP Score
Support Us