Updated on April 18th, 2026

GCF Calculator

Created By Jehan Wadia

Separate numbers with commas and/or spaces. Maximum value: 10,000,000.


Introduction

The Greatest Common Factor (GCF) of two or more numbers is the largest number that divides evenly into all of them. For example, the GCF of 8, 12, and 20 is 4, because 4 is the biggest number that goes into 8, 12, and 20 with no remainder. The GCF is also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — they all mean the same thing.

This GCF calculator finds the greatest common factor of any set of whole numbers instantly. Just type in two or more numbers, and the tool gives you the answer along with five different step-by-step methods that show how it was found: listing factors, prime factorization, the ladder (common division) method, the Euclidean algorithm, and the binary (Stein's) algorithm. It also shows all common factors, the LCM (Least Common Multiple), and tells you whether your numbers are coprime. Whether you are checking homework, simplifying fractions, or studying number theory, this calculator makes finding the GCF quick and easy.

How to use our GCF Calculator

Enter two or more whole numbers into the calculator, and it will find the Greatest Common Factor (GCF) along with step-by-step solutions using five different methods.

Enter two or more whole numbers: Type your numbers into the input box, separated by commas or spaces. For example, you can type "8, 12, 20" to find the greatest factor that all three numbers share. Each number must be a whole number between 0 and 10,000,000.

Click "Calculate GCF": Press the Calculate button to see your results. The calculator will show you the GCF, all common factors of your numbers, and the Least Common Multiple (LCM). It will also tell you if your numbers are coprime, meaning they share no common factor other than 1.

Explore five solution methods: Use the tabs below the result to see how the GCF is found using different approaches — Listing Factors, Prime Factorization, Common Division (Ladder Method), the Euclidean Algorithm, and Binary GCD (Stein's Algorithm). Each method walks you through the problem one step at a time so you can follow along and learn how it works.

Clear and start over: Press the "Clear" button to erase your input and results so you can enter a new set of numbers.

What Is the Greatest Common Factor (GCF)?

The Greatest Common Factor (GCF) of two or more whole numbers is the largest number that divides evenly into all of them with no remainder. It is also called the Greatest Common Divisor (GCD) or the Highest Common Factor (HCF) — these three terms all mean the same thing.

For example, the GCF of 12 and 18 is 6. Both 12 and 18 can be divided by 6 with nothing left over, and no number larger than 6 can do that.

How to Find the GCF

There are several ways to find the GCF. This calculator shows you five different methods step by step:

Why Is the GCF Useful?

The GCF shows up in many everyday math tasks. It is the key to simplifying fractions — you divide both the numerator and denominator by their GCF to reduce a fraction to its lowest terms. For example, 18/24 simplifies to 3/4 because the GCF of 18 and 24 is 6. Tools like the Percentage Calculator and Percent Change Calculator also rely on understanding how numbers relate to each other through division.

The GCF is also helpful when you need to split things into equal groups. If you have 24 red marbles and 36 blue marbles and you want to divide them into identical groups with no marbles left over, the largest number of groups you can make is 12 — the GCF of 24 and 36. This type of grouping problem is closely related to combinations and permutations, which count the different ways items can be arranged or selected.

GCF and LCM: How They Are Related

The GCF has a direct relationship with the Least Common Multiple (LCM). For any two positive numbers a and b:

GCF(a, b) × LCM(a, b) = a × b

This means if you know the GCF, you can quickly find the LCM, and vice versa. This calculator displays both values for you.

Special Cases to Know


Frequently Asked Questions

What is the difference between GCF, GCD, and HCF?

They all mean the same thing. GCF stands for Greatest Common Factor, GCD stands for Greatest Common Divisor, and HCF stands for Highest Common Factor. All three find the largest number that divides evenly into your numbers.

How many numbers can I enter into the GCF calculator?

You can enter two or more whole numbers. Just separate them with commas or spaces. Each number must be between 0 and 10,000,000.

Can this calculator find the GCF of negative numbers or decimals?

No. This calculator only accepts whole numbers that are zero or positive. Decimals and negative numbers are not allowed. If you have a decimal, try converting it to a fraction first, then work with the numerator and denominator.

How do I use the GCF to simplify a fraction?

Find the GCF of the numerator and denominator, then divide both by that number. For example, to simplify 18/24, find GCF(18, 24) = 6. Then divide: 18 ÷ 6 = 3 and 24 ÷ 6 = 4. The simplified fraction is 3/4.

What does it mean when the GCF is 1?

When the GCF is 1, the numbers are called coprime or relatively prime. This means they share no common factor other than 1. For example, 9 and 14 are coprime because GCF(9, 14) = 1.

Which method for finding the GCF is the fastest?

For small numbers, listing factors is quick and easy. For large numbers, the Euclidean algorithm is the fastest by hand because it uses repeated division and skips listing every factor. For computers, the binary (Stein's) algorithm is very efficient because it only uses subtraction and dividing by 2.

Why does the calculator also show the LCM?

The GCF and LCM are closely related. For two numbers a and b, the formula is GCF × LCM = a × b. Knowing both values helps with tasks like adding fractions, scheduling events, and solving word problems.

What is the Euclidean algorithm in simple terms?

You take two numbers and divide the bigger one by the smaller one. Then you replace the bigger number with the remainder. You keep repeating this until the remainder is 0. The last non-zero remainder is the GCF. For example, GCF(20, 8): 20 ÷ 8 = 2 remainder 4, then 8 ÷ 4 = 2 remainder 0. So the GCF is 4.

What is the ladder method for finding the GCF?

The ladder method (also called common division) works by dividing all your numbers by a shared prime factor at the same time. You keep dividing until no common prime factor is left. Then you multiply all the divisors together to get the GCF. It looks like a table or ladder shape when written out.

Can the GCF of two numbers ever be larger than either number?

No. The GCF can never be larger than the smallest number in the set. The biggest the GCF can be is equal to the smallest number, which happens when the smaller number divides evenly into all the other numbers. For example, GCF(6, 12) = 6.

How do I find the GCF of three or more numbers by hand?

Work in pairs. First find the GCF of the first two numbers. Then find the GCF of that result with the third number. Keep going until you've used all the numbers. For example, for GCF(8, 12, 20): GCF(8, 12) = 4, then GCF(4, 20) = 4.

What is Stein's algorithm and when should I use it?

Stein's algorithm (also called the binary GCD algorithm) finds the GCF using only subtraction and division by 2. It avoids large divisions, which makes it fast for computers. You would use it mainly in programming. This calculator shows you each step so you can learn how it works.

Is the GCF of 0 and any number always that number?

Yes. GCF(0, n) = n for any positive number n. This is because every integer divides 0 evenly. However, GCF(0, 0) is undefined because there is no largest integer that divides 0.


Related Calculators

LCM Calculator

Visit LCM Calculator

Prime Factorization Calculator

Visit Prime Factorization Calculator