Math

GCF Calculator

Find the greatest common factor of two numbers instantly.

Find the greatest common factor (GCF, also called GCD) of two numbers — the largest number that divides both evenly. Used for simplifying fractions and ratios, factoring expressions, and splitting quantities into equal groups.

Introduction

The greatest common factor (GCF), also called the greatest common divisor, is the largest number that divides two or more numbers evenly. It is what you use to reduce fractions to lowest terms — 48/72 reduces via their GCF of 24 to 2/3 — and to split quantities into the largest possible equal groups with nothing left over, like dividing 36 apples and 54 oranges into identical gift bags (18 bags of 2 apples and 3 oranges). Any time you want the biggest equal split, you want the GCF.

Prime factorization finds it cleanly: break each number into primes and take the lowest power of each prime common to all of them. For 48 (2^4 x 3) and 72 (2^3 x 3^2), the shared primes give 2^3 x 3 = 8 x 3 = 24. The Euclidean algorithm is the faster method computers use: repeatedly replace the larger number with the remainder of dividing it by the smaller until the remainder is zero — the last non-zero remainder is the GCF. For 48 and 72: 72 mod 48 = 24, 48 mod 24 = 0, so the GCF is 24. It is also the mirror image of the LCM, linked by GCF(a,b) x LCM(a,b) = a x b — for 48 and 72, 24 x 144 = 3,456 = 48 x 72.

How it's calculated

The GCF is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller until the remainder is zero — the last non-zero remainder is the GCF.

Worked examples

GCF of 48 and 72

Prime factors: 48 = 2^4 x 3, 72 = 2^3 x 3^2. Shared primes at their lowest powers: 2^3 x 3 = 8 x 3 = 24. Verify: 48/24 = 2 and 72/24 = 3, and 2 and 3 share no further common factor — so 24 is the greatest. The fraction 48/72 therefore reduces to 2/3. Euclidean check: 72 mod 48 = 24, 48 mod 24 = 0 — GCF is 24.

GCF of 36, 54, and 81

Prime factors: 36 = 2^2 x 3^2, 54 = 2 x 3^3, 81 = 3^4. The only prime common to all three is 3, at its lowest power 3^2 = 9. So 9 is the GCF: the maximum number of identical gift bags is 9, each holding 36/9 = 4 of the first item, 54/9 = 6 of the second, and 81/9 = 9 of the third, with nothing left over. Using the GCF of just two of the numbers (e.g., 18 for 36 and 54) would fail on the third — always include every quantity.

Frequently asked questions

What is the GCF of 12 and 18?

6. It's the largest number that divides both 12 and 18 evenly.

What is the difference between GCF and GCD?

Nothing — GCF (greatest common factor) and GCD (greatest common divisor) are two names for the same thing.

How is the GCF used to simplify fractions?

Divide the numerator and denominator by their GCF. For 12/18, the GCF is 6, so 12/18 simplifies to 2/3.

Related calculators

References