Developed by — Senior Statistician & Editor Last updated Add as Preferred on Google
Basic Mathematics

Greatest Common Factor (GCF) Calculator

Use this greatest common factor calculator to find the GCF (also called GCD or HCF) of two or more integers. Enter your numbers to get an instant answer with a clear, step-by-step solution.

Enter 2 to 10 integers, separated by commas or spaces. Do not use thousands separators.
Answer

Step-by-Step Solution

Check the Answer

Want to find the Least common multiple instead? Use the LCM calculator

Need a tool that performs basic and advanced mathematics in one place? Use the Scientific Calculator.

How to Use the Greatest Common Factor Calculator

This calculator allows you to find the greatest common factor (GCF) of two or more numbers and shows you the steps.

To use the calculator:

  1. Enter the numbers in the input field. You can separate them using commas, spaces, tabs, or line breaks.
  2. Click Calculate.

The calculator will instantly return the GCF and provide you with a clear, step-by-step solution showing how the greatest common factor was obtained.

For example, to find the GCF of 32, 24, 64, and 12 using the calculator:

  • Enter 32, 24, 64, 12 in the input field.
  • Click Calculate.

The calculator returns the GCF as 4 and shows you how the value was obtained, step-by-step.

What Is the Greatest Common Factor (GCF)?

The greatest common factor (GCF) is the largest positive integer that divides two or more numbers exactly, without leaving a remainder.

For example, consider the numbers 12 and 18. Their GCF is 6 because it divides both 12 and 18 exactly, without leaving a remainder. Furthermore, no larger positive integer divides both numbers exactly.

Is GCF the Same as GCD or HCF?

Yes. The greatest common factor is also known as the greatest common divisor (GCD) or highest common factor (HCF).

These terms refer to the same mathematical concept, although their usage may differ depending on the country or textbook.

  • GCF (Greatest Common Factor) is commonly used in elementary mathematics, particularly in the United States.
  • GCD (Greatest Common Divisor) is commonly used in number theory, mathematics, and computer science.
  • HCF (Highest Common Factor) is another name for the greatest common factor, commonly used in the United Kingdom and other countries.

Therefore, the result you get from our greatest common factor calculator is the GCF, GCD, or HCF of those numbers.

How to Find the Greatest Common Factor by Hand

There are three main methods you can use to find the greatest common factor manually:

  1. Listing factors. Best for small numbers because you can easily identify all their factors.
  2. Prime factorization. Useful for larger numbers that can be broken down into prime factors without too much difficulty.
  3. Euclidean algorithm. The fastest general method for very large numbers because you don’t need to list or factorize them.

Method 1: Listing Factors

The listing factors method involves identifying all the positive factors of each number and selecting the largest factor they have in common.

Wondering what a factor is? It is a whole number that divides another number exactly without leaving a remainder. For example, 4 is a factor of 20 because 20 ÷ 4 = 5, which is a whole number.

To find the GCF using the listing factors method:

  1. List all the positive factors of each number.
  2. Identify the factors that appear in every list.
  3. Select the largest number from the common factors.

Example 1: Find the GCF of 30 and 54

To find the GCF of 30 and 54 using the listing factors method by hand, follow these steps:

Step 1. List all the factors of each number

We need to list all positive integers that divide each number without leaving a remainder. Therefore:

  • The factors of 30 are: 1, 2, 3, 5, 6, 10, 15, 30
  • The factors of 54 are: 1, 2, 3, 6, 9, 18, 27, 54

Step 2. Identify the common factors

From the two lists in step 1, the factors appearing in both are: 1,2, 3, and 6.

Step 3. Select the largest common factor

From the list of common factors, the largest is 6. Therefore, the greatest common factor of 30 and 54 is 6.

In other words, GCF(30,54) = 6.

Method 2: Prime Factorization

The prime factorization method of finding the greatest common factor (GCF) involves expressing each number as a product of its prime numbers, finding the prime factors they share in common, and multiplying those shared factors together. This method is useful when working with numbers that are too large to list their factors easily but can still be broken down into prime factors.

A prime number is a positive integer greater than 1 that has exactly two positive factors: 1 and itself. Examples of prime numbers are 2, 3, 5, and 7.

To find the GCF using this method:

  1. Find the prime factorization of each number.
  2. Identify the prime factors that appear in every number, taking the lowest power of each common prime factor.
  3. Multiply the common prime factors to obtain the GCF.

Example 2: Find the GCF of 84 and 126

To find the GCF of 84 and 126 by hand using the prime factorization method, follow these steps:

Step 1. Find the prime factorization of each number

To find the prime factorization of each number, we need to express each number as a product of prime factors.

Expressing 84 as a product of prime factors gives:

84 = 2 × 42

= 2 × 2 × 21

= 2 × 2 × 3 × 7

Therefore, 84 = 2² × 3 × 7

Similarly, we can express 126 as a product of its prime factors as follows:

126 = 2 × 63

= 2 × 3 × 21

= 2 × 3 × 3 × 7

Therefore, 126 = 2 × 3² × 7

Step 2. Identify the common prime factors

From the prime factorizations, we can see that both numbers contain the prime factors 2, 3, and 7. However, we need to take the lowest power of each common prime factor. This gives:

  • For the prime factor 2, the lowest power is 2¹.
  • For the prime factor 3, the lowest power is 3¹.
  • For the prime factor 7, both numbers contain 7¹.

Step 3. Multiply the common prime factors

To get the greatest common factor, we now multiply the common prime factors.

Therefore, GCF = 2 × 3 × 7

= 42

Hence, the greatest common factor of 84 and 126 is 42.

Method 3: Euclidean Algorithm

The Euclidean algorithm method of finding the greatest common divisor of two numbers involves repeatedly dividing the larger number by the smaller number and replacing the larger number with the remainder until a remainder of zero is reached.

Unlike listing factors or prime factorization, this method does not require you to identify the factors of each number. Instead, we divide the larger number by the smaller number and use the remainder to continue the calculation.

Therefore, to find GCF by hand using the Euclidean method:

  1. Divide the larger number by the smaller number and find the remainder.
  2. Divide the previous divisor by the remainder obtained in Step 1.
  3. Continue dividing the previous divisor by the new remainder until the remainder becomes zero.
  4. The last nonzero divisor is the greatest common factor.

This method is especially useful when dealing with very large numbers because it requires fewer calculations than listing all their factors.

Example 3: Find the GCF of 1,260 and 924

To find the GCF of 1,260 and 924, follow these steps:

Step 1. Divide the larger number by the smaller number

Since 1,260 is greater than 924, we divide 1,260 by 924.

1,260 ÷ 924 = 1 remainder 336

Step 2. Divide the previous divisor by the remainder

We now divide 924 by 336.

924 ÷ 336 = 2 remainder 252

Step 3. Continue dividing until the remainder becomes zero

We now divide 336 by 252.

336 ÷ 252 = 1 remainder 84

Next, we divide 252 by 84.

252 ÷ 84 = 3 remainder 0

Since the remainder is now zero, we stop dividing.

Want a tool that quickly returns the remainder? Use the modulo calculator.

Step 4. Identify the greatest common factor

The greatest common factor is the last nonzero divisor. In this case, the last nonzero divisor is 84.

Therefore, the greatest common factor of 1,260 and 924 is 84. In other words, GCF(1,260, 924) = 84.

How to Find the GCF of Three or More Numbers

The greatest common factor is not limited to two numbers. You can also find the GCF of three or more integers using any of the methods discussed above.

When using the listing factors method, you need to identify the factors common to every number, not just two of them. However, when using the Euclidean algorithm, you can first find the GCF of two numbers and then calculate the GCF of that result and the next number.

Example 4: Find the greatest common factor of 12, 18, and 30.

We first calculate the GCF of 12 and 18.

The factors of 12 are 1, 2, 3, 4, 6, and 12.

The factors of 18 are 1, 2, 3, 6, 9, and 18.

Their greatest common factor is 6.

Therefore,

GCF(12, 18) = 6

Next, we find the GCF of 6 and 30.

Since 6 divides both numbers exactly, their greatest common factor is 6.

Therefore, GCF(6, 30) = 6

Hence, GCF(12, 18, 30) = 6.

You can also confirm this by listing the factors of all three numbers and identifying the largest factor they share.

Where Is the Greatest Common Factor Used?

The greatest common factor is useful when simplifying fractions, dividing quantities into equal groups, and solving mathematical problems involving factors and divisibility.

One of its most common applications is simplifying fractions to their lowest terms.

For example, suppose we want to simplify the fraction 125/1000.

We first find the greatest common factor of 125 and 1000, which is 125.

We then divide both the numerator and denominator by 125.

Therefore, 125/1000 = (125 ÷ 125) / (1000 ÷ 125)

= 1/8

Hence, 125/1000 expressed in simplest form is 1/8.

The GCF is also useful when dividing objects into equal groups without leaving any remainder. For example, suppose a teacher has 24 pencils and 36 erasers and wants to prepare the largest possible number of identical sets, using all the items.

Since the GCF of 24 and 36 is 12, the teacher can prepare 12 identical sets, each containing 2 pencils and 3 erasers.

Frequently Asked Questions

What is a GCF calculator?

A GCF calculator is an online tool used to find the greatest common factor of two or more integers. To use the calculator, enter your numbers and click calculate to get an instant result with a clear, step-by-step solution.

How do you find the greatest common factor?

To find the greatest common factor, list all the factors of each number, identify those appearing in every list, and select the largest. Alternatively, you can use prime factorization or the Euclidean algorithm, especially when working with larger numbers.

What is the GCF of 24 and 36?

The GCF of 24 and 36 is 12 because both numbers are divisible by 12 without leaving a remainder, and no larger positive integer divides them both exactly.

What is the GCF of 12 and 18?

The GCF of 12 and 18 is 6. The common factors are 1, 2, 3, and 6, and the largest is 6.

Is GCF the same as GCD?

Yes. GCF stands for greatest common factor, while GCD stands for greatest common divisor. Both terms refer to the largest positive integer that divides two or more integers without leaving a remainder.

What does HCF mean in mathematics?

HCF stands for highest common factor. It is another name for the greatest common factor (GCF) or greatest common divisor (GCD). All three terms refer to the same value.

What is the difference between GCF and LCM?

The greatest common factor (GCF) is the largest positive integer that divides two or more numbers exactly. The least common multiple (LCM), on the other hand, is the smallest positive integer that is a multiple of all the given numbers.

Cite

Choose APA, MLA, Chicago, or Harvard. Citations credit Joseph Mburu.

Mburu, J.. (2026, November 20). Greatest Common Factor Calculator. Retrieved December 2, 2026, from https://statcalc.net/greatest-common-factor-calculator/

About the Author

, Senior Statistician & Editor. Develops statistics calculators, explains formulas, and checks calculation methods and worked examples.