Skip to main content
1+1
EN
All calculators

Categories

Greatest common factor (GCF) calculator

Result

Fill in the fields to see your result.

How it works

Breaking each number into its prime factors makes the GCF easy to build: take every prime that appears in all of the numbers, at its lowest power across them, and multiply those together. Euclid's algorithm (repeatedly taking the remainder of division) reaches the same answer faster for large numbers, without factoring first — this calculator uses that method internally, then shows the factorization for two numbers as the readable working.

For exactly two numbers, every factor the pair shares is also listed, not just the greatest one — useful for simplifying a fraction to its simplest common denominator step, for instance.

Formulas used

GCF from prime factorization

GCF = product of the lowest power of each prime factor shared by all numbers

Euclid's algorithm

GCF(a, b) = GCF(b, a mod b), until the remainder is 0

Worked examples

Three numbers

GCF(24, 36, 60) = 12 — the largest number that divides evenly into 24, 36 and 60.

Two coprime numbers

GCF(9, 16) = 1, since 9 and 16 share no prime factors — they are coprime.

Assumptions and limits

  • Only positive whole numbers are considered — decimals are rounded and signs are ignored.
  • The full list of common factors is shown only when exactly two numbers are entered.

Frequently asked questions

What is the GCF used for?

It is most commonly used to simplify a fraction to lowest terms — dividing both the numerator and denominator by their GCF.

What does it mean for the GCF to be 1?

It means the numbers share no common factor other than 1 — they are called coprime, even if neither number is itself prime.

Is GCF the same as GCD?

Yes — "greatest common factor" and "greatest common divisor" are two names for exactly the same value.

How is this different from the LCM?

The GCF is the largest number that divides evenly into all of them; the LCM is the smallest number they all divide evenly into — opposite ends of the same factorization.

Updated