GCF Calculator

Free GCF calculator with the Euclidean algorithm step-by-step. Find the greatest common factor (GCD) of two or more numbers — instant answer plus the working.

=

How to Calculate GCF?

The Greatest Common Factor (GCF), also known as the Greatest Common Divisor (GCD), is the largest positive integer that divides two or more numbers without leaving a remainder. It's useful for simplifying fractions and solving various mathematical problems.

Finding GCF of Multiple Numbers:

  • Find the GCF of the first two numbers
  • Use that result to find the GCF with the next number
  • Continue until all numbers are processed

GCF(12, 18, 24) = 6

Finding GCF using Prime Factorization:

  • Find the prime factors of each number
  • Identify the common prime factors
  • Multiply the common prime factors with the lowest exponents

48 = 2⁴ × 3

60 = 2² × 3 × 5

GCF(48, 60) = 2² × 3 = 12

Common GCF examples

NumbersGCF
12, 186
24, 3612
15, 255
8, 12, 164
20, 30, 4010
7, 111
100, 200100

About this GCF calculator

This calculator accepts any list of two or more positive integers — comma-, space-, or newline-separated — and returns their greatest common factor along with the full Euclidean working. GCF, GCD and HCF are three names for the same thing; this tool uses GCF as the label but the result is identical whichever term your textbook uses. The step-by-step box prints both the Euclidean reduction (remainders chain) and the prime-factorization view, so the calculator works as both a quick answer and a study aid.

Frequently Asked Questions

The GCF of two integers a and b is the largest positive integer that divides both a and b with no remainder. For example, GCF(12, 18) = 6 because 6 divides 12 evenly (12 ÷ 6 = 2) and 18 evenly (18 ÷ 6 = 3), and no larger integer does. The GCF is always at most as large as the smaller input, and it equals the smaller input only when the smaller input is itself a factor of the larger (GCF(6, 18) = 6).

Replace the pair (a, b) with (b, a mod b), where 'a mod b' is the remainder. Repeat until the remainder is 0; the previous remainder (now the divisor) is the GCF. Example for GCF(48, 60): 60 mod 48 = 12; 48 mod 12 = 0; so GCF = 12. The Euclidean algorithm runs in O(log min(a, b)) steps and is the fastest practical method — the calculator uses it by default.

Factor each number into primes, then for every prime that appears in every factorization, take the lowest power of that prime and multiply them together. Example for GCF(48, 60): 48 = 2⁴·3, 60 = 2²·3·5. The shared primes are 2 and 3; their lowest powers are 2² and 3¹. GCF = 2² × 3 = 12. The 'Calculation steps' box prints these factorizations alongside the Euclidean trace.

GCF(12, 18) = 6. GCF(24, 36) = 12. GCF(48, 60) = 12. The reference table at the bottom of the page lists more common pairings — GCF(8, 12) = 4, GCF(15, 25) = 5, GCF(9, 12, 15) = 3 — useful for spot-checking textbook problems.

To reduce a fraction to lowest terms, divide the numerator and the denominator by their GCF. For 48/60: GCF(48, 60) = 12, so 48/60 = (48 ÷ 12)/(60 ÷ 12) = 4/5. Dividing by a smaller common factor would still simplify the fraction but would leave room for further reduction; dividing by the GCF gets you to lowest terms in a single step.

Yes — all three names refer to the same quantity: the largest positive integer that divides two or more numbers without remainder. US textbooks usually say 'GCF' (Greatest Common Factor), British and Indian textbooks usually say 'HCF' (Highest Common Factor), and number-theory and computer-science texts usually say 'GCD' (Greatest Common Divisor). The calculator returns the same answer whichever vocabulary you use.

Yes — two integers are called 'coprime' or 'relatively prime' when their GCF is 1. They share no prime factor. Examples: GCF(8, 9) = 1, GCF(15, 16) = 1, GCF(35, 99) = 1. Coprimality matters a lot in number theory and cryptography: RSA key generation, for instance, requires choosing an exponent that is coprime with Euler's totient of the modulus.

Tiling: if you have a rectangle 24 m × 36 m and want to fit the largest equal square tiles without cutting, the side length must be GCF(24, 36) = 12 m. Music: two rhythmic patterns of length 8 and 12 share a beat every GCF(8, 12) = 4 beats. Recipes: dividing 18 cookies and 24 brownies into identical portions uses GCF(18, 24) = 6 portions. Bandwidth allocation, gear ratios in clockwork, and the Stern–Brocot tree all hinge on GCF computations.
GCF Calculator — Free GCF calculator with the Euclidean algorithm step-by-step. Find the greatest common factor (GCD) of two or more numb
GCF Calculator