Home/Calculators/Math/GCF Calculator

GCF Calculator

Find the greatest common factor (GCF) of two integers — instant and free.

gcf-calculator
Result
—
In summary: The greatest common factor is the largest number that divides both values evenly. Using Euclid's algorithm on 24 and 36 gives a GCF of 12, since 12 is the largest factor shared by both.

What the greatest common factor is

The greatest common factor (GCF), also called the greatest common divisor, is the largest whole number that divides two integers with no remainder. For 24 and 36, the shared factors are 1, 2, 3, 4, 6 and 12 — so the GCF is 12.

Another way to see it is through prime factors: 24 = 2×2×2×3 and 36 = 2×2×3×3. The primes they share are 2, 2 and 3, whose product is 12. Every common factor of the pair divides that answer, which is what makes it the greatest. One reliable route to the answer is to break both numbers down with the prime factorization calculator and keep the shared factors.

How to use this calculator

Enter two integers and the calculator applies Euclid's algorithm to return the greatest common factor instantly. This is the same divisor used to reduce a fraction with the fraction simplifier calculator.

Decimal entries are rounded to whole numbers first, since factors are only defined for integers. The GCF is never larger than the smaller input, and when one number divides the other exactly it is that smaller number.

How Euclid's algorithm works

Euclid's algorithm repeatedly replaces the larger number with the remainder of dividing the two numbers, until the remainder is zero. The last non-zero value is the GCF. It is far faster than listing every factor, especially for large numbers.

Following it on 24 and 36: 36 ÷ 24 leaves a remainder of 12, then 24 ÷ 12 leaves a remainder of 0, so the answer is 12. It works because any number dividing both values also divides their remainder, so each step shrinks the problem without losing the answer. Its counterpart, needed when adding fractions with different denominators, is the least common multiple calculator.

Frequently asked questions

What is the GCF of 24 and 36?
12. It is the largest whole number that divides both 24 and 36 evenly.
What is the difference between GCF and GCD?
None — greatest common factor (GCF) and greatest common divisor (GCD) are two names for the same thing.
How is the GCF used to simplify fractions?
Divide both the numerator and denominator by their GCF to reduce the fraction to lowest terms.
What is the GCF if the two numbers share no factors?
It is 1. Numbers whose only common factor is 1 are called coprime or relatively prime.
What is the GCF when one of the numbers is zero?
It is the other number, because every integer divides zero evenly. So GCF(0, 36) = 36. Negative inputs are treated by their absolute value, since a factor's sign does not change what it divides.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: July 27, 2026 · Calculations run in your browser. Estimates for information only.