Free Online GCF Calculator

Find the Greatest Common Factor (GCF) of two or more numbers instantly with step-by-step prime factorization.

OC
OmniCalculator Pro Editorial TeamReviewed for accuracy by our editorial team
✅ Fact-checked🔄 Updated 2026⭐ Trusted tool

GCF Calculator

Enter two or more numbers separated by commas to find their Greatest Common Factor.

Greatest Common Factor

What is a GCF Calculator?

A GCF calculator (Greatest Common Factor calculator) is a mathematical tool that finds the largest positive integer that divides two or more numbers without leaving a remainder. The GCF is also known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF). This concept is fundamental in number theory and is widely used in simplifying fractions, solving ratio problems, and various applications in algebra and arithmetic.

For example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18 evenly. Understanding GCF helps students build a strong foundation in mathematics and is essential for standardized tests like the SAT, GRE, and GMAT. According to Khan Academy, mastering GCF is a key skill for 6th-grade mathematics and beyond.

How to Calculate GCF — Methods Explained

Method 1: Prime Factorization

The prime factorization method breaks each number into its prime factors, then identifies the common factors. This is the most intuitive approach taught in schools and recommended by Math is Fun.

Example: Find GCF of 48 and 36

48 = 2 × 2 × 2 × 2 × 3 = 2⁴ × 3¹

36 = 2 × 2 × 3 × 3 = 2² × 3²

Common factors: 2² × 3¹ = 4 × 3 = 12

Method 2: Euclidean Algorithm

The Euclidean Algorithm is an efficient method that uses repeated division. It was first described by the Greek mathematician Euclid around 300 BCE and remains one of the oldest algorithms still in use today, as noted by Wikipedia.

GCF(a, b) = GCF(b, a mod b) until remainder = 0

Example: Find GCF of 48 and 18

48 ÷ 18 = 2 remainder 12

18 ÷ 12 = 1 remainder 6

12 ÷ 6 = 2 remainder 0

GCF = 6

Method 3: Listing Factors

For smaller numbers, simply list all factors and find the largest one in common. This method works well for quick mental calculations and is perfect when working with numbers under 100.

Example: Find GCF of 20 and 30

Factors of 20: 1, 2, 4, 5, 10, 20

Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30

Common: 1, 2, 5, 10 → GCF = 10

Real-World Applications of GCF

GCF vs LCM — What's the Difference?

The GCF and LCM (Least Common Multiple) are related but opposite concepts. The GCF finds the largest shared divisor, while the LCM finds the smallest shared multiple. There's a useful relationship between them:

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

For instance, GCF(12, 18) = 6 and LCM(12, 18) = 36. Verification: 6 × 36 = 216 = 12 × 18 ✓. This property is extensively covered in the Purplemath GCF guide.

Frequently Asked Questions

The GCF of 1 and any number is always 1, since 1 is the only positive integer that divides 1.

Only if they are the same prime number. Two different prime numbers always have a GCF of 1 because prime numbers have no common factors other than 1. Such numbers are called coprime or relatively prime.

To simplify a fraction, divide both the numerator and denominator by their GCF. For example, to simplify 24/36: GCF(24,36) = 12, so 24/36 = (24÷12)/(36÷12) = 2/3.

They are all the same thing! GCF (Greatest Common Factor), GCD (Greatest Common Divisor), and HCF (Highest Common Factor) all refer to the largest number that divides two or more numbers without a remainder. Different countries and textbooks use different terms.

Related Calculators

What is the Greatest Common Factor?

The greatest common factor (GCF), also called the greatest common divisor, is the largest whole number that divides evenly into two or more numbers. For 24 and 36, the GCF is 12. It is the tool that simplifies fractions, reduces ratios and solves practical division problems where things must come out in whole units.

Three Ways to Find the GCF

1. Listing factors

Write out every factor of each number and pick the largest they share. It is reliable and intuitive, but it becomes impractical above about two digits.

2. Prime factorisation

Break each number into its prime factors, then multiply the primes they have in common. This also shows the structure of the numbers, which helps when working with fractions.

3. The Euclidean algorithm

The fastest method, and over two thousand years old. It appears in Euclid's Elements from around 300 BC and is still the algorithm computers use today.

Euclidean algorithm:
Divide the larger number by the smaller and keep the remainder
Replace the larger with the smaller, and the smaller with the remainder
Repeat until the remainder is zero
The last non-zero remainder is the GCF

Worked Example: All Three Methods

Finding the GCF of 48 and 60

Method 1: Listing factors

48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 Common: 1, 2, 3, 4, 6, 12 -> largest is 12

Method 2: Prime factorisation

48 = 2 x 2 x 2 x 2 x 3 60 = 2 x 2 x 3 x 5 Shared primes: 2 x 2 x 3 = 12

Method 3: Euclidean algorithm

60 / 48 = 1 remainder 12 48 / 12 = 4 remainder 0 Last non-zero remainder: 12

The GCF is 12 by all three methods, but Euclid's takes two steps instead of twenty

Why the Euclidean Algorithm Wins

For 48 and 60 the difference is minor. For 1,071 and 462 it is decisive: listing factors means testing hundreds of candidates, while the Euclidean algorithm reaches the answer in three divisions.

GCF of 1,071 and 462

1071 / 462 = 2 remainder 147 462 / 147 = 3 remainder 21 147 / 21 = 7 remainder 0

The GCF is 21, found in three steps

What GCF Is Used For

ApplicationHow GCF Is Used
Simplifying fractionsDivide numerator and denominator by their GCF
Reducing ratiosDivide every part by the GCF
Equal grouping problemsLargest identical groups from different quantities
Tiling and cuttingLargest square tile that fits a rectangle exactly
CryptographyUnderpins RSA key generation and modular arithmetic

A practical grouping problem

You have 48 pens and 60 notebooks and want to make identical gift bags with nothing left over. What is the largest number of bags?

GCF(48, 60) = 12 Each bag: 48/12 = 4 pens, 60/12 = 5 notebooks

12 bags, each with 4 pens and 5 notebooks

GCF and LCM are linked

For any two numbers, GCF multiplied by LCM equals the product of the numbers themselves. For 48 and 60: GCF is 12, LCM is 240, and 12 times 240 equals 2,880, which is 48 times 60. Finding one gives you the other for free.

People Also Ask

The greatest common factor of two or more numbers is the largest whole number that divides all of them without leaving a remainder. For 24 and 36 it is 12, because 12 divides both evenly and no larger number does.
The Euclidean algorithm. Divide the larger number by the smaller, keep the remainder, then repeat with the smaller number and that remainder until the remainder is zero. The last non-zero remainder is the GCF. It is dramatically faster than listing factors for large numbers.
The greatest common factor is the largest number that divides into both, while the lowest common multiple is the smallest number both divide into. GCF is used to simplify fractions; LCM is used to add them. They are related: GCF times LCM equals the product of the two numbers.
The numbers are coprime, or relatively prime, meaning they share no common factor other than one. Fifteen and twenty-eight are coprime even though neither is a prime number. A fraction whose numerator and denominator are coprime is already in lowest terms.
Find the GCF of the first two, then find the GCF of that result and the third number, and so on. The order does not matter, and you can always work pairwise regardless of how many numbers there are.

📚 Sources & References

  1. National Council of Teachers of Mathematics — Standards for number theory instruction.
  2. Khan Academy — Lessons on factors, multiples and the Euclidean algorithm.
  3. Wolfram MathWorld — Reference material on number theory and algorithms.

This calculator is provided for educational purposes.