Math

GCF Calculator

Find the greatest common factor (GCF) of two or more numbers using the Euclidean algorithm with step-by-step solution.

Quick Answer

The GCF is the largest number that divides all given numbers evenly. GCF(48, 36) = 12. The Euclidean algorithm finds it by repeated division until the remainder is zero.

Enter Numbers

Examples:

Results

GCF(48, 36) =

12

Euclidean Algorithm Steps

48 = 1 × 36 + 12

36 = 3 × 12 + 0

Remainder is 0, so GCF = 12

About This Tool

The GCF Calculator finds the greatest common factor (also called greatest common divisor or GCD) of two or more positive integers. The GCF is the largest number that divides all the given numbers without leaving a remainder. It is essential for simplifying fractions, solving Diophantine equations, and many areas of mathematics.

The Euclidean Algorithm

This calculator uses the Euclidean algorithm, one of the oldest algorithms still in active use (dating to about 300 BC). It works by repeatedly dividing the larger number by the smaller and taking the remainder. When the remainder reaches zero, the last non-zero remainder is the GCF. It is far more efficient than listing all factors.

Simplifying Fractions

To simplify a fraction, divide both the numerator and denominator by their GCF. For example, 48/36 simplifies to 4/3 because GCF(48,36) = 12, and 48/12 = 4 while 36/12 = 3. This gives you the fraction in its lowest terms.

GCF and LCM Connection

For any two numbers a and b: GCF(a,b) × LCM(a,b) = a × b. This relationship is useful when you need both values. If you know one, you can quickly compute the other.

Coprime Numbers

Two numbers are coprime (or relatively prime) when their GCF is 1. This does not mean both numbers are prime — 8 and 15 are coprime even though neither is prime. Coprimality is important in cryptography, particularly in RSA encryption where you need to find numbers coprime to Euler’s totient.

Frequently Asked Questions

What is the GCF?
The Greatest Common Factor is the largest number that divides two or more numbers evenly. GCF(12, 8) = 4 because 4 is the largest number that divides both 12 and 8.
Is GCF the same as GCD?
Yes. GCF (Greatest Common Factor) and GCD (Greatest Common Divisor) are the same thing. Some textbooks also call it HCF (Highest Common Factor). All three terms refer to the same concept.
How does the Euclidean algorithm work?
Divide the larger number by the smaller, take the remainder. Then divide the smaller number by the remainder. Repeat until the remainder is 0. The last non-zero remainder is the GCF.
What if one of the numbers is 0?
GCF(a, 0) = a for any positive integer a. Zero is divisible by every number, so the GCF is simply the other number.
How do I find the GCF of more than two numbers?
Find the GCF of the first two numbers, then find the GCF of that result with the third number, and so on. GCF(12, 18, 24) = GCF(GCF(12, 18), 24) = GCF(6, 24) = 6.

Was this tool helpful?