GCF Calculator (also called HCF)
Enter two or more whole numbers below to instantly find their greatest common factor (GCF), with Euclid's algorithm shown step by step.
What Is the GCF?
The greatest common factor (GCF) is the largest number that divides evenly into every number in a set. US textbooks call it GCF; British and Indian curricula call the exact same value HCF, for highest common factor. It's also sometimes called the greatest common divisor, or GCD. All three names mean the same calculation. It's used constantly in arithmetic and algebra, most often to reduce a fraction to its simplest form.
How to Find the GCF, Step by Step (Euclid's Algorithm)
- Divide the larger number by the smaller number and find the remainder.
- Replace the larger number with the smaller number, and the smaller number with the remainder.
- Repeat until the remainder is 0.
- The last nonzero remainder (the final "b" value) is the GCF.
Worked example
Find the GCF of 48 and 18.
48 ÷ 18 = 2 remainder 12
18 ÷ 12 = 1 remainder 6
12 ÷ 6 = 2 remainder 0
The remainder is now 0, so the GCF is the last nonzero remainder: 6.
Frequently Asked Questions
What is the GCF of two numbers?
The greatest common factor (GCF), also called the greatest common divisor (GCD), is the largest number that divides evenly into two or more numbers. For example, the GCF of 24 and 36 is 12, since 12 is the largest number that divides evenly into both.
What's the fastest way to find the GCF by hand?
Euclid's algorithm is the fastest method for larger numbers: divide the larger number by the smaller one, replace the larger number with the smaller one and the smaller one with the remainder, and repeat until the remainder is 0. The last nonzero remainder is the GCF. The calculator above shows this exact process for your numbers.
What is the GCF used for?
GCF is most often used to simplify fractions to lowest terms — dividing both the numerator and denominator by their GCF. It's also used to factor expressions in algebra and to split quantities into equal groups.
Is GCF the same thing as GCD?
Yes. Greatest common factor (GCF) and greatest common divisor (GCD) are two names for the exact same value. "Factor" and "divisor" both describe a number that divides evenly into another. GCF is the more common term in US math classes; GCD is more common in higher-level math and computer science.
Is GCF the same thing as HCF?
Yes. HCF (highest common factor) is the term used in British and Indian math curricula for the exact same value US textbooks call GCF. Same calculation, same answer, just a different regional name.
What is the GCF if the numbers share no common factor besides 1?
If the only number that divides evenly into all of them is 1, the numbers are called "coprime" or "relatively prime," and their GCF is 1. For example, GCF(8, 15) = 1.
Related Calculators
- LCM Calculator — General Math
- LCD Calculator — General Math
- Factors Calculator — General Math
- Square Root Calculator — General Math