PERSONAL FINANCE · 206 TOOLS · 0 SIGN-UP
TallyBench / GCF Calculator
// GREATEST COMMON FACTOR

The largest number that divides all of them.

Enter two or more numbers separated by commas. You get the GCF, the LCM, and the prime factorisation behind the answer.

Greatest common factor—
Least common multiple—
Coprime?—
Prime factorisations—

This page's own default, worked in full

48, 180, and 210 have a GCF of 6 and an LCM of 5,040. Their prime factorisations — 48 = 2⁴ × 3, 180 = 2² × 3² × 5, 210 = 2 × 3 × 5 × 7 — share only a single 2 and a single 3 across all three, which multiply to 6. They are not coprime as a set, since 6 is shared by all of them, though no pair among them shares everything the others do.

The Euclidean algorithm, chained across three numbers

The algorithm only works on two numbers at a time, so a third joins by feeding the running answer back in: GCF(48, 180) resolves in three division steps to 12, then GCF(12, 210) resolves in two more steps to 6 — the final answer for all three together. Each step only ever needs one division, which is exactly why the algorithm stays fast however many numbers (or however large they are) get chained through it.

GCF and LCM, the same numbers, both ways

The LCM Calculator runs these same three numbers through the mirror-image rule — highest shared prime power instead of lowest — and reaches 5,040, the exact figure this page reports too. For two numbers specifically, GCF × LCM always equals their product; extended to three or more, as here, the two figures still both exist and still both mean something, but that clean multiplicative identity no longer holds. Reducing a fraction to lowest terms is dividing its numerator and denominator by exactly this number — the Fraction Calculator does that step automatically on every result, and the Factor Calculator lays out the full prime factorisation behind any single one of these three numbers on its own.

How the GCF is actually found

Listing every factor of both numbers and picking the biggest shared one works, but it is slow. Two better methods:

Prime factorisation. Break each number into primes and take every prime they share, at the lowest power each appears. 48 = 2⁴ × 3 and 180 = 2² × 3² × 5. They share 2² and 3, so the GCF is 4 × 3 = 12.

The Euclidean algorithm. Repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero. 180 ÷ 48 leaves 36; 48 ÷ 36 leaves 12; 36 ÷ 12 leaves 0, so the answer is 12. It is over two thousand years old, it is what this calculator uses, and it is still the fastest known method — it needs no factorisation at all, which matters enormously for large numbers.

The relationship with the LCM

For exactly two numbers, GCF × LCM = a × b. For 48 and 180: 12 × 720 = 8,640, and 48 × 180 = 8,640. Find one and the other falls out by division. The identity does not extend to three or more numbers, which is a common mistake.

Coprime numbers

When the GCF is 1 the numbers are coprime — they share no factor other than one. They need not be prime themselves: 8 and 9 are coprime despite both being composite. Coprimality is what makes a fraction fully reduced, and it underpins RSA encryption, where the security rests on how hard it is to factor a large number even though finding its GCF with another is easy.

What is the difference between GCF, GCD and HCF?

Nothing — they are three names for the same thing. Greatest Common Factor, Greatest Common Divisor and Highest Common Factor all mean the largest number that divides every input exactly. Different countries and textbooks favour different names.

Can the GCF be larger than the smallest number?

No, never. Any common factor must divide the smallest number, so it cannot exceed it. If one number divides the other exactly, the GCF is the smaller number itself — the GCF of 12 and 36 is 12.

What is the GCF used for?

Reducing fractions to lowest terms is the everyday use: divide numerator and denominator by their GCF and the fraction is fully simplified in one step. It also appears in scheduling, in splitting quantities into equal groups, and throughout cryptography.

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

Take it pairwise: find the GCF of the first two, then the GCF of that result with the third, and so on. The order does not matter. This calculator does exactly that.

The LCM Calculator handles the other half of the pair, and the Factor Calculator lists every factor of a single number with its prime breakdown. To reduce a fraction using the result, use the Fraction Calculator. A practical use of the greatest common factor: the Aspect Ratio Calculator uses it to reduce 1920×1080 to 16:9.